更新时间:2021-12-28 09:50:48
您希望用户如何打开您的应用程序?如果您不想显示图标,那么没有启动器活动是正确的方法。
例如,如果您想允许用户通过打开txt文件打开你的应用程序,你可以在你的清单中添加一个意图过滤器:
How do you want users to be able to open your application? If you don't want to show an icon, then not having a launcher activity is the correct way to do it.
For example if you want to allow users to open your application via opening a txt file, you could add an intent filter inyour manifest:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/*" />
</intent-filter>