diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a627c9f..6aacf7b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,10 +1,10 @@ - - - + = + context.packageManager?.getInstalledApplications(PackageManager.GET_META_DATA) as MutableList + var pck: String = "com.google.android.deskclock" + for (app in apps) { + if (app.packageName.contains("deskclock")) pck = app.packageName + } + return context.packageManager.getLaunchIntentForPackage(pck) +} fun getPendingIntent(context: Context) : PendingIntent { // Create an Intent to launch OpenActivity