mirror of
https://github.com/TrianguloY/UrlChecker.git
synced 2024-09-20 04:12:14 +02:00
parent
b594e27b84
commit
1adf96e31f
@ -83,6 +83,9 @@
|
|||||||
<action android:name="android.intent.action.CREATE_SHORTCUT" />
|
<action android:name="android.intent.action.CREATE_SHORTCUT" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<service
|
<service
|
||||||
|
@ -35,8 +35,9 @@ public class ShortcutsActivity extends Activity {
|
|||||||
if (Intent.ACTION_CREATE_SHORTCUT.equals(getIntent().getAction())) {
|
if (Intent.ACTION_CREATE_SHORTCUT.equals(getIntent().getAction())) {
|
||||||
// old android method
|
// old android method
|
||||||
setResult(RESULT_OK, new Intent()
|
setResult(RESULT_OK, new Intent()
|
||||||
.putExtra(Intent.EXTRA_SHORTCUT_INTENT, new Intent(this, getClass()))
|
.putExtra(Intent.EXTRA_SHORTCUT_INTENT, new Intent(this, getClass())
|
||||||
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
.setAction(Intent.ACTION_VIEW)
|
||||||
|
)
|
||||||
.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(R.string.shortcut_checkClipboard))
|
.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(R.string.shortcut_checkClipboard))
|
||||||
.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(this, R.mipmap.clipboard_launcher))
|
.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(this, R.mipmap.clipboard_launcher))
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user