diff --git a/app/build/outputs/apk/debug/app-debug.apk b/app/build/outputs/apk/debug/app-debug.apk index 87600f1..63dba17 100644 Binary files a/app/build/outputs/apk/debug/app-debug.apk and b/app/build/outputs/apk/debug/app-debug.apk differ diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e33582d..1841b9b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,6 +17,7 @@ android:exported="true"> + diff --git a/app/src/main/java/info/burguillos/bi/MainActivity.java b/app/src/main/java/info/burguillos/bi/MainActivity.java index 3258d7f..7cabb18 100644 --- a/app/src/main/java/info/burguillos/bi/MainActivity.java +++ b/app/src/main/java/info/burguillos/bi/MainActivity.java @@ -84,7 +84,7 @@ public class MainActivity extends AppCompatActivity { return; } Intent targetIntent = new Intent(MainActivity.this.getApplicationContext(), MainActivity.class); - targetIntent.setAction(Intent.ACTION_DEFAULT); + targetIntent.setAction(Intent.ACTION_VIEW); targetIntent.putExtra("url", url); Log.w("BurguillosInfo", "Created intent " + url + " " + shortLabel); @@ -100,17 +100,7 @@ public class MainActivity extends AppCompatActivity { .build(); Log.w("BurguillosInfo", "Built pin."); - Intent pinnedShortcutCallbackIntent = - shortcutManager.createShortcutResultIntent(pinShortcutInfo); - Log.w("BurguillosInfo", "created pin."); - - PendingIntent successCallback = PendingIntent.getBroadcast(MainActivity.this, 0, - pinnedShortcutCallbackIntent, - PendingIntent.FLAG_IMMUTABLE); - Log.w("BurguillosInfo", "added success pin."); - - shortcutManager.requestPinShortcut(pinShortcutInfo, - successCallback.getIntentSender()); + shortcutManager.requestPinShortcut(pinShortcutInfo, null); Log.w("BurguillosInfo", "added request pin."); } }