![]() ![]() make the shortcut to always ask for your permission when you double-click on it. The workaround via an activity is one solution for this problem that works. For more information, see System Restore: frequently asked questions. 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. Intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, icon) 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) If the user selects Permit, the operation continues with the users highest available privilege. When an operation for a non-Microsoft application requires elevation of privilege, the user is prompted on the secure desktop to select Permit or Deny. It can return an intent like following: Intent intent = new Intent() Prompt for consent for non-Windows binaries. think about a third party app that offers a direct call shortcut. Until last week I wasn’t aware, that when I use specific permissions to access data sources (SharePoint in that case) inside my app, the end user who is going to use that app will be asked for permissions, to be able to use that application. In the bottom left corner of the text box, enter the Control Panel and select the desired app from the proposed list. 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. I’m a big fan of working with PowerApps and creating business solutions using that tool. 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.). You have to check for updates or contact the manufacturer. If the problem persists, it is probably a legacy program that is not adapted to non-admin environments, or a badly designed application. some system launcher shortcuts often only work in the system launcher itself, as they sometimes require some self defined permission). First of all, open the shortcut properties, click the Advanced button, and see if the 'Run as administrator' checkbox is unchecked. Some apps just assume that the caller of their shortcuts have some permissions (e.g. ![]()
0 Comments
Leave a Reply. |