ArhamTechMind

Intent

Passing Data Between Activities Using Intent

main.xml<?xml version=”1.0″ encoding=”utf-8″?><RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android”    xmlns:tools=”http://schemas.android.com/tools”    android:layout_width=”match_parent”    android:layout_height=”match_parent”    android:paddingBottom=”@dimen/activity_vertical_margin”    android:paddingLeft=”@dimen/activity_horizontal_margin”    android:paddingRight=”@dimen/activity_horizontal_margin”    android:paddingTop=”@dimen/activity_vertical_margin”    tools:context=”com.blogspot.csdevbin.passingdatabetweenactivities.Main”>    <EditText Data passing using Intent         android:layout_width=”wrap_content”        android:layout_height=”wrap_content”        android:id=”@+id/editText”        android:layout_alignParentTop=”true”        android:layout_marginTop=”68dp”        android:layout_alignParentRight=”true”        android:layout_alignParentEnd=”true”  …

Passing Data Between Activities Using Intent Read More »

Passing Data Between Activities Using Bundle

main.xml<?xml version=”1.0″ encoding=”utf-8″?><RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android”    xmlns:tools=”http://schemas.android.com/tools”    android:layout_width=”match_parent”    android:layout_height=”match_parent”    android:paddingBottom=”@dimen/activity_vertical_margin”    android:paddingLeft=”@dimen/activity_horizontal_margin”    android:paddingRight=”@dimen/activity_horizontal_margin”    android:paddingTop=”@dimen/activity_vertical_margin”    tools:context=”com.blogspot.csdevbin.passingdatabetweenactivities.Main”>     <EditText Data passing using Bundle         android:layout_width=”wrap_content”        android:layout_height=”wrap_content”        android:id=”@+id/editText”        android:layout_alignParentTop=”true”        android:layout_marginTop=”68dp”        android:layout_alignParentRight=”true”        …

Passing Data Between Activities Using Bundle Read More »

Implicit Intent

activity_main.xml<?xml version=”1.0″ encoding=”utf-8″?><RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android”    xmlns:tools=”http://schemas.android.com/tools”    android:layout_width=”match_parent”    android:layout_height=”match_parent”    android:paddingBottom=”@dimen/activity_vertical_margin”    android:paddingLeft=”@dimen/activity_horizontal_margin”    android:paddingRight=”@dimen/activity_horizontal_margin”    android:paddingTop=”@dimen/activity_vertical_margin”    tools:context=”com.blogspot.csdevbin.implicitintent.MainActivity”>     <Button        android:layout_width=”wrap_content”        android:layout_height=”wrap_content”        android:text=”blog”        android:id=”@+id/button”        android:layout_alignParentTop=”true”        android:layout_centerHorizontal=”true”        android:layout_marginTop=”126dp” /></RelativeLayout> MainActivity.java package com.blogspot.csdevbin.implicitintent;import …

Implicit Intent Read More »

Explicit Intent

intent intent main.xml <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android”     xmlns:tools=”http://schemas.android.com/tools”     android:layout_width=”match_parent”     android:layout_height=”match_parent”     android:paddingBottom=”@dimen/activity_vertical_margin”     android:paddingLeft=”@dimen/activity_horizontal_margin”     android:paddingRight=”@dimen/activity_horizontal_margin”     android:paddingTop=”@dimen/activity_vertical_margin”     android:background=”@android:color/holo_blue_light”     tools:context=”com.blogspot.csdevbin.explicitintent.Main”>     <Button         android:layout_width=”wrap_content”         android:layout_height=”wrap_content”         android:text=”Go to another …

Explicit Intent Read More »

Intent in Android

An Android Intent is an abstract description of an operation to be performed. It can be used with startActivity to launch an Activity, broadcastIntent to send it to any interested BroadcastReceiver components, and startService(Intent)or bindService(Intent, ServiceConnection, int) to communicate with a background Service. Types of Intents There are following two types of intents supported by Android Explicit Intents Explicit intent going to be connected …

Intent in Android Read More »