Tag: android-intent

What is the meaning of android.intent.action.MAIN?

I have seen so many different confusing explenations.. <intent-filter> <action android:name=”android.intent.action.MAIN” /> <category android:name=”android.intent.category.LAUNCHER” /> </intent-filter> What is the meaning of <action android:name=”android.intent.action.MAIN” /> and <category android:name=”android.intent.category.LAUNCHER” /> and <category android:name=”android.intent.category.DEFAULT” />

send Bitmap using intent Android

I hava a Bitmap variable in Activity1 name is bmp, and i want to send it to Activity2 using this code : Intent in1 = new Intent(this, Activity2.class); in1.putExtra(“image”,bmp); startActivity(in1); And in Activity2 i call it like this : Bundle ex = getIntent().getExtras(); Bitmap bmp2 = ex.getParceable(“image”); ImageView result = (ImageView)findViewById(R.Id.imageView1); result.setImageBitmap(bmp); why when i […]

Android: How to open a specific folder via Intent and show its content in a file browser?

I thought this would be easy but as it turns out unfortunately it’s not. What I have: I have a folder called “myFolder” on my external storage (not sd card because it’s a Nexus 4, but that should not be the problem). The folder contains some *.csv files. What I want: I want to write […]

What are intent-filters in Android?

In my android app, I wanted to start an activity ‘B’ from initial activity ‘A’. I have created classes for both of these. However when using following code to start B, I get a runtime error: application has stopped unexpectedly, try again. Here is my code: Intent myIntent = new Intent(this, AddNewActivity.class); startActivity(myIntent); When I […]


I am unable to understand START_STICKY, START_NOT_STICKY and START_REDELIVER_INTENT can any one explain clearly with examples. i went through this link but couldn’t understand it clearly. thanks in advance.

Choosing photo using new Google Photos app is broken

My app has ability to select photo from library. Exactly I want file path from this selection. This is the code to create intent for selecting photo: Intent photoPickerIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI); photoPickerIntent.setType(“image/*”); startActivityForResult(photoPickerIntent, INTENT_REQUEST_CODE_SELECT_PHOTO); This is the code that gets file path from URI: Cursor cursor = null; String path = null; try […]

Sending text messages programmatically in android

OK. I am sending text messages through my app. After a text message is sent, it sends a status update to a server. This portion works okay, but the problem I am running into is twofold. I am not sure if they are related, but I assume that they are. My app has the ability […]

Send SMS via intent

I want to send an SMS via intent, but when I use this code, it redirects me to wrong contact: Intent intentt = new Intent(Intent.ACTION_VIEW); intentt.setData(Uri.parse(“sms:”)); intentt.setType(“vnd.android-dir/mms-sms”); intentt.putExtra(Intent.EXTRA_TEXT, “”); intentt.putExtra(“address”, phone number); context.startActivity(intentt); Why? Also, I know a way to follow SMS sending, but I do not know how code this: Starting activity: Intent { […]

Android “single top” launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity’s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would reuse a single Activity instance and give me the Intent in the onNewIntent callback. I did both of these things, and onNewIntent never fires and onCreate fires […]

Android – Adding at least one Activity with an ACTION-VIEW intent-filter after Updating SDK version 23

I am getting following tool tip in AndroidManifest.xml App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent-filler. See issue explanation for more details. Adds deep links to get your app into the Google index, to get installs and traffic to your app from Google Search. Any one […]

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