The workaround via an activity is one solution for this problem that works. This way, the calling app does not need any special permissions. This activity then can simply execute the Intent.ACTION_CALL intent itself and finishes itself afterwards. If the caller executes the shortcut, the MyPhoneCallActivity will be started - this runs inside the app itself and has all permissions of the shortcut provider. For example, if you want the Microsoft Photos app to be able to. ![]() Windows 11 allows you to set that app’s permissions using simple switches that you can enable or disable as you want. Due to employee resistance they then changed their mind and asked to remove that function. However, in other cases, some apps might ask for permissions to things they don’t really need or you don’t want to give them access to. In my case, the client insisted on geo information collection in the original design. Intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, icon) The 'official answer' is that when you use the Location function the app will ask the user for permission. Intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(pause != null ? (pause ? R.string.shortcut_pause : R.string.shortcut_resume) : R.string.shortcut_toggle_pause_resume)) Intent launchIntent = new Intent(this, MyPhoneCallActivity.class) Intent.ShortcutIconResource icon = (this, R.mipmap.icon) The app knows, that the caller may not have the call phone permission, so it does not return the direct phone call intent directly, but a custom one that it handles itself like e.g. This intent can ONLY be run by an app that has the action call permission Intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, launchIntent) Intent launchIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + number) This usually only happens the first time I run a newly installed game and it's kinda annoying that I have to give permission every single time. It can return an intent like following: Intent intent = new Intent() I bought the game on Epic Games and every time I launch it, a windows pops up saying that Rockstar Games Installer needs permission to make changes to the computer. think about a third party app that offers a direct call shortcut. I face this problem in an app of mine every now and then as well and catch the exception and tell the user, that the selected shortcut does not support other apps and is implemented in a wrong way.Įxample - shortcut to call someone that works and that does not workĮ.g. In general, any app that offers shortcuts, should run the code in itself instead of the calling app to be sure the required permissions are present, but apparently this is not the case in some apps (especially in launchers e.g.). some system launcher shortcuts often only work in the system launcher itself, as they sometimes require some self defined permission). You disable the notification for applications but unless you disable UAC in the registry (which will disable UWP applications) you will still be prompted to for permission if you are attempting to add/remove a file from a protected directory. ![]() ![]() Some apps just assume that the caller of their shortcuts have some permissions (e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |