Coder Social home page Coder Social logo

codelab-friendlychat-android's Introduction

Firebase Codelab: FriendlyChat

Actions Status

This is the source code for the Firebase FriendlyChat codelabs. To get started open the codelab instructions:

How to make contributions?

Please read and follow the steps in the CONTRIBUTING.md

License

See LICENSE

codelab-friendlychat-android's People

Contributors

clay-murphy avatar dpebot avatar kroikie avatar marinacoelho avatar racheldosh avatar rahulkwani avatar samtstern avatar stratus avatar thatfiredev avatar tkburner avatar ulukaya avatar vikrum avatar yaraki avatar yhdesai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codelab-friendlychat-android's Issues

Crash when the message doesn't have an imageUrl

I completed both tutorials for the FriendlyChat (Android/iOS swift), when you add pictures in your swift application, if you are using the same database the android app will crash trying to load the messages because in the swift app "imageUrl" is stored as "imageURL" and "photoUrl" is "photoURL" so the app crashes at

if (imageUrl.startsWith("gs://")) { (line 229 I believe)

because imageUrl is actually stored as imageURL.

android-starter - Add Messages to the On-device Index - Google App updates

  1. Start up the FriendlyChat app and send a new message with the text Hi world!
  2. Go to the Google app, switch to In Apps and search for Hi world.

In more recent versions for the Google app, it is no longer "In Apps" it is under the "Personal" category.

  1. Confirm that the message can be found in the Google app.
  2. Tap on the result and confirm the FriendlyChat app opens.

I can't get token

From @MiloslavKrejza on April 26, 2017 17:57

hello i can't get token from a database

"Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script. (messaging/failed-serviceworker-registration)."

What can i do to fix this?

Copied from original issue: firebase/codelab-friendlychat-web#208

sent picture does't show up in chat

Hello
After completing step 8 i could select a picture to send , but then i have a big spinner picture loading instead of the pic that i sent.

Failed to resolve two packages while trying to gradle sync.

Following the Codelab and such, and can't get past the very first steps, of running the test app to see nothing happening. The build won't finish, because I get the following errors:
Failed to resolve: play-services-basement

Failed to resolve: play-services-measurement-base

The steps I did before this included:

  1. Opening the project, and following this prompt:
    Unregistered VCS root detected The directory C:\Users\bcook\friendlychat-android is under Git, but is not registered in the Settings. Add root Configure Ignore
    I clicked Add root. Then, it re-ran the Gradle Build, and then failed.

Stats: Browser: Google Chrome Browser version: 69.0.3497.100 (Official Build) (64-bit) Operating system: Windows 10 Operating system version: 1803

Step 4: Sync your project with gradle files error

Line 36: implementation 'com.android.support:design:27.1.1' in the build.gradle file is giving an error when I try to sync the project with gradle files saying that I am trying to mix versions 27.1.1 and 26.1.0

Step 10's MyFirebaseMessagingService.java doesn't actually display any notification

As the title says, onMessageReceived() is just Logging, and not displaying any notification.
Even the "ready baked" sample project is doing the same, no notification.

Log.d(TAG, "FCM Message Id: " + remoteMessage.getMessageId()); Log.d(TAG, "FCM Notification Message: " + remoteMessage.getNotification()); Log.d(TAG, "FCM Data Message: " + remoteMessage.getData());

App crashes when enabling proguard

Repro steps:
Set minifyEnabled to true

Expected behavior:
App continues to work

Actual behavior:
App crashes on startup with error like:
com.google.firebase.database.d: No properties to serialize found on class com.google.firebase.codelab.friendlychat.a

com.google.firebase.codelab.friendlychat.a is the FriendlyMessage class.

Annotating that class w/ @keep locally works. Something like https://github.com/firebase/quickstart-android/blob/master/database/app/proguard-rules.pro may also work.

Typo in class name in tutorial

On the 10th step in the Firebase Android Codelab, the heading of the code snippet to update the MyFirebaseInstanceIdService class says MyInstanceIDListenerService.java instead of MyFirebaseInstanceIdService .java

The name of the file in the repo is MyFirebaseInstanceIdService .java so seeing MyInstanceIDListenerService.java in the heading throws you off just a bit.

screen shot 2017-08-31 at 12 20 05 am

cloud-functions-start (step 8): An unexpected error has occurred.

From @oneezy on June 5, 2017 17:54

When trying to Welcome New Users in Step 8 of the cloud-functions-start code lab, I'm getting an error after I run the following in the terminal:

Command:

firebase deploy --only functions

Output:

=== Deploying to 'www-fire'...

i  deploying functions
i  functions: ensuring necessary APIs are enabled...
i  runtimeconfig: ensuring necessary APIs are enabled...
✔  functions: all necessary APIs are enabled
✔  runtimeconfig: all necessary APIs are enabled
i  functions: preparing functions directory for uploading...

Error: An unexpected error has occurred.

Any idea what the problem could be?

Copied from original issue: firebase/codelab-friendlychat-web#222

Codelab Step 7 - Messages never load

After completing Step 7 and updating the database in the Firebase console, the loading spinner is never hidden and the messages never load. The same happens with the completed sample app friendlychat-android/android/.

Image upload doesn't work

After choosing the image to be uploaded, it just shows the spinner indefinitely. The errors mention that "Firebase Storage should be enabled", so once enabled, the image upload works.

This is the error stack trace:

E/StorageException: StorageException has occurred.
                    An unknown error occurred, please check the HTTP result code and inner exception for server response.
                     Code: -13000 HttpResult: 400
E/StorageException: The server has terminated the upload session
                    java.io.IOException: The server has terminated the upload session
                        at com.google.firebase.storage.UploadTask.zzs(Unknown Source:20)
                        at com.google.firebase.storage.UploadTask.zzr(Unknown Source:57)
                        at com.google.firebase.storage.UploadTask.run(Unknown Source:167)
                        at com.google.firebase.storage.StorageTask.zzl(Unknown Source:0)
                        at com.google.firebase.storage.zzq.run(Unknown Source:2)
                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
                        at java.lang.Thread.run(Thread.java:764)
                     Caused by: java.io.IOException: {  "error": {    "code": 400,    "message": "Permission denied. Could not access bucket friendlychat-46567.appspot.com. Please enable Firebase Storage for your bucket by visiting the Storage tab in the Firebase Console and ensure that you have sufficient permission to properly provision resources."  }}
                        at bha.a(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (040400-194189626):147)
                        at bha.a(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (040400-194189626):119)
                        at bgu.onTransact(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (040400-194189626):7)
                        at android.os.Binder.transact(Binder.java:627)
                        at com.google.android.gms.internal.firebase_storage.zza.transactAndReadExceptionReturnVoid(Unknown Source:7)
                        at com.google.android.gms.internal.firebase_storage.zzm.zzf(Unknown Source:8)
                        at com.google.android.gms.internal.firebase_storage.zzq.zza(Unknown Source:41)
                        at com.google.android.gms.internal.firebase_storage.zzf.zza(Unknown Source:27)
                        at com.google.firebase.storage.UploadTask.zzc(Unknown Source:3)
                        at com.google.firebase.storage.UploadTask.run(Unknown Source:128)
                        at com.google.firebase.storage.StorageTask.zzl(Unknown Source:0) 
                        at com.google.firebase.storage.zzq.run(Unknown Source:2) 
                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
                        at java.lang.Thread.run(Thread.java:764) 
                    StorageException has occurred.
                    An unknown error occurred, please check the HTTP result code and inner exception for server response.
                     Code: -13000 HttpResult: 400
E/StorageException: The server has terminated the upload session
                    java.io.IOException: The server has terminated the upload session
                        at com.google.firebase.storage.UploadTask.zzs(Unknown Source:20)
                        at com.google.firebase.storage.UploadTask.zzr(Unknown Source:57)
                        at com.google.firebase.storage.UploadTask.run(Unknown Source:167)
                        at com.google.firebase.storage.StorageTask.zzl(Unknown Source:0)
                        at com.google.firebase.storage.zzq.run(Unknown Source:2)
                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
                        at java.lang.Thread.run(Thread.java:764)
                     Caused by: java.io.IOException: {  "error": {    "code": 400,    "message": "Permission denied. Could not access bucket friendlychat-46567.appspot.com. Please enable Firebase Storage for your bucket by visiting the Storage tab in the Firebase Console and ensure that you have sufficient permission to properly provision resources."  }}
                        at bha.a(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (040400-194189626):147)
                        at bha.a(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (040400-194189626):119)
                        at bgu.onTransact(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (040400-194189626):7)
                        at android.os.Binder.transact(Binder.java:627)
                        at com.google.android.gms.internal.firebase_storage.zza.transactAndReadExceptionReturnVoid(Unknown Source:7)
                        at com.google.android.gms.internal.firebase_storage.zzm.zzf(Unknown Source:8)
                        at com.google.android.gms.internal.firebase_storage.zzq.zza(Unknown Source:41)
                        at com.google.android.gms.internal.firebase_storage.zzf.zza(Unknown Source:27)
                        at com.google.firebase.storage.UploadTask.zzc(Unknown Source:3)
                        at com.google.firebase.storage.UploadTask.run(Unknown Source:128)
                        at com.google.firebase.storage.StorageTask.zzl(Unknown Source:0) 
                        at com.google.firebase.storage.zzq.run(Unknown Source:2) 
                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
                        at java.lang.Thread.run(Thread.java:764) 
E/StorageException: StorageException has occurred.
                    An unknown error occurred, please check the HTTP result code and inner exception for server response.
                     Code: -13000 HttpResult: 400
E/StorageException: The server has terminated the upload session
                    java.io.IOException: The server has terminated the upload session
                        at com.google.firebase.storage.UploadTask.zzs(Unknown Source:20)
                        at com.google.firebase.storage.UploadTask.zzr(Unknown Source:57)
                        at com.google.firebase.storage.UploadTask.run(Unknown Source:167)
                        at com.google.firebase.storage.StorageTask.zzl(Unknown Source:0)
                        at com.google.firebase.storage.zzq.run(Unknown Source:2)
                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
                        at java.lang.Thread.run(Thread.java:764)
                     Caused by: java.io.IOException: {  "error": {    "code": 400,    "message": "Permission denied. Could not access bucket friendlychat-46567.appspot.com. Please enable Firebase Storage for your bucket by visiting the Storage tab in the Firebase Console and ensure that you have sufficient permission to properly provision resources."  }}
                        at bha.a(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (040400-194189626):147)
                        at bha.a(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (040400-194189626):119)
                        at bgu.onTransact(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (040400-194189626):7)
                        at android.os.Binder.transact(Binder.java:627)
                        at com.google.android.gms.internal.firebase_storage.zza.transactAndReadExceptionReturnVoid(Unknown Source:7)
                        at com.google.android.gms.internal.firebase_storage.zzm.zzf(Unknown Source:8)
                        at com.google.android.gms.internal.firebase_storage.zzq.zza(Unknown Source:41)
                        at com.google.android.gms.internal.firebase_storage.zzf.zza(Unknown Source:27)
                        at com.google.firebase.storage.UploadTask.zzc(Unknown Source:3)
                        at com.google.firebase.storage.UploadTask.run(Unknown Source:128)
                        at com.google.firebase.storage.StorageTask.zzl(Unknown Source:0) 
                        at com.google.firebase.storage.zzq.run(Unknown Source:2) 
                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
                        at java.lang.Thread.run(Thread.java:764) 
W/MainActivity: Image upload task was not successful.
                com.google.firebase.storage.StorageException: An unknown error occurred, please check the HTTP result code and inner exception for server response.
                    at com.google.firebase.storage.UploadTask.zza(Unknown Source:13)
                    at com.google.firebase.storage.StorageTask.zzh(Unknown Source:3)
                    at com.google.firebase.storage.StorageTask.zzi(Unknown Source:19)
                    at com.google.firebase.storage.StorageTask.getException(Unknown Source:0)
                    at com.google.firebase.codelab.friendlychat.MainActivity$7.onComplete(MainActivity.java:380)
                    at com.google.firebase.storage.zzl.zza(Unknown Source:11)
                    at com.google.firebase.storage.zzaa.run(Unknown Source:10)
                    at android.os.Handler.handleCallback(Handler.java:790)
                    at android.os.Handler.dispatchMessage(Handler.java:99)
                    at android.os.Looper.loop(Looper.java:164)
                    at android.app.ActivityThread.main(ActivityThread.java:6494)
                    at java.lang.reflect.Method.invoke(Native Method)
                    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
                 Caused by: java.io.IOException: The server has terminated the upload session
                    at com.google.firebase.storage.UploadTask.zzs(Unknown Source:20)
                    at com.google.firebase.storage.UploadTask.zzr(Unknown Source:57)
                    at com.google.firebase.storage.UploadTask.run(Unknown Source:167)
                    at com.google.firebase.storage.StorageTask.zzl(Unknown Source:0)
                    at com.google.firebase.storage.zzq.run(Unknown Source:2)
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
                    at java.lang.Thread.run(Thread.java:764)
                 Caused by: java.io.IOException: {  "error": {    "code": 400,    "message": "Permission denied. Could not access bucket friendlychat-46567.appspot.com. Please enable Firebase Storage for your bucket by visiting the Storage tab in the Firebase Console and ensure that you have sufficient permission to properly provision resources."  }}
                    at bha.a(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (040400-194189626):147)
                    at bha.a(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (040400-194189626):119)
                    at bgu.onTransact(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (040400-194189626):7)
                    at android.os.Binder.transact(Binder.java:627)
                    at com.google.android.gms.internal.firebase_storage.zza.transactAndReadExceptionReturnVoid(Unknown Source:7)
                    at com.google.android.gms.internal.firebase_storage.zzm.zzf(Unknown Source:8)
                    at com.google.android.gms.internal.firebase_storage.zzq.zza(Unknown Source:41)
                    at com.google.android.gms.internal.firebase_storage.zzf.zza(Unknown Source:27)
                    at com.google.firebase.storage.UploadTask.zzc(Unknown Source:3)
                    at com.google.firebase.storage.UploadTask.run(Unknown Source:128)
                    at com.google.firebase.storage.StorageTask.zzl(Unknown Source:0) 
                    at com.google.firebase.storage.zzq.run(Unknown Source:2) 
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
                    at java.lang.Thread.run(Thread.java:764) 

Firebase Android Codelab step 7

From @krzysiekbielicki on December 15, 2016 11:23

Modify your MainActivity's onCreate method, replace mProgressBar.setVisibility(ProgressBar.INVISIBLE); with the code defined below. This code initially adds all existing messages then listens for new child entries under the messages path in your Firebase Realtime Database. It adds a new element to the UI for each message:
code ends with:
mMessageRecyclerView.setLayoutManager(mLinearLayoutManager); mMessageRecyclerView.setAdapter(mFirebaseAdapter);

LayoutManager was already set in line 146

Copied from original issue: firebase/codelab-friendlychat-web#127

Missing new FirebaseRecyclerAdapter lifecycle methods

As of FirebaseUI 3.0, the FirebaseRecyclerAdapter requires calls to startListening() to begin listening for data. Similarly, the stopListening() call removes the event listener and all data in the adapter. These calls are missing from the examples and the code lab, and thus step 7 doesn't automatically begin loading data.

See the FirebaseRecyclerAdapter lifecycle documentation and the FirebaseUI 3.0 upgrade guide and this question on StackOverflow for further details.

IntentService has ambiguous method

From @IgorGanapolsky on December 28, 2016 21:28

Your codelab says:

Note: It helps to add an IntentService that establishes a base index of all messages for you initially. See details in the App Indexing documentation.

However, AppIndexingService just has an ambiguous method: getAllRecipes(). It is not clear what to do with this method, or what your codelab meant for the users to put into IntentService above.

Also, what does

base index of all messages

actually mean? Does Firebase work faster with indexes, just like Oracle and SqlServer do?

Can you please explain?

Copied from original issue: firebase/codelab-friendlychat-web#136

Conflict in dependencies

AGPBI: {"kind":"error","text":"Program type already present: com.google.android.gms.internal.measurement.zzwo","sources":[{}],"tool":"D8"}
:app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/0.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/1.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/2.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/3.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/5.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/6.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/7.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/8.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/9.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/10.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/11.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/12.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/13.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/14.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/15.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/16.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/17.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/18.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/19.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/20.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/21.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/22.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/23.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/24.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/25.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/26.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/27.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/28.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/29.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/30.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/31.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/32.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/33.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/34.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/35.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/36.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/37.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/38.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/39.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/40.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/41.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/42.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/43.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/44.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/45.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/46.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/47.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/49.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/50.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/51.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/52.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/53.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/54.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/55.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/56.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/57.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/58.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/59.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/60.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/61.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/62.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/63.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/64.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/65.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/66.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/67.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/68.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/69.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/70.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/71.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/74.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/75.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/76.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/77.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/78.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/79.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/80.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/81.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/82.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/83.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/84.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/85.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/86.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/87.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/88.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/89.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/90.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/91.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/92.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/93.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/94.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/95.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/96.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/97.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/98.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/99.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/100.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/101.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/102.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/103.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/104.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/105.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/106.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/107.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/108.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/109.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/110.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/111.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/112.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/113.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/114.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/115.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/116.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/117.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/118.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/119.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/120.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/121.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/122.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/123.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/124.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/125.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/126.jar, /home/yaraki/src/friendlychat-android/android/app/build/intermediates/transforms/dexBuilder/debug/127.jar
Program type already present: com.google.android.gms.internal.measurement.zzwo

Step 4: Gradle project sync failed, Failed to resolve: viewmodel and Failed to resolve: runtime

I received those fail messages during sync.
image

When you face this issue. You meed to change the repository order of repositories in Project level build:gradle

`buildscript {
repositories {
google()
jcenter()
mavenLocal()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.1'
classpath 'io.fabric.tools:gradle:1.24.4'
}
}

allprojects {
repositories {
google()
jcenter()
mavenLocal()
}
}`

Reference: https://stackoverflow.com/a/50563942/8050752

Correct the part that may cause some confusion.

https://codelabs.developers.google.com/codelabs/firebase-android/#8

AS-IS 

...

@OverRide
protected void populateViewHolder(final MessageViewHolder viewHolder, FriendlyMessage friendlyMessage, int position) {

...
// write this message to the on-device index
FirebaseAppIndex.getInstance().update(getMessageIndexable(friendlyMessage));

// log a view action on it
FirebaseUserActions.getInstance().end(getMessageViewAction(friendlyMessage));
}

TO-BE

...

@OverRide
protected void populateViewHolder(final MessageViewHolder viewHolder, FriendlyMessage friendlyMessage, int position) {

...
if (friendlyMessage.getText() != null) {
// write this message to the on-device index
FirebaseAppIndex.getInstance().update(getMessageIndexable(friendlyMessage));
}

// log a view action on it
FirebaseUserActions.getInstance().end(getMessageViewAction(friendlyMessage));
}

no xml filess

after cloning the project says that it does not use a grande system then suggest i migrate this project but I'm not sure can someone help

Deprecated code

Hi,

I've just come back to get over the tutorial again and I found that the way that create FirebaseRecyclerAdapter has been changed in firebase-ui-database:3.0.0.

another thing is AppInvite is deprecated and when I tried to follow the tutorial I don't understand that why do we need to add AppInvite.API to GoogleApiClient.Builder because I didn't see that we use GoogleApiClient to invite friends (Do I miss understand?).

That all what I recognize. please apologize me if I miss understand.

-Thank

android-starter - Step 7 Read Messages - Auto Import

Issues with pasted code for classes without an import, SnapshotParser, LayoutInflater, etc, requires the user to find the un-imported classes.

If a user does not have Auto Import enabled for All (default is Ask), manually have to click each class and add the import.

Is there a need to make a reference to this in the instructions or have a step for the user to paste all the necessary imports?

Friendly chat developer tutorial section 6

From @el-samiyel on August 11, 2016 23:14

Hi,
Regarding "https://codelabs.developers.google.com/codelabs/firebase-android/#5"
When I reach stage 6 - "Then add a new case to onOptionsItemSelected() to handle the sign out button:"

@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.sign_out_menu: mFirebaseAuth.signOut(); Auth.GoogleSignInApi.signOut(mGoogleApiClient); mUsername = ANONYMOUS; startActivity(new Intent(this, SignInActivity.class)); return true; default: return super.onOptionsItemSelected(item); } }

