Appcelerator Android CloudPush - callback is called but notification isn't cleared - android

I tested with SDK 5.1.1 on my Android 5.0.2 - HTC One M7.
The issue:
With ti.cloudpush, if I receive a notification but leave it there without clicking it. Instead I launch my app from launcher. Then the callback function is called but the notification isn't cleared. If later I click the notification, it will launch the app but no callback is called.
Can anyone confirm this behavior? I filed a jira ticket here, but Appc Team kept saying they couldn't re-produce.
Sample code and my configuration are in the jira ticket above. Please test and let me know if it's just me or a bug. Thanks!

As a workaround, you might be able to clear the notifications by calling http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Android.NotificationManager-method-cancelAll from the callback.

Related

Google Cloud Messaging - onRegistered not called on Android 9.0 Pie

Before I begin, I understand that GCM is depreciated, but due to time and resource constraints on this ticket, I don't think migrating to FCM is feasible at this juncture. I didn't write the app (the contractor who did it is long-gone by now), I just need to fix it if possible. If it's not possible without doing a migration, I'd like to just relay that information onwards instead of continuing to bash my head against this any longer.
My question, in short, is this: Was there anything introduced in Android 9.0 (API 28) that would preclude the GCM registration process from working? The app works fine on all preceding versions of Android, but not Pie.
More info: When the app starts on a fresh 9.0 device, a call to GCMRegistrar.getRegistrationId() is made. It returns a blank string, as expected. Intent filters are created, receiver is registered, etc. Finally, a call to GCMRegistrar.register() is made. On every other version of Android, I get a response with a registration token that gets fielded in the onRegistered method in the GCMIntentService class. For some reason, this callback method is never called on devices running Pie.
What I've tried: Already updated play-services-gcm to v16.0.0. Min sdk is 14. Target is 28. Ran some debug broadcasts that target my receiver, it still functions. Still can't find a good reason why onRegistered suddenly isn't being called on this version of Android.
I'm more or less unconcerned about the code and/or manifest because, again, it has been chugging along fine on hundreds of devices for many years now. Did Google just cut life support for GCM registration at the OS level with Pie or something? If not, are there Pie-specific changes that need to be made to get it to work? Looking at Google's documentation, their solution seems to be "migrate to FCM", but as I mentioned before, that's not an option at the moment.
As I mentioned in my comment, the rollout isn't supposed to come to full fruition until April of 2019. With that said, it's hard to say without code, but depending on your implementation and that you mentioned the GCMIntentService it could have something to do with the changes to how background Services are allowed to run in Android Pie. See this post for more details.
Check your logcat to see if you get any errors when trying to start the Service during the registration process.

aprirtc call_crossing_detected error when calling from android to android

My ionic angularjs corodova app works great when receiving calls from the demo web page on chrome. When I try to initiate a call to the demo site or another device, whether using demo API key or real api key, i get
call_crossing_detected
What does this mean, and how do you fix it?
More details on symptoms. When this occurs, no video comes up and the initiating device shows the error and the call button remains. But the receiving device switches to the hangup button, which then works. And if you speak into either device the receiving device receives the audio, but nothing on the initiating device
"call_crossing_detected" reason appears on hangup event when a call is already established between the two users and you are trying to establish a new one.
So I think you may have an issue on the first call hangup.
I have resolved this issue. It was caused by apiRTC.init executing more than once.

How to access call log or call event on android and iphone while building cordova apps

I had posted a similar question
How to access sms's or call logs on devices with cordova apps
and based on that we have no permission to access call logs.
How does Truecaller access call logs or call events - on Android it shows who is calling and on iphone the number is detected by the app after call and then it shows who called.
Can we do the same for Cordova apps?
I did find a cordova-calllog-plugin to access device call history. Hope this should help, not tried personally though.
Also looking at the following link, i guess its definitely possible to acheive this in corodva apps

How to know if the programmatically install/update of my app is successfull

I'm currently create an application that have the possibility to updated from own code thanks to a downloaded .apk from a server.
I would like to know if the update/Install of the app is successfull. Because currently the update working fine but i don't know if the installation/update is ok or not, if the installation face a problem or if the user cancel install or somethings else. So i need to have a callback "installFinish(boolean isOk)".
i search for a day but i don't find solution for my problem.
I read lot of things, particulary this :
How to find out when an installation is completed
or this :
Android - Install Application programmatically with result
but is not what i seach.
This is my code for update my app
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file.getAbsoluteFile()), "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
((Activity) context).startActivity(intent);
EDIT
I tried this https://stackoverflow.com/questions/29175722/how-to-get-onactivityresult-called-from-action-view-intent
but it's not working for me for two reason i think:
I don't know whether the user pressed Cancel
onActivityResult is never call after updated the same app, maybe because it's the same app which updated the app who launch the intent is kill. ?
Maybe the last reason it's the same reason why i don't receive broadcastevent such as listening for ACTION_PACKAGE_ADDED in the app who launch the update.
Maybe i can call the method when the first time the application is launch, it's like install is successfully because the app is started.
Heres a work around which we use:
Implement a dummy provider and override onUpgrade().onUpgrade is called whenever database is upgraded.U will need maintain one to one mapping between database version and app version.

Sending data to server when android application is unistalled

I would like to notify my server that the user deleted the application. How can I accomplish this?
Get application uninstall event in android
According to this post what you ask for is not possible. Are you by any chance using a C2DM implementation?
Unfortunately there is currently no way for an Android package to execute code when it is removed. However, you can register a BroadcastReceiver for ACTION_PACKAGE_REMOVED in a different package that will be called when packages are removed from the phone.
Also see this question.

Categories

Resources