Intent

Solutions, Tutorial

Android Broadcast Receiver Example with Parcelable

In this tutorial I will show you how to use Broadcast Receiver and how to use Parcelable too. To do this, we will create an ExpandableList which will have parents and children(they will contain only their names). The children will be an arrayList of strings and because we want to pass this array with an […]

, , , ,
Snippets, Solutions

Add image to email intent in Android

How to add image to an email intent in Android: // build a email sending intent Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType(“image/png”); // set the email subject emailIntent.putExtra(Intent.EXTRA_SUBJECT, “email subject”); // set the email image path for the attachment emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(“file://” + mEmailImagePath)); // set the body of the email emailIntent.putExtra(Intent.EXTRA_TEXT, “some text message”);

, , , ,
Snippets, Tutorial

Android: Open the Calculator from Android using Intent

If you make an application and you need to open the calculator that comes with Android you can use the code bellow, but be careful because some Android phones might not have the Calculator installed or the name of the package and class might differ. 1. When you make the new project call your main

, ,
Scroll to Top