简体   繁体   中英

How to declare Android application category?

I have an Android application that I'd like to appear categorized as a Music Player. How do I do this?

Here's an issue request opened by a user for this question.

I know that I can add intent filters to Activities in the application, but it's unclear to me what intent filter to use, and which Activitie(s) should have the filter declared.

In your AndroidManifest.xml declares a filter in the activity that a will receive the file in this way:

<activity android:name=".PrincipalActivity"
          android:label="@string/app_name">
  <intent -filter>
     <action android:name="android.intent.action.VIEW" />
     <action android:name="android.intent.action.MAIN" />
     <category android:name="android.intent.category.CATEGORY_APP_MUSIC " />
  </intent>
</activity>

The category android.intent.category.CATEGORY_APP_MUSIC be accompanied by action android.intent.action.MAIN .

For more details take a look at this .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM