Android Question Legacy notifications: Still work under SDK 26 & 27 and Android 7.0

KMatle

Expert
Licensed User
Longtime User
Relating to this thread, notifications will not work without channels from SDK 26+:

https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/#content

On my Huawei Mate 10 with Android 7.0 and a test app with SDK 26 and 27 the legacy notifications still work. As I've understood, they should not work anymore:


B4X:
Dim n As Notification
    n.Initialize
    n.Icon = "icon"
    n.OnGoingEvent=False
    n.Light=True
    n.SetInfo2("FCM","Message sent: " & MyData.get("time"),"This is the tag", "Main")
    n.Vibrate=False
    n.Notify(1)

Is this a Huawei special?
 

DonManfred

Expert
Licensed User
Longtime User
with Android 7.0
Android 7.0 is 24. Even if you compiled your app against 27. The device is still api 24

https://developer.android.com/guide/topics/manifest/uses-sdk-element.html

Platform Version API Level VERSION_CODE Notes
Android 8.1 27 O_MR1 Platform Highlights
Android 8.0 26 O Platform Highlights
Android 7.1.1
Android 7.1
25 N_MR1 Platform Highlights
Android 7.0 24 N Platform Highlights

Setup a Emulator with the new SDK Manager with Android 8 and test it here.
 
Upvote 0
Top