Tag: android-intent

How to get the Correct orientation of the image selected from the Default Image gallery

I have gone through some of the links to get the correct image orientation of the image selected from the default image gallery to be worked standard in all devices the exif tag always returns 0. EXIF orientation tag value always 0 for image taken with portrait camera app android Exif orientation tag returns 0 […]

How to pass ArrayList<CustomeObject> from one activity to another?

This question already has an answer here: Passing arraylist of objects between activities 4 answers

Android Parcelable and Serializable

So i know it is recommended to use Parcelable instead of Serializable in android, because it is faster. My question is: is that impossible to avoid using Serializable right? If I have a custom object i want to serialize, let’s say I have the following class definition public class Person { String name; int Age; […]

Send text to specific contact (whatsapp)

I wanted to know how I can send text to a specific whatsapp contact. I found some code to view a specific contact, but not to send data. Cursor c = getContentResolver().query(ContactsContract.Data.CONTENT_URI, new String[] { ContactsContract.Contacts.Data._ID }, ContactsContract.Data.DATA1 + “=?”, new String[] { id }, null); c.moveToFirst(); Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(“content://com.android.contacts/data/” + c.getString(0))); […]

Can I integrate Microsoft Lens into my application?

I like Office Lens’s ability to automatically crop, focus, and align a picture… mainly for receipt and expense processing I want to have an app flow that goes like this: User opens my app and clicks photograph receipt Lens opens (android intent, or similar in iOS) User takes picture Picture is returned to my application […]

Android Intent.getStringExtra() returns null

This is how strings are being added to Extras: Intent i = new Intent(); i.putExtra(“Name”, edt_name.getText()); i.putExtra(“Description”, edt_desc.getText()); i.putExtra(“Priority”, skb_prior.getProgress()); setResult(RESULT_OK, i); finish(); This is how I try to extract them in onActivityResult(): String name = data.getStringExtra(“Name”); String desc = data.getStringExtra(“Description”); int prior = data.getIntExtra(“Priority”, 50); But after the second code block name and desc […]

Start a new activity with no transition animation in android 1.6

I am aware that from API level 5 it is possible to specify a flag in the intent to prevent the normal animation being applied when I start a new activity: myIntent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); However, my question is: is there a way to achieve the same thing in an app supporting android 1.6?

How do I know what data is given in a Bundle?

I’m having a heck of a time figuring out what data is coming to my methods through Intent/Bundles. I’ve tried adding break points to inspect the data, but I don’t see anything. Perhaps because it’s a Parcelable I can’t manually read it in Eclipse. For instance, a onActivityResult(int requestCode, int resultCode, Intent data) for a […]

Android share intent for facebook- share text AND link

I am trying to use the Android share intent to post something on facebook. It looks like this: shareIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); shareIntent.setType(“text/plain”); shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, “Free education for all! http://linkd.in/xU8mCc”); startActivity(shareIntent); So my post has both – some text and a link. But when the message is posted on facebook, it only has the link, no message. I tried […]

How to open a PDF via Intent from SD card

I’m trying to launch an Intent to open a pdf inside my assets folder in my app. I’ve read dozens of posts but am still stuck. Apparently I need to copy the pdf to the sd card first then launch an Intent. It still doesn’t work. I think the problem is the Intent launching so […]

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