Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25617] Android: Push notifications not shown in statusbar on Android 8 if app is backgrounded

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2018-01-16T18:07:16.000+0000
Affected Version/sRelease 7.0.0
Fix Version/sRelease 7.0.2
ComponentsAndroid
Labelsandroid, cloudpush, notifications
ReporterShuo Liang
AssigneeGary Mathews
Created2017-12-19T12:22:24.000+0000
Updated2018-02-06T18:26:43.000+0000

Description

Attachments

FileDateSize
Screenshot.png2018-01-06T04:08:13.000+000081729

Comments

  1. Joshua Quick 2017-12-22

    [~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...
       <?xml version="1.0" encoding="UTF-8"?>
       <ti:app xmlns:ti="http://ti.appcelerator.org">
       	<android xmlns:android="http://schemas.android.com/apk/res/android">
       		<manifest>
       			<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26"/>
       		</manifest>
       	</android>
       </ti:app>
       
    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.
  2. Gary Mathews 2018-01-08

    [~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.
  3. Gary Mathews 2018-01-11

    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
  4. Lokesh Choudhary 2018-01-12

    FR Passed. Waiting to get merged.
  5. Lokesh Choudhary 2018-01-16

    PR's merged.
  6. Lokesh Choudhary 2018-01-17

    Verified the fix with Cloudpush module 5.0.2. Closing.
  7. Christopher Williams 2018-02-06

    [~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

JSON Source