intentfilter
Android: How to get a list of all available intent filters?
PackageExplorer lists all intent-filters defined in apps in your device To answer your question: You create the intent-filter(s) you want to be used to cause your activity to be selected when a program is looking for a service or activity. So each Activity in a Package defines it own list of intent-filters. I found it … Read more
Intent action for network events in android sdk
Here’s a working example: <uses-permission android:name=”android.permission.ACCESS_NETWORK_STATE” /> <receiver android:name=”.receiver.ConnectivityReceiver”> <intent-filter> <action android:name=”android.net.conn.CONNECTIVITY_CHANGE” /> </intent-filter> </receiver> . public class ConnectivityReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Log.d(ConnectivityReceiver.class.getSimpleName(), “action: ” + intent.getAction()); } }
Open Android app from URL using intent-filter not working
I thought I will post this here since I spent some time looking into why my intent filter did not work. It turns out that it was working all along but matches are exact. Thus if you register your intent for http://myexample.com and you click in http://myexample.com/blah it will not work. Adding the following fixed … Read more
“Exported activity does not require permission” when attempting to launch from a URI
I had the same issue when I updated SDK to version 20. I removed it adding android:exported propery: <activity android:name=”.MainActivity” android:exported=”false”> <intent-filter> <action android:name=”android.intent.action.VIEW” /> <data android:scheme=”http” android:host=”example.com” /> </intent-filter> </activity> inside the activity declaration in manifest. Of course you may specify this if the activity is intended only for application-internal use The reason it … Read more
Android action.MAIN and category.LAUNCHER function
From the docs: category — Gives additional information about the action to execute. For example, CATEGORY_LAUNCHER means it should appear in the Launcher as a top-level application, while CATEGORY_ALTERNATIVE means it should be included in a list of alternative actions the user can perform on a piece of data. MAIN means that this activity is … Read more
Sharing Bitmap via Android Intent
I found 2 variants of the solution. Both involve saving Bitmap to storage, but the image will not appear in the gallery. First variant: Saving to external storage but to private folder of the app. for API <= 18 it requires permission, for newer it does not. 1. Setting permissions Add into AndroidManifest.xml before tag … Read more
Is there any way to put extras to Intent from preferences?
I got an answer, you can use it like this: <Preference android:key=”xxx” android:title=”xxx” android:summary=”xxx”> <intent android:action=”xxx” > <extra android:name=”xxx” android:value=”xxx” /> </intent> </Preference>