Hello,
It can't create the notification on this device.
I can see this in the logcat :
2023-01-08 14:35:23.881 24558-24558/com.smartdisplay W/Bundle: Key priority expected Integer but value was a java.lang.Double. The default value 0 was returned.
2023-01-08 14:35:23.881 24558-24558/com.smartdisplay W/Bundle: Attempt to cast generated internal exception:
java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Integer
at android.os.BaseBundle.getInt(BaseBundle.java:1255)
at android.os.BaseBundle.getInt(BaseBundle.java:1237)
at com.voximplant.foregroundservice.NotificationHelper.buildNotification(NotificationHelper.java:101)
at com.voximplant.foregroundservice.VIForegroundService.onStartCommand(VIForegroundService.java:31)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4655)
at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2180)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
2023-01-08 14:35:23.884 1648-1752/? V/ActivityManager: Attempted to start a foreground service (com.smartdisplay/com.voximplant.foregroundservice.VIForegroundService) with a broken notification (no icon: Notification(channel=ForegroundServiceChannel shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x40 color=0x00000000 actions=1 vis=PRIVATE))
I've tested on a Xiaomi 8, it works.
I really need it to be compatible with Android 13 👍
Service is declared like this in the manifest :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.smartdisplay">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application
...
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true"
android:saveEnabled="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
...
<service android:name="com.voximplant.foregroundservice.VIForegroundService"
android:foregroundServiceType="location"
android:exported="false">
</service>
...
</application>
</manifest>
... and I've integrate the test app inside my app as component.
Hello,
It can't create the notification on this device.
I can see this in the logcat :
I've tested on a Xiaomi 8, it works.
I really need it to be compatible with Android 13 👍
Service is declared like this in the manifest :
... and I've integrate the test app inside my app as component.