I made a filemanager and I want it to respond to ACTION_GET_CONTENT intents. So I have this in my FileChooser activity in the AndroidManifest.xml:
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
</intent-filter>
(In fact, in the docs it says that adding
<data android:type="image/*" />
serves to choose a photo, but Android Studio is telling me that Cannot resolve symbol 'image/*'.)
Yet, my app did not answer to this request. Why??
For example, it does not respond when I try to attach a file with K9.
My full AndroidManifest.xml, where you can see my tries:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.floritfoto.apps.xvf"
android:versionCode="108"
android:versionName="3.9">
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage" />
<application
tools:ignore="AllowBackup"
android:supportsRtl="false"
android:allowBackup="true"
android:requestLegacyExternalStorage="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:name="com.floritfoto.apps.xvf.ZForDebug"
android:theme="#style/MyThemeNonFS" >
<activity
android:name=".XvfActivity"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<!--
-->
</intent-filter>
</activity>
<activity
android:exported="true"
android:name=".Thumbs" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
<!--
-->
</intent-filter>
</activity>
<activity
android:name=".Foto"
android:exported="true"
tools:ignore="ExportedActivity">
<intent-filter tools:ignore="AppLinkUrlError">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
</activity>
<activity
android:name="XvfPreferences"
android:label="Settings">
</activity>
<activity
android:name="FolderList"
android:label="Fima"
android:exported="true"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:icon="#drawable/fima_launcher_128" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<!--
-->
</intent-filter>
</activity>
<activity
android:name="FileChooser"
android:label="File Chooser"
android:exported="true">
<intent-filter>
<action android:name="org.openintents.action.PICK_FILE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="org.openintents.action.PICK_FILE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
</intent-filter>
<intent-filter>
<action android:name="org.openintents.action.PICK_FILE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="org.openintents.action.PICK_DIRECTORY" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
</intent-filter>
<intent-filter>
<action android:name="org.openintents.action.PICK_DIRECTORY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:scheme="file" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/provider_paths"/>
</provider>
</application>
</manifest>
EDIT: If I donĀ“t set fc.setType("...") my app is called...
According to this answer by #CommonsWare
, ACTION_GET_CONTENT is managed by the OS itself in modern versions of Android. So it seems that we are forced to use what the OS wants.
Related
I have an app on GooglePlay, but the Open button is missing. It just says Uninstall.
This is my mainfest.xml:
<application
android:name=".preview_refresh"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher_round"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".Login_Activity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.url.com"
android:path="/launch"
android:scheme="https" />
</intent-filter>
</activity>
</application>
I figured out, the problem is:
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
But I have these lines in my code. When I remove:
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.url.com"
android:path="/launch"
android:scheme="https" />
the open button is shown.
How can I fix it? I need these tags to open my app via link.
EDIT
I solved my problem, but now I have a new question:
Why do I have to separate the <intent-filter>? It's very confusing, because it shouldn't make any difference.
Ok, now I figured it out. The solution is to separate the <intent-filter>. Like this:
<activity android:name=".Login_Activity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.urlk.com"
android:path="/launch"
android:scheme="https" />
</intent-filter>
</activity>
I declared an intent filter in order to open csv files in my Main Activity, since that the app icon
disapeared from my device when I launch it, here is the code in my manifest file :
<application
android:allowBackup="true"
android:icon="#drawable/launcher_ic"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Main"
android:windowSoftInputMode="stateAlwaysHidden" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter
android:label="#string/app_name"
android:priority="1" >
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="text/csv" />
<data android:pathPattern="*.csv" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host=" "
android:mimeType="text/csv"
android:pathPattern="..csv"
android:scheme="http" />
<data
android:host=" "
android:mimeType="text/csv"
android:pathPattern="..csv"
android:scheme="https" />
</intent-filter>
</activity>
How to avoid this ?
thanks
The app's icon is declared in the application tag of the manifest, not the activity's.
Example:
<application
android:name="com.example.my_app"
android:icon="#drawable/my_app_icon"
android:label="#string/app_name">
I have INSTALL_PARSE_FAILED_MANIFEST_MALFORMED error when trying to install .apk.
<intent-filter>
<data scheme="myurlscheme" />
<action name="android.intent.action.VIEW" />
<category name="android.intent.category.DEFAULT" />
<category name="android.intent.category.BROWSABLE" />
</intent-filter>
If I remove it, everything is fine (except I can't open my app by the url :)
Here is my activity code:
<activity android:name="com.prime31.UnityPlayerNativeActivity" android:screenOrientation="sensorLandscape" android:launchMode="singleTask" android:label="#string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
<intent-filter>
<data scheme="myurlscheme" />
<action name="android.intent.action.VIEW" />
<category name="android.intent.category.DEFAULT" />
<category name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
What can be wrong with it? It works for many of android devices with OS > 2.2. Except only one device I'm talking about
Change:
<activity android:name="com.prime31.UnityPlayerNativeActivity" android:screenOrientation="sensorLandscape" android:launchMode="singleTask" android:label="#string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
<intent-filter>
<data scheme="myurlscheme" />
<action name="android.intent.action.VIEW" />
<category name="android.intent.category.DEFAULT" />
<category name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
To
<activity android:name="com.prime31.UnityPlayerNativeActivity" android:screenOrientation="sensorLandscape" android:launchMode="singleTask" android:label="#string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<data scheme="myurlscheme" />
<action name="android.intent.action.VIEW" />
<category name="android.intent.category.DEFAULT" />
<category name="android.intent.category.BROWSABLE" />
</intent-filter>
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
</activity>
Have to declared correct package name(should start from small letter) Please share whole android manifest to understand
<activity
android:name="packagename.Activity"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data android:scheme="abc" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
you can remove <data android:scheme="abc" /> from second <intent-filter> tag. This is running code, it may help you.
I am trying to add my app in the "share" menu that comes when you try to attach an image in whats app or any other chat app. I just cant seem to figure this out. I want something like this:-
This is in what's app when i try to attach a picture, i click on "Gallery". It takes me to gallery and then in the share menu, I want my app to be present their..
I have tried putting these intent filters in my manifest but they don't seem to be working.
<intent-filter>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="image/*" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="image/*" />
</intent-filter>
My app has pictures that can be attached in chat but i don't know why it doesn't show up in the menu. Please help
my manifest:-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myfragments"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat" >
<activity android:name=".TabActivity" />
<activity android:name=".MainActivity" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="image/*" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
heyy you can use Quick Menu for giving that menu option. Quick menu provide horizontal and vertical both option with image view. or u have to make your custom.
UPDATE
So far this only happens on the HTC OneX using Android 4.0.3
I have two share-to menu items in the android share menu.
When the user shares an image from android gallery, my app displays two
icons so user can have easy access to two different part of my app.
See picture.
This works fine in API v8, but in API v15 on a real device one of them is missing. API v15 emulator is ok!
In my AndroidManifest.xml this two Activity's set an icon in the share menu.
- ActivityMainLauncher
- ActivityQuickLauncher
The images are places in the hdpi, mdpi, ldpi folders.
The size is 72,48,36 pixels and they are PNG images.
Photoshop shows same resolution 72,009 for all three images.
UPDATE
added drawable-xhdpi folder for 96pix, but I have still only one item the: "SPRiiD"
This behavior is so strange, I don't know where to start debug.
I think there is something new in the API v15 that I have overseen?
Image of emulator API v15 correctly showing the two choices.
This is my AndroidManifest.xml file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="internalOnly"
package="com.carlsberg.dumbo"
android:versionCode="12"
android:versionName="0.83" >
<!-- android:versionCode as the basis for identifying the application internally and handling updates, -->
<!-- android:versionName to users as the application's version -->
<permission
android:name="com.carlsberg.dumbo.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<supports-screens android:anyDensity="true" />
<uses-permission android:name="com.carlsberg.dumbo.permission.C2D_MESSAGE" />
<!-- <uses-permission android:name="android.permission.SET_DEBUG_APP"></uses-permission> -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" >
</uses-permission>
<uses-sdk android:minSdkVersion="8" />
<application
android:icon="#drawable/launcher_gallery"
android:label="#string/string_app_name" >
<activity
android:name=".ActivityMainLauncher"
android:configChanges="keyboardHidden|orientation"
android:icon="#drawable/launcher_gallery"
android:label="#string/string_app_name"
android:launchMode="singleTop" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
<data android:mimeType="audio/*" />
<data android:mimeType="text/*" />
<data android:mimeType="application/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
<data android:mimeType="audio/*" />
<data android:mimeType="text/*" />
<data android:mimeType="application/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity-alias
android:name="com.android.internal.app.ResolverActivity"
android:exported="true"
android:targetActivity=".ActivityMainLauncher" />
<activity
android:name=".gallery.ActivityGallery"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:configChanges="orientation|keyboardHidden"
android:icon="#drawable/launcher_gallery"
android:label="#string/string_app_name_gallery"
android:launchMode="singleTop"
android:taskAffinity="com.carlsberg.dumbo.GalleryActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ActivityQuickLauncher"
android:configChanges="keyboardHidden|orientation"
android:icon="#drawable/launcher_gallery"
android:label="#string/string_app_name_quick_launcher"
android:launchMode="singleTop" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
<data android:mimeType="audio/*" />
<data android:mimeType="text/*" />
<data android:mimeType="application/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
<data android:mimeType="audio/*" />
<data android:mimeType="text/*" />
<data android:mimeType="application/*" />
</intent-filter>
</activity>
<activity
android:name=".send.ActivitySend"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".ActivityRemoveFriend"
android:configChanges="keyboardHidden|orientation"
android:label="#string/string_app_name"
android:theme="#android:style/Theme.Dialog" >
</activity>
<activity
android:name="com.carlsberg.dumbo.history.TabActivityHistoryLauncher"
android:label="#string/string_app_name"
android:launchMode="singleTask" >
</activity>
<activity android:name="com.carlsberg.dumbo.history.ActivityTabGroup1" >
</activity>
<activity android:name="com.carlsberg.dumbo.history.ActivityTabGroup2" >
</activity>
<activity android:name="com.carlsberg.dumbo.history.ActivityHistoryOutgoing" >
</activity>
<activity android:name="com.carlsberg.dumbo.history.ActivityHistoryIncoming" >
</activity>
<activity
android:name=".ActivityLogin"
android:configChanges="keyboardHidden|orientation"
android:label="#string/string_app_name"
android:theme="#android:style/Theme.Dialog" >
</activity>
<activity
android:name=".ActivityAddFriend"
android:configChanges="keyboardHidden|orientation"
android:label="#string/string_app_name"
android:theme="#android:style/Theme.Dialog" >
</activity>
<activity
android:name=".ActivityAcceptFriend"
android:configChanges="keyboardHidden|orientation"
android:label="#string/string_app_name"
android:theme="#android:style/Theme.Dialog" >
</activity>
<activity android:name=".Preferences" >
</activity>
<activity
android:name=".send.TabActivityActivityHelpSend"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
</activity>
<service
android:name=".IntentServiceSendFiles"
android:label="#string/string_sendFileService" >
</service>
<service
android:name=".IntentServiceGetFilesFromPc"
android:label="#string/string_getFileService" >
</service>
<service
android:name=".IntentServiceGetFiles"
android:label="#string/string_getFileService" >
</service>
<service
android:name=".ServiceBootCompleated"
android:label="#string/string_batchtester" >
</service>
<service
android:name=".IntentServiceGetFriendList"
android:label="#string/string_listupdater" >
</service>
<service
android:name=".IntentServiceUpdateFriendList"
android:label="#string/string_listupdater" >
</service>
<service android:name=".C2DMReceiver" />
<receiver
android:name="com.google.android.c2dm.C2DMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receive the actual message -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.carlsberg.dumbo" />
</intent-filter>
<intent-filter>
<!-- Receive the registration id -->
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.carlsberg.dumbo" />
</intent-filter>
</receiver>
<receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver" >
<!-- Handle retry events -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RETRY" />
<category android:name="com.carlsberg.dumbo" />
</intent-filter>
</receiver>
<receiver android:name=".AlarmReceiver" >
</receiver>
<receiver android:name=".myBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<provider
android:name=".contentprovider.UserContentProvider"
android:authorities="com.carlsberg.dumbo.contentprovider" >
</provider>
</application>
I just copied the relevant part of your manifest and created a test project:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ActivityMainLauncher"
android:configChanges="keyboardHidden|orientation"
android:icon="#drawable/ic_launcher"
android:label="#string/string_app_name"
android:launchMode="singleTop" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
<data android:mimeType="audio/*" />
<data android:mimeType="text/*" />
<data android:mimeType="application/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
<data android:mimeType="audio/*" />
<data android:mimeType="text/*" />
<data android:mimeType="application/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ActivityQuickLauncher"
android:configChanges="keyboardHidden|orientation"
android:icon="#drawable/ic_launcher"
android:label="#string/string_app_name_quick_launcher"
android:launchMode="singleTop" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
<data android:mimeType="audio/*" />
<data android:mimeType="text/*" />
<data android:mimeType="application/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
<data android:mimeType="audio/*" />
<data android:mimeType="text/*" />
<data android:mimeType="application/*" />
</intent-filter>
</activity>
</application>
</manifest>
Simple activity implementations:
public class ActivityQuickLauncher extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Toast.makeText(this, getClass().getName(), Toast.LENGTH_LONG).show();
}
}
public class ActivityMainLauncher extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Toast.makeText(this, getClass().getName(), Toast.LENGTH_LONG).show();
}
}
And it works:
Android 4.1.1 (Galaxy Nexus) and Android 4.0.3 (Archos G9 A70).