Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
一旦用户安装了我的 android 应用程序,我想将应用程序启动图标放在主屏幕上。即使用户没有打开应用程序,也应该这样做。我已经尝试在我的主要活动的清单文件中添加“category android:name="android.intent.category.HOME"。但这不起作用。关于如何解决这个问题的任何指针?
谢谢劳
我认为这就足够了:
<activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>