Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to associate my app to a file type in Android
    primarykey
    data
    text
    <p>I'm working on a music player app and am trying to get it to launch and play the selected song when it's selected in a file explorer. My app shows up in the app list when a music file is clicked, and even launches when selected. However, my playSong function is apparently not set at the action because no song plays. Here are the relevant portions of my manifest.xml. Can someone point me in the right direction?</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="my.app.com" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15" /&gt; &lt;uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/&gt; &lt;uses-permission android:name="android.permission.INTERNET" /&gt; &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt; &lt;application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" &gt; &lt;activity android:name=".MyMusicPlayer" android:excludeFromRecents="true" android:label="@string/app_name" android:theme="@android:style/Theme.NoDisplay" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.VIEW" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;data android:mimeType="audio/*"/&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;service android:name="MusicPlayer" &gt; &lt;/service&gt; &lt;service android:name=".SongListActivity" &gt; &lt;/service&gt;s &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload