samples icon indicating copy to clipboard operation
samples copied to clipboard

Android, press back button, E/ActivityThread: Activity com.myapp.Activities.Inbox has leaked IntentReceiver

Open kvnramirez opened this issue 6 years ago • 4 comments

Hi I'm using the sample to make my own application, the problem that I have is that when I'm on a chat activity displaying all the messages, and I press back buttons, it throws me an error:

E/ActivityThread: Activity com.myapp.Activities.Inbox has leaked IntentReceiver com.mesibo.api.GenericReceiver@c4650f8 that was originally registered here. Are you missing a call to unregisterReceiver()?

E/ActivityThread: Activity com.myapp.Activities.Inbox has leaked IntentReceiver com.mesibo.api.NetworkStateReceiver@fda1d55 that was originally registered here. Are you missing a call to unregisterReceiver()?

I need to implement an extra method on my onBackPressed()? Why is throwing that error?

I believe that your API reference needs more specifications about methods because is hard to find the status codes, message status codes, etc.

kvnramirez avatar Apr 27 '19 04:04 kvnramirez

Kevin,

Can you send more details about the API version, Android OS, and device. I also suggest you look at https://github.com/mesibo/messenger-app-android which is a full sample app. Additionally, we are soon replacing Activity with Fragment which you can easily customize, the updated sample is expected to release by end of the next week.

The API reference document is updatinG. However, let us know anything specific and we will revert swiftly.

Tom

mesibo avatar Apr 27 '19 04:04 mesibo

Shure, here is the data:

compileSdkVersion 28 minSdkVersion 19 targetSdkVersion 26

Android OS: Android 7.1.1 AVD Nexus 5

Using:

com.mesibo.api:mesibo:1.0.77

kvnramirez avatar Apr 27 '19 15:04 kvnramirez

Recommended initializing Mesibo from Application class rather than Activity/Fragment.

mesibo avatar May 10 '19 13:05 mesibo

Yes in fact that's the only way to avoid that error because initialization doesn't seems to work correctly con Activities or Fragments.

kvnramirez avatar May 13 '19 15:05 kvnramirez