Tag: android-intent

Android Camera Intent Saving Image Landscape When Taken Portrait

I have had a look around but there doesn’t seem to be a solid answer/solution to the, very irritating, problem. I take a picture in portrait orientation and when I hit save/discard the buttons are in the correct orientation also. The problem is when I then retrieve the image later on it is in landscape […]

Android E/Parcelīš• Class not found when unmarshalling (only on Samsung Tab3)

I’ve been unable to resolve why this error occurs, and only on a Samsung Tab3 device, running 4.4.2? It happens when my MainActivity starts another Activity, and passes a Parcelable class in the intent like so: private void debugTest(TestParcel cfgOptions){ TestParcel cfgOptions = new TestParcel(); cfgOptions.setValue(15); //just to verify Intent intent = new Intent(MainActivity.this, TestActivity.class); […]

Sharing via Seekable Pipe or Stream with Another Android App?

Lots of Intent actions, like ACTION_VIEW, take a Uri pointing to the content the action should be performed upon. If the content is backed by a file — whether the Uri points directly to the file, or to a ContentProvider serving the file (see FileProvider) — this generally works. There are scenarios in which developers […]

What is a binder callback on Android?

I have been watching the Google I/O presentation by Virgil Dobjanschi on the correct way to implement REST on Android with services and content providers. http://code.google.com/events/io/2010/sessions/developing-RESTful-android-apps.html Based on the video I’m doing things the wrong way, which is not surprising given how hard the right way is. Anyway, having been shown the promised land in […]

Successful share intent for android

How can i tell if a user successfully completed a share intent? For instance if a user wanted to share an app via Facebook or Twitter. Edit: I am not looking at how to create an Intent for sharing. I want to know if the user actually shared anything. Or did the user hit the […]

Difference between startActivityForResult() and startActivity()?

What is the difference between startActivityForResult() and startActivity() ? When, and for what, should I use each one ?

How to Get Device Height and Width at Runtime?

I am developing an app in which I have to make our app to fit for every device – for both tablet and android mobiles. Now I want to get the device height and width at runtime and implement it in my code so that my app works for both landscape and portrait. My XML […]

How to select and crop an image in android?

Hey, I am currently working on a live wallpaper and I allow the user to select an image which will go behind my effects. Currently I have: Intent i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); i.putExtra(“crop”, “true”); startActivityForResult(i, 1); And slightly under that: @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if […]

How to send HTML email

i found a way to send plain text email using intent: final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType(“text/plain”); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{“example@mail.com”}); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, “Subject”); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, “Test”); But I need to send HTML formatted text. Trying to setType(“text/html”) doesn’t work.

Android: How to pass Parcelable object to intent and use getParcelable method of bundle?

Why bundle has getParcelableArrayList, getParcelable methods; but Intent has only putParcelableArrayListExtra method? Can I transmit only object<T>, not ArrayList of one element? Then, what is getParcelable for?

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