Tag: android-intent

Listen for updates ans install from server

First I have a server.I check server is there any new apk file I download this and try to install. If server have new version of apk file then I want to update my .apk file. I want to Install/update without user interaction.Is it possible? If user interaction is needed then How can I install/update […]

How “deliveryIntent” works in Android SMS framework?

Android documentation for SMSManagers sendTextMessage function public void sendTextMessage (String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent) deliveryIntent if not NULL this PendingIntent is broadcast when the message is delivered to the recipient. The raw pdu of the status report is in the extended data (“pdu”) I could not understand if deliveryIntent is […]

Flag Activity Clear Top destroys target activity and than creating it

I am watching a behavior of Intent.FLAG_ACTIVITY_CLEAR_TOP. For example i have three activities A,B and C Now Flow is A -> B -> C Now when i am starting A from C with this flag with following code. Intent intent_to_a=new Intent(C.this,A.class); intent_to_home.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent_to_a); AFAIK, Intent.FLAG_ACTIVITY_CLEAR_TOP should remove B and should resume the A .It also […]

Remove Contact select option form file select options

I am opening file pick Intent with, Bellow code Intent intent_upload = new Intent(); intent_upload.setType(“*/*”); intent_upload.setAction(Intent.ACTION_GET_CONTENT); activity.startActivityForResult(intent_upload, Constants.FILE_PICK_REQUEST_CODE); I Want remove Contact option from list, please can anyone help. Thanks

Intent to open a chat with a specific user on snapchat app

I’m trying to find if there is any app schema, to open the Snapchat app (via Intent) with a specific userID that I want to chat with? BTW, to find the userID:

can ever the intent received by a BroadcastReceiver be null?

In other words : @Override public void onReceive(Context context, Intent intent) { final String action = intent.getAction(); // can intent==null here ? // could it ever throw a NPE ? } I need to solve this once and for all so please no ifs and buts. I would check for null but I suspect that […]

The Intent constructors parameters

The Intent class had 6 constructors Intent() Create an empty intent. Intent(Intent o) Copy constructor. Intent(String action) Create an intent with a given action. Intent(String action, Uri uri) Create an intent with a given action and for a given data url. Intent(Context packageContext, Class cls) Create an intent for a specific component. Intent(String action, Uri […]

Error When Stubbing Intent with Espresso

I have two applications that interact with each other through intents. I would like to verify that let’s say App A correctly calls the startActivity for App B without actually launching App B. I have tried various combinations of intending and Espresso still launches App B through the intent instead of just stubbing it out. […]

The proper way to handle “Up” Navigation according to guidelines

I do totally agree with the Navigation below Imagine that the Book detail is made in different instances of a BookDetailActivity. The stack before pressing up in book2 detail is: BookDetailActivity (Book 2 – You are here) BookDetailActivity (Book 1) AllBooksActivity If I follow the guidelines I will use: Intent parentActivityIntent = new Intent(this, AllBooksActivity.class); […]

Integrating the app with Google search results and Chrome

The official Wikipedia app somehow does that, in my app I’m using a standard intent-filter to listen for navigation to Wikipedia urls. Is there a way to integrate with Google search? Are there any APIs available, or is this only available for the chosen ones?

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