Tag: android-intent

How to launch Android Calendar application using Intent (Froyo)

I want to open up the Calendar application from an android application. When i searched online, all i got is to create new events using intent. I could find Intents to open Contacts and Gallery etc. Is it possible to launch the Calendar to a specific week or day? If possible, could someone please help […]

Get IntentSender object for createChooser method in Android

I would like to use new version of Intent.createChooser method which uses IntentSender. Documentation states only that I can grab it from PendingIntent instance. In my case it seems that PendingIntent won’t have any other use. Is there another way to obtain IntentSender or do I need create PendingIntent?

Is it possible to refresh the view of a Fragment

I changed the locale of my application programmatically, like following: Resources res = context.getResources(); DisplayMetrics dm = res.getDisplayMetrics(); android.content.res.Configuration conf = res.getConfiguration(); conf.locale = new Locale(“cn”); res.updateConfiguration(conf, dm); After this, I would like to refresh my currently displayed fragment’s view to display with new locale settings. So, I firstly get the current fragment (that’s the […]

Calling an app from another app

In this app I’m developing I need to load/call another app that is already installed on the phone. It’s an application for my own personal use only, so no need to check if the other app is installed – I know it is. I’ve googled this problem for hours, but I can’t find anything that […]

How to exclude your own app from the Share menu?

The app has an intent filter to allow it to appear in the share menu in other applications via ACTION_SEND intents. The app itself also has a share menu using ACTION_SEND and createChooser(), and my app appears in the list. Since they are already in my app it seems strange to have them be able […]

How to know which intent is selected in Intent.ACTION_SEND?

I want to use Android Intent.ACTION_SEND for quickly sharing something. So I got a sharing list like this: But I want to share different content for each action, such as: If sharing by Email/Gmail, content should be “Share by email”. If sharing by Facebook, content should be “Share by Facebook”. So, is it possible to […]

Android Notification PendingIntent Extras null

I am trying to send information from notification to invoked activity, while from my activity I got null. The code for notification is: private void showNotification() { Intent resultIntent = new Intent(this, MainActivity.class); if (D) Log.d(TAG, “Id: ” + Id); resultIntent.putExtra(“ineedid”, deviceId); TaskStackBuilder stackBuilder = TaskStackBuilder.create(this); stackBuilder.addParentStack(MeterActivity.class); stackBuilder.addNextIntent(resultIntent); PendingIntent resultPendingIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT); // Bundle […]

Launching an intent for file and MIME type?

I’ve reviewed all the similar questions here, but I can’t for the life of me figure out what I’m doing wrong. I’ve written an application that tries to launch various files, sort of a file browser. When a file is clicked, it tries to launch the program based on its associated MIME type or it […]

Android sharing Files, by sending them via email or other apps

I have a list of files in my android app and I want to be able to get the selected items and send them via email or any other sharing app. Here is my code. Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_EMAIL, getListView().getCheckedItemIds()); sendIntent.setType(“text/plain”); startActivity(sendIntent);

How to clear Intent that started Activity?

At the beginning Activity is launched by an Intent and something is done with this Intent. When I change orientation of my Activity, it’s reloaded again and Intent is passed to the Activity. How can I clear that Intent to prevent Activity from using it again? I’ve tried setIntent(null), but with no result.

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