Menu
  • HOME
  • TAGS

Titanium Android activity not maintaining state

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"...

Starting a specific activity through NFC tag

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...

My Custom Intents do not work. Seems flakey

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...

“Shadow” and “high” strings in Uri redirect directly to browser in Android

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 '\\.'...

Is it possible to dynamically update the IntentFilter of a BroadcastReceiver defined in the manifest?

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...

Mail link open my app on specific URL

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); } ...

Clicking on a link should pop my application

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....

how to exit application using onbackpressed?

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); ...

Dealing with implicit intent future deprecation in Lollipop

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...

URL intents on Android

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.

Getting App Running info on clicking notification

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...

What is the difference between intent filter in activity and broadcast receiver?

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...

Intent Filter by category with LocalBroadcastManager

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 - Custom action in Broadcast Intent

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> ...

How do you bring back a destroyed activity?

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...

detect when app has started from a file association launch

android,intentfilter

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 Intent and Intent filter

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...

About the XML|intent-filter

android,xml,intentfilter

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.

BroadcastReceiver doesn't receive Intents from outer links

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...

Open an Android app via a URL in the browser

android,intentfilter

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 intent-filter - custom extension

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 works for but not for

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 Deeplink pathPrefix Attribute Is Being Ignored

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>...

Make my android app appear in the share list [duplicate]

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>...

android.intent.action.MEDIA_BUTTON event fires twice if i press Headset button once

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. } } } ...

BroadcastReceiver - onReceive Not Being Called

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.

Need assistance with the Android Manifest XML File within my Launcher App

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"...

How to get dynamic activity label based on the matching intent filter

android,intentfilter

The <intent-filter> element supports an android:label attribute.

When app receives NFC data it opens “New Tag collected”

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...

Using USB-Intent filter for multiple activities

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...

How to make my android app appear at the TOP of the share via.. list?

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

Intent-filter - Open NEW application, not embedded one

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...

IntentService not getting Intents from manifest registration

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...

Unfortunately (App name) stopes message when adding new activity to existing project [closed]

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> ...

How to launch an app without launcher icon by scanning an NFC tag?

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 com.google.android.c2dm for use in IntentFilter not found

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: how do you disable that your app reopens when scanning a NFC tag?

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...

How to get intent filter and application name through a broadcast

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 intent filter for a URL that ends with the given String

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

Launch Android activity when click on href in Chrome browser

android,intentfilter

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 Widget, Intent on RemoteViews not fired in data present

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,...

boot_completed action to register programmatically and not in 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...

How know if Intent ACTION_TIME_CHANGED is coming from direct user interaction

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);...

BroadcastReciver class not running

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" /> ...