android,android-intent,android-activity,titanium,intentfilter
The way i have done was like this <android xmlns:android="http://schemas.android.com/apk/res/android"> <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="18"/> <manifest android:installLocation="preferExternal" android:versionCode="1" android:versionName="1.0"> <uses-permission android:name="android.permission.CALL_PHONE"/> <application android:label="App Name" android:largeHeap="true"> <activity android:configChanges="keyboardHidden|orientation|screenSize"...
android,nfc,mime-types,intentfilter,ndef
The NDEF_DISCOVERED intent filter should use an all lower-case MIME type name (and that's also how you should store the type name on the tag): <intent-filter> <action android:name="android.nfc.action.NDEF_DISCOVERED" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="application/com.km.parkit" /> </intent-filter> The problem is that MIME types are case-insensitive as per the RFC while Android's...
android,android-intent,intentfilter
In your first example, your Intent is not going to match the IntentFilter of the Activity. You've specified a data element in the IntentFilter, but you've not set one on the Intent. You can either set the MIME type on the Intent: i.setType("text/plain"); Or remove the <data> element from the...
android,android-intent,intentfilter
Issue is related to escaping '.' character. Change android:pathPattern=".*\.html" to android:pathPattern=".*\\.html" '\' is used as escape character when the string is read from XML. You will need to double-escape it i.e. literal '.' would be '\\.'...
android,broadcastreceiver,intentfilter
There is no way to change these intent filters at runtime. The only thing you can really change is which components are enabled. At best you probably need to run a Service in the background which will register and hold onto the dynamic BroadcastReceiver. Given the code you posted, I...
android,cordova,url,intentfilter,crosswalk-runtime
Problem solved: After setting <intent-filter> correclty, if you use Crosswalk ( it will work with classic or Cordova Webview ) just : Intent intent = getIntent(); String link = intent.getDataString(); xWalkWebView.clearCache(true); if(link!=null){ xWalkWebView.load(link, null); } else { xWalkWebView.load("file:///android_asset/index.html", null); } ...
android,android-intent,intentfilter
<intent-filter> <data android:scheme="scheme" android:host="host" /></intent-filter> The way I'm trying to implement may cause this error Finally decided not use path, filtering using host and handling it with the data in my activity....
android,intentfilter,onbackpressed
finish first activity when you are moving to second activity. use Intent intent=new Intent(First.this,Second.class); finish() startActivity(intent); ...
java,android,android-intent,service,intentfilter
Yes, when running in a device with Android 5.0 this code will either show a warning (if your app's targetSdkVersion is < 21) or crash outright (if targeting Lollipop itself). Check the source code for validateServiceIntent() in ContextImpl.java: This code is dangerous as it might allow a malicious receiver to...
android,android-intent,intentfilter
It seems that market://details?id=com.proptiger does work as redirect in the android browser but it doesn't work if you type it directly into the address bar.
android,android-intent,notifications,intentfilter,android-pendingintent
You don't need the conditional extra. Simlply launch Activity A from the Notification. Now, in Activity A add the following code: @Override public void onBackPressed() { // If this activity is the only activity in the task, that means the // app wasn't running when the notification was clicked. if...
android,android-intent,broadcastreceiver,intentfilter
From the documentation: A broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. Applications can also initiate broadcasts—for example, to let other applications...
android,android-intent,intentfilter,localbroadcastmanager
OK I found the solution here http://developer.android.com/reference/android/content/IntentFilter.html: A match is based on the following rules. Note that for an IntentFilter to match an Intent, three conditions must hold: the action and category must match, and the data (both the data type and data scheme+authority+path if specified) must match (see match(ContentResolver,...
android,android-intent,broadcastreceiver,intentfilter,android-broadcast
You need to add your custom action to the intent-filter of your BroadcastReceiver. Only then will that Intent trigger your BroadcastReceiver. <intent-filter> <action android:name="android.intent.action.PHONE_STATE"></action> <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/> <action android:name="android.net.wifi.WIFI_STATE_CHANGED"/> <action android:name="commentpost"/> </intent-filter> ...
android,android-intent,android-activity,intentfilter
on activity A: public void onBackPressed() { moveTaskToBack(true); } or on Activity B, force it to start activity A, public void onBackPressed() { Intent i = new Intent(B.this, A.class); startactivity(i); } but since you implement the first one, you dont need this last code. I Hope it helps...
Yes you can distinguish between the two, by the action set on the Intent of the main activity call: String action = getIntent().getAction(); If the action is action.MAIN then the app was started by pressing the icon in the app drawer. If its action.VIEW or whatever action you have set...
android,android-intent,intentfilter
There is no action with the name android.intent.action.SETTINGS. Try to remove the <intent-filter> from your manifest and add this code snippet in the onClick() method: Intent intent = new Intent(android.provider.Settings.ACTION_SETTINGS); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); Take a look at this SO question Opening Android Settings programmatically...
Your intent filter doesn't include the category for the category you're specifying in the intent. Change your intent filter category specifying android.intent.category.CATEGORY to com.example.ui05.MY_CATEGORY and it should work.
android,broadcastreceiver,intentfilter
If you want to open your app via custom url scheme you need to declare the scheme for an activity, not for a broadcast receiver. Try something like this: <activity android:name=".MainActivity" android:label="@string/app_name"> <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...
There are several things in play here. First, as Blackbelt noted, Android is case-sensitive, as are most programming languages and development environments. You would need to change this to be the proper case, following the documentation for those actions and categories: <intent-filter> <data android:scheme="myapp" android:host="hello"/> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.BROWSABLE"/> <category...
android,android-intent,android-pendingintent,intentfilter,file-extension
The documentation indicates that the value of pathPattern is ignored if scheme and host are not present. Try adding: <data android:host="*" /> Also look at this related SO post and answer....
android,android-intent,intentfilter,android-broadcast
The same thing can't be said when working with a BroadcastReceiver, the onReceive method is not invoked: That is because those actions are being used by some other process in startActivity() or startActivityForResult(). You cannot respond to startActivity() or startActivityForResult() with a BroadcastReceiver....
android,uri,android-manifest,intentfilter,deep-linking
Apparently, an empty android:pathPrefix attribute in some other data tags will cause specific data tag (the last data tag in above question) to ignore its own pathPrefix even though it is well defined! So this manifest declaration fixes the last data tag to behave normally: <activity android:name="com.example.DeeplinkActivity" android:screenOrientation="portrait" android:theme="@style/MyBaseTheme.NoActionBar"> <intent-filter>...
android,android-intent,share,intentfilter
Try this way <activity android:name="yourActivity" android:icon="@drawable/ic_launcher" android:label="test"> <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.SEND" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="image/*" /> </intent-filter> <intent-filter>...
java,android,android-intent,broadcastreceiver,intentfilter
Once for button down, once for button up. KeyEvent keyEvent = (KeyEvent)intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT); if (keyEvent != null) { if (event.getAction() == KeyEvent.ACTION_UP) { switch(keyEvent.getKeyCode()) { case KeyEvent.KEYCODE_MEDIA_PLAY: .... &c. } } } ...
android,service,broadcastreceiver,intentfilter
Either use LocalBroadcastManager in both places (sendBroadcast() and registerReceiver()), or do not use LocalBroadcastManager at all. Right now, you have a mismatched pair.
android,android-intent,android-manifest,intentfilter,launcher
You need an extra attribute to be added to the activity tag. Try adding this to the activity tag: android:launchMode="singleTask"...
The <intent-filter> element supports an android:label attribute.
android,nfc,intentfilter,ndef,nfc-p2p
You are sending a MIME type record of type "application/com.devcompany.paymentvendor.fragments": NdefMessage message = new NdefMessage(new NdefRecord[] { NdefRecord.createMime("application/com.devcompany.paymentvendor.fragments", mToBeam.getBytes()) }); Consequently, you also need to instruct your receiving activity to actually receive that MIME type record. You can register your app to open (and receive) upon detection of that MIME...
android,android-fragments,android-activity,intentfilter,android-permissions
The problem is that it bypasses the log in screen activity and crashes as it does not contain the data for the 2nd activity as no log in has occured. Then you should not be having the login process be in a separate activity. Have the login process be...
java,android,android-intent,intentfilter
No, it cannot be changed by programming. It is based on alphabetical order.. So if you really want to make your app appear first you gotta follow the strategy adopted by Dropbox, Pocket.. etc, ie "Add to Dropbox" "Add to pocket" so that A appears first in the list
android,android-intent,task,intentfilter
you have to set a specific andorid:launchMode to your activity: android:launchMode="singleTask" or android:launchMode="singleInstance" placed in the declaration of your activity in the AndroidManifest.xml will do it. take a look also at this article that explain how android handles tasks and activities...
android,intentfilter,intentservice
Any suggestions for what might be wrong here? You appear to be thinking that services are started automatically by broadcast Intents, which is not the case. I'd rather not create a broadcast receiver just to start an IntentService. Well, you are welcome to rewrite the code that is sending...
android,android-intent,android-activity,intentfilter,android-anr-dialog
try this: Handler handler = new Handler(Looper.getMainLooper()); handler.post(new Runnable() { @Override public void run() { Intent in = = new Intent(Intent.ACTION_VIEW); in.setClass(QuizByteReviewActivity.this, RateQuizActivity.class); startActivity(in); } }); Add your RateQuizActivity to the manifest: <activity android:name="com.example.RateQuizActivity " android:label="@string/title_activity_display_message"> </activity> ...
android,nfc,intentfilter,ndef,android-applicationrecord
The typical way to do this is to add another record (MIME type, NFC Forum external type, or URI) to the tag in addition to the Android Application Record (AAR). In that case, the AAR must be the last (or at least not the first) record of the NDEF message...
android,android-intent,push-notification,intentfilter
Looks like I overlooked the fact that IntentFilter takes a String. I need to put it in quotes like IntentFilter intentFilter = new IntentFilter("com.google.android.c2dm.intent.RECEIVE"); ...
android,android-activity,nfc,intentfilter,mifare
You already regisered for the foreground dispatch system. This is how you would typically give your app precedence over other registered apps while it is the foreground application. However, you only registered the foreground dispatch for tags that contain an NDEF message that starts with a Text record (or a...
android,android-intent,intentfilter,android-broadcast
Is there a way to find this out through the intent Not really, insofar as the Intent has no information about the Intent's origination point. does the application need to actually putextras in the intent? Yes, because only the originator of the broadcast knows what is appropriate to be...
android,android-manifest,intentfilter,deep-linking
I found the problem, Android can't see parameters or query strings, as it is already answered here - Match HTTP parameters in URL with Android Intent Filters
You need to set it up like this : <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="example.com" android:pathPrefix="/someresource/" android:scheme="http" /> <data android:host="www.example.com" android:pathPrefix="/someresource/" android:scheme="http" /> </intent-filter> Notice that in your case, you would need to use...
android,android-intent,widget,intentfilter
Test1 works because the action matches your Manifest, as you'd expect and the implicit intent is handled correctly. Per IntentFilter, if you declare both an action and data, then both need to match for the intent to match - as you do not declare a <data> element in your manifest,...
android,broadcastreceiver,android-manifest,intentfilter,bootcompleted
I was trying to register a receiver programmatically for actionandroid.intent.action.BOOT_COMPLETED By the time registerReceiver() is called, the boot will have long since happened. The only place to register for android.intent.action.BOOT_COMPLETED is in the manifest, as that is able to register interest in broadcasts even when you do not have...
android,android-intent,intentfilter
I don´t really know if it works, I can´t try this at the moment, but there is the Settings API with that You can get some informations. I am not sure about if You can read this without root, but give it a try. String isAutoTime = Settings.System.getString( getContentResolver(), Settings.System.AUTO_TIME);...
android,android-intent,broadcastreceiver,intentfilter
Change your action in android manifest to : <action android:name="android.intent.action.ACTION_POWER_CONNECTED" /> <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" /> ...