App icon, shortcut icon, or widget on Android preset desktop

Source: Internet
Author: User

Please modify the Res/xml/default_workspace.xml file to add the following code:
<favorite
Launcher:packagename= ""//Full package name
Launcher:classname= ""//Full package name. Class name (the class that handles main intent)
Launcher:screen= ""//the screen where the app icon is located (starting from 0)
launcher:x= ""//The column where the app icon resides
Launcher:y= ""/>//The line where the app icon is located
<shortcut
Launcher:uri= "Http://www.baidu.com"
launcher:icon= "@drawable/ic_launcher_baidu"
launcher:title= "@string/baidu_title"
Launcher:screen= ""
Launcher:x= ""
Launcher:y= ""/>
<shortcut
Launcher:uri= "#Intent; action=android.intent.action.main;launchflags=0x10200000;component= Com.cleanmaster.mguard/com.cleanmaster.processcleaner.processcleaneractivity;end "
launcher:icon= "@drawable/ic_launcher_application"
launcher:title= "@string/jinshan_title"
Launcher:screen= ""
Launcher:x= ""
Launcher:y= ""/>
<appwidget
Launcher:packagename= "Com.android.settings"
Launcher:classname= "Com.android.settings.widget.SettingsAppWidgetProvider"
Launcher:screen= "3"
launcher:x= "0"
launcher:y= "0"
launcher:spanx= "4"//number of squares in x direction on the screen
launcher:spany= "1"//number of squares in Y-direction on the screen/>



1, can not be preset with configuration of the appwidget.
2, Google from KK began to limit the system permissions, for the access to systems have strict specifications. Launcher3 the system Bind_appwidget permission is not available by default, so the appwidget cannot be provisioned.
If you want to provision appwidget, you need Launcher3 to get system permissions, so to modify Launcher3 android.mk, add local_privileged_module: = True, The resulting launcher3.apk will be generated into the/system/priv-app directory and can be preset appwidget.
The specific code is written as follows:

3, if it is a carrier project, there will be resource_overlay mechanism, taking OP01/SPEC0200/SEGC as an example, the desktop preset content is based on the following path Default_workspace.xml:
ics/ics2:alps/mediatek/source/operator/op01/spec0200/segc/overlayresource/packages/apps/launcher2/res/xml/ Default_workspace.xml
Jb/jb2:alps/mediatek/operator/op01/spec0200/segc/overlayresource/packages/apps/launcher2/res/xml/default_ Workspace.xml
Other carrier projects are similar to this.

App icon, shortcut icon, or widget on Android preset desktop

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.