[AC-2484] Ti.CloudPush Version 3.2.0 get Force Close when Unlock Phone on Android 4.4
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-01-10T17:28:53.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | 3.2.0, android, sdk, ti.cloudpush |
Reporter | Anh Nguyen |
Assignee | Jon Alter |
Created | 2013-12-27T16:36:03.000+0000 |
Updated | 2016-03-08T07:41:32.000+0000 |
Description
Using: Ti.CloudPush Module Version 3.2.0
Last used: Ti.CloudPush Module Version 2.3.2
The App will be Force Closed when Lock then Unlock the phone. On the Console when I debug, looks like this:
{quote}
[ERROR] : TiApplication: (main) [33375,66355] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to instantiate receiver ti.cloudpush.MQTTReceiver: java.lang.ClassNotFoundException: Didn't find class "ti.cloudpush.MQTTReceiver" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.mycom.myapp.apk"],nativeLibraryDirectories=[/data/app-lib/com.mycom.myapp, /vendor/lib, /system/lib]]; Titanium 3.2.0,2013/12/20 10:57,d9182d6
[ERROR] : TiApplication: java.lang.RuntimeException: Unable to instantiate receiver ti.cloudpush.MQTTReceiver: java.lang.ClassNotFoundException: Didn't find class "ti.cloudpush.MQTTReceiver" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.mycom.myapp.apk"],nativeLibraryDirectories=[/data/app-lib/com.mycom.myapp, /vendor/lib, /system/lib]]
[ERROR] : TiApplication: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2400)
[ERROR] : TiApplication: at android.app.ActivityThread.access$1700(ActivityThread.java:135)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:136)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5017)
[ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:515)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
[ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)
[ERROR] : TiApplication: Caused by: java.lang.ClassNotFoundException: Didn't find class "ti.cloudpush.MQTTReceiver" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.mycom.myapp.apk"],nativeLibraryDirectories=[/data/app-lib/com.app/com.mycom.myapp, /vendor/lib, /system/lib]]
[ERROR] : TiApplication: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
[ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
[ERROR] : TiApplication: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2395)
[ERROR] : TiApplication: ... 10 more
{quote}
When I go back to older version (2.3.2) the app won't get force close any more
As of Release 3.2.0, the CloudPush module only supports Google Cloud Messaging (GCM) for push notifications. MQTT support is deprecated and support was removed in Release 3.2.0. Upgrade your application to use the GCM protocol. MQTT protocol support deprecation was announced back in August and it has finally been removed. http://www.appcelerator.com/blog/2013/08/android-push-notification-deprecating-mqtt-in-favor-of-gcm/ Please update your application to use GCM protocol and let us know if you run into an issue.
I am using GCM not MQTT I have started build my app in TitaniumSDK 3.1 I am using payload and push the Payload to Device by TokenDevice
Reopening this ticket based on the latest feedback from the reporter.
Hi [~anh.nguyen] - If you delete the app from your device and reinstall it, do you still get this error?
Yes, I still get that error. I am now rollback to version 2.3.2. and waiting for a proposal to fix this bug. I saw many new features in 3.2.0 and really want to use those features
Can you send me the contents of your "app/build/android/AndroidManifest.xml" file? Thank you.
[~anh.nguyen] - It seems that something is hanging around from the older version of the module. To ensure that is not the case, please try the following:
Make sure that there is only one version of the module included in your
tiapp.xml
.Delete the application from your device.
Do a clean build of your application. This means deleting the "build" folder and building your application.
Let me know how it goes!I have re-checked my Customized AndroidManifest.xml file and seen one property look like this:
Hi Jon Alter, after I deleted 2 attributes that correspond to MQTTReceiver I did not see Group notification any more. Now all Notifications show in multiple Notifications. Do you know what could be the reason? Appreciate your help.
Oh there we go. Remove your custom AndroidManifest from your app so that it can generate a new one. Build the app once and then use the new manifest in "build/android" as the basis for your custom manifest. Changes where made to what the module needs in the manifest and the custom manifest is over riding that. You're very welcome. Let me know how it goes.
Thank you, It works now