Rapsssito / react-native-background-actions

React Native background service library for running background tasks forever in Android & iOS.
MIT License
818 stars 117 forks source link

taskIcon #245

Open muramidaza opened 1 month ago

muramidaza commented 1 month ago

In Android 13, the notification panel is not displayed. And the icon shows a color circle without an application icon. My configuration:

 const options = {
    taskName: 'GetHealthHistory',
    taskTitle: 'Дистанционный мониторинг',
    taskDesc: 'Получение истории измерений',
    taskIcon: {
      name: 'ic_launcher_round',
      type: 'mipmap',
    },
    color: '#ff00ff',
    linkingURI: 'healthMonitoringMainScreen://monitor',
    parameters: {
      delay: 1200000,
    },
  };

Starting background:

await BackgroundService.start(getDataFromWatch, options);

But in the notification panel - the icon is displayed as a colored circle with color '#ff00ff'

The icons are in the folders:

2024-10-10_16-21-42

What resolution should the icon be? And in which folder should it be located?

And another problem in android 13 there is no notification panel - it seems like all permissions are enabled

My permission

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-feature android:name="android.hardware.bluetooth_le" android:required="true" />
    <uses-permission android:name="android.permission.BLUETOOTH" tools:remove="android:maxSdkVersion" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" tools:remove="android:maxSdkVersion" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:maxSdkVersion="28" />
    <uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="30" />
    <uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation" />
    <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
Qurat-ul-ainn commented 4 weeks ago

Do you find any solution?

muramidaza commented 1 week ago

As I understand it, the icon is displayed in some versions of Android. In some it is, in some it is not. In android 14 have