mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2025-12-15 10:53:22 +00:00
Added customisable notification icon for Android
This commit is contained in:
@@ -205,12 +205,12 @@ public class ForegroundService extends Service {
|
||||
* The resource ID of the app icon
|
||||
*/
|
||||
private int getIconResId() {
|
||||
JSONObject settings = BackgroundMode.getSettings();
|
||||
Context context = getApplicationContext();
|
||||
Resources res = context.getResources();
|
||||
String pkgName = context.getPackageName();
|
||||
|
||||
int resId;
|
||||
resId = res.getIdentifier("icon", "drawable", pkgName);
|
||||
int resId = res.getIdentifier(settings.optString("icon", "icon"), "drawable", pkgName);
|
||||
|
||||
return resId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user