Tag: android-intent


I am in the process of (finally) writing the chapter on tasks for my book, and I am encountering a few lingering puzzles. Things that serve as home screen launchers seem to use the combination of FLAG_ACTIVITY_NEW_TASK and FLAG_ACTIVITY_RESET_TASK_IF_NEEDED when they launch the requested launcher activity: Intent i=new Intent(Intent.ACTION_MAIN); i.addCategory(Intent.CATEGORY_LAUNCHER); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); i.setComponent(name); startActivity(i); […]

Android 6: cannot share files anymore?

I am sharing an image, and this code works properly for devices before Android 6: Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.setType(“image/*”); Uri uri = Uri.fromFile(new File(mFilename)); shareIntent.putExtra(Intent.EXTRA_STREAM, uri); mContext.startActivity(Intent.createChooser(shareIntent, mChooserTitle)); However I get the toast error “can’t attach empty files” when I try to share using Android 6. I verified that the file exists and […]

open google maps through intent for specific location in android

I’m designing one application in which I want to show specific location on Map. I’m passing String of address which is already placed on Google Map. Following is my Intent code.. String url = “http://maps.google.com/maps?daddr=”+address; Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(url)); startActivity(intent); But it gives me Google Map for getting direction. I know why that […]

Intent to start a navigation activity

In my application I have an option to start navigation to selected POI. Basically what I want is to launch a turn-by-turn navigator from my application. The thing is I don’t know which (if any) navigator is installed. So, the question is how to start an intent by showing a list of suitable activities for […]

Start Activity Using Custom Action

I am looking to start an activity in my app using a custom action. I have found a few answers but everything I try it throws java.lang.RuntimeException saying No Activity found to handle Intent { act=com.example.foo.bar.YOUR_ACTION }. This is the activity in my manifest file: <activity android:name=”.FeedbackActivity” > <intent-filter> <action android:name=”com.example.foo.bar.YOUR_ACTION” /> </intent-filter> </activity> And […]

Does 'Samsung Apps' support a URI scheme to redirect to specific apps?

One of my customers is keen on promoting a ‘lite’ version of his full app on a number of popular Samsung devices. This lite version will be uploaded to http://www.samsungapps.com, and users will then be able to download it through the ‘Samsung Apps’ app. The lite version features an in-app link to the full app. […]

Launching custom Android application from Android browser / Chrome

First of all, my question is extremely similar to this, this and this. The Android documentation for what I’m trying to achieve is here. I couldn’t get this to work using these resources so please don’t mark this as duplicate as it is not. I have a website and an Android application. The user will […]

Why ITelephony.aidl works?

I saw some SO posts which discussed about how to end a phone call programmtically, for example, this one. Yep, people focus on the result but no one actually explain the reason why it works? I tried the code, it works well. But I would like to know more details about what is going on […]

Intent from notification does not have extras

This seem to be a common problem and I went through all the related questions I could find already: Activity isn't picking up new intent, Why extra data (integer) is not sent in android notification intent?, Notification passes old Intent Extras, Can't put extras for an intent in notification, android pending intent notification problem; but […]

Android Notification intent to clear it self

I have read many examples of how to create notification messages. What i wanted to achieve, is because the notification will be executed by a widget, i would like the notification intent when clicked to clear it self when the user clicks on it.I do not have an activity to return to. The notification for […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.