调查 Study #116263
Launcher中创建网页快捷方式
Status: | 完成 Closed | Start date: | 2023-02-15 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | CD APP-王营 | % Done: | 0% | |
Category: | - | |||
Target version: | - |
Description
在桌面上创建一个快捷方式,点击后可以打开浏览器跳转到指定的网址。
History
#1 Updated by CD TPM-王祥林 over 2 years ago
背景:
客户想在桌面上搞一些快捷方式,通过浏览器跳转到指定的网址去下载一些他们推荐的安装应用。
#2 Updated by CD TPM-王祥林 over 2 years ago
目前调查到用这个方式可以往桌面添加快捷方式。有没有其他更好的方式待调查。
public void createShortcut() { ShortcutInfo pinShortcutInfo = new ShortcutInfo.Builder(this, "my-shortcut").setShortLabel("baidu").setLongLabel("Open the website").setIntent(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.baidu.com/"))).build(); Intent pinnedShortcutCallbackIntent = mShortcutManager.createShortcutResultIntent(pinShortcutInfo); PendingIntent successCallback = PendingIntent.getBroadcast(this, /* request code */ 0, pinnedShortcutCallbackIntent, /* flags */ PendingIntent.FLAG_IMMUTABLE); mShortcutManager.requestPinShortcut(pinShortcutInfo, successCallback.getIntentSender()); }
#3 Updated by CD TPM-王祥林 about 2 years ago
- Status changed from New to 完成 Closed
新增游戏中心已经创建开发票。
https://share.thundersoft.com/redmine/issues/117551