line:
mFirebaseAuth.signOut(); shows error "Unreachable statment".

Why is this?

Many Thanks

Copied from original issue: firebase/codelab-friendlychat-web#69

9. Add Messages to the On-device Index

My google search app not found information in my apps tap,

I am using compile 'com.google.firebase:firebase-appindexing:10.2.1' like the example

and too, I am trying to update with this link https://firebase.google.com/docs/app-indexing/android/migrate that using compile 'com.google.firebase:firebase-appindexing:10.2.6'

but I not found the next function in the codelab example https://codelabs.developers.google.com/codelabs/firebase-android/#8

  //Before
  public Action getAction() {
   Thing object = new Thing.Builder()
    .setName(mText)
    .setUrl(mUrl)
    .build();

  return new Action.Builder(Action.TYPE_VIEW)
    .setObject(object)
    .build();
 }
  

  // After
 public Action getAction() {
     return Actions.newView(mText, mUrl);
 }

best regards

Chat Application - Sign In Problem in Real Device

From @dylanver2 on August 30, 2016 8:54

My app is working with the emulator but not in real device. I installed the signed APK and at the login screen i am stucked with the sign in button. Select an account and nothing happens.

I tried to connect my device via USB tested and it worked. App is currently working on my phone just because I connected it to USB and run it for debugging. Does this mean there's something wrong with my APK?

Copied from original issue: firebase/codelab-friendlychat-web#82

FirebaseInstanceIdService is deprecated

The FirebaseInstanceIdService class has been deprecated in version 17.1.0. Consequently, the MyFirebaseInstanceIdService class in step 10 is no longer necessary and should be removed.
The code in onTokenRefresh() should be moved to onNewToken() from the MyFirebaseMessagingService class.

Miss import package

There is some miss firebase.ui modules and android modules not imported in the program

Like the View of android
Snapshot in the firebase.ui

can fix by myself

Extra curly brace needs to be removed in sample code

capture

section 9:

@Override
protected void onBindViewHolder(final MessageViewHolder viewHolder, FriendlyMessage friendlyMessage, int position) {

...
if (friendlyMessage.getText() != null) {
    // write this message to the on-device index
    FirebaseAppIndex.getInstance()
            .update(getMessageIndexable(friendlyMessage));
} >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> needs to be removed. 

// log a view action on it
FirebaseUserActions.getInstance().end(getMessageViewAction(friendlyMessage));
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.