[TIMOB-25617] Android: Push notifications not shown in statusbar on Android 8 if app is backgrounded
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-01-16T18:07:16.000+0000 |
Affected Version/s | Release 7.0.0 |
Fix Version/s | Release 7.0.2 |
Components | Android |
Labels | android, cloudpush, notifications |
Reporter | Shuo Liang |
Assignee | Gary Mathews |
Created | 2017-12-19T12:22:24.000+0000 |
Updated | 2018-02-06T18:26:43.000+0000 |
Description
Attachments
File | Date | Size |
---|---|---|
Screenshot.png | 2018-01-06T04:08:13.000+0000 | 81729 |
[~sliang], Can you ask for the person's "tiapp.xml" file please? I ask because Titanium does not fully support "targeting" Android 8.x yet. We haven't resolved all of its breaking changes and notifications failing to post to the status bar is one of them (they now require us to use notification channels). However, notifications will work on Android 8.x if the Titanium app targets Android 7.x (aka: API Level 25) and below. Titanium targets Android 7.x by DEFAULT and will NEVER automatically target Android 8.x. But Titanium does allow customers to opt-in to targeting Android 8.x (which is experimental) via the "tiapp.xml" as follows...
So, if the customer is doing the above, then ask him/her to remove the "uses-sdk" XML element or drop the target API Level to "25". Also note that "ti.cloudpush" issue [NATIVESDK-352] has not been fixed yet either. So, if the app has been restored from backup on Android 6.0 or above, the app will never receive notifications again. I've posted code on that ticket that'll provide a work-around.
[~spulipakkam] "_miscellaneous_" is a reserved Android channel ID (see here https://developer.android.com/reference/android/app/NotificationChannel.html#DEFAULT_CHANNEL_ID). For compatibility with older Android apps that do not specify a channel ID. The user should not create a channel using this ID as this could interfere with the behavior of Android OS. Any other ID is fine.
aps_sdk: https://github.com/appcelerator/aps_sdk/pull/307 cloudpush: https://github.com/appcelerator-modules/cloudpush/pull/36 ti.cloudpush: https://github.com/appcelerator-modules/cloudpush/releases/tag/android-5.0.2
FR Passed. Waiting to get merged.
PR's merged.
Verified the fix with Cloudpush module
5.0.2
. Closing.[~eharris] That's because the file doesn't exist up on S3. Generally for non-private modules it's pretty easy to just point to the zipfile on Github itself, but this module is private she we need to manually push a copy to S3. To update the packaged version in the SDK: - Open a PR on titanium_mobile - Upload the cloudpush zip file to S3 - Update the pre-packaged modules listing. On 7_0_X it's fairly easy, just update the URL. On master we use hashes for integrity, so you can use the scans command I added to get that info:
./build> ./scons ssri https://s3.amazonaws.com/timobile.appcelerator.com/modules/ti.cloudpush-android-5.0.2.zip
Then stick that into support/modules/packaged/modules.json In any case, I've opened PRs for this on master/7_0_X: master: https://github.com/appcelerator/titanium_mobile/pull/9806 7_0_X: https://github.com/appcelerator/titanium_mobile/pull/9805