Tag: android-intent

onActivityResult getting RESULT_CANCELLED when using Intent.EXTRA_ALLOW_MULTIPLE

I have the following button in my activity, that opens the gallery to select single or multiple images, and below this, the OnActivityResult function, that is returning result as RESULT_CANCELLED for multiple images, and RESULT_OK for a single image. Not sure why it’s happening. Can someone please help. buttonGallery.setOnClickListener(new OnClickListener() { @Override public void onClick(View […]

Android remote service callbacks

(I have a remote service with an AIDL interface that is used by several client apps. I would like to add an asynchronous method to the interface for calls that take some time, but I need the solution to be secure, meaning that only my applications can communicate with the service. The client applications are […]

Android Start activity without creating new instance

Assume i have activity A that act as the root activity for my app . and form this activity i go to activity B. I want to be able to go back from B to A Without creating new instance of Activity A. this code is in Activity B public void onBackPressed() { super.onBackPressed(); // […]

Android: Starting new Activity from Application Class

I have an android app that plays audio from the application class. I have a PhoneStateListener in my application class that pauses the audio when there is a phone call. I want to start a particular activity when the call ends, but I am unable to. here is my code: public void getPhoneState(){ TelephonyManager mgr […]

Remove Activity as Default Launcher

I set my activity as a default launcher to intercept home button clicks like so: <activity android:name=”.ExampleActivity” android:label=”@string/app_name”> <intent-filter> <action android:name=”android.intent.action.MAIN” /> <category android:name=”android.intent.category.LAUNCHER” /> <category android:name=”android.intent.category.HOME” /> <category android:name=”android.intent.category.DEFAULT” /> </intent-filter> </activity> When my activity, ExampleActivity is launched, if i click the home key, I get prompted to choose. If I select make this […]

How to programmatically answer a call?

I want to answer a phone call. I found the intent android.intent.action.ANSWER but it seems that the only effect that I obtain is an ActivityNotFoundException. Why? Is it a deprecated intent? How can I achieve answer? I have also heard about the “telnet technique”. What is that? Thanks

Android Multiple Notification sending same data on clicking

Notification in android taking same intent on clicking. I am sending notifications after installing the theme. Consider I install 4 themes and 4 notifications appear in Notification window, but when I click on each notification it will launch perticular activity but the intent is having the same data for each intent. my code goes like […]

The concept of an Intent in Android?

I don’t really understand the use and concept of an Intent. I DO understand that an activity are one visual interface and one endeavour that the user can partake in. I THINK an intent is used to launch and communicate between different activities. If so, then how would you accomplish that? A code sample would […]

Missing a call to unregister HapticFeedbackBroadcastReceiver receiver that I never registered

I get the following error “Are you missing a call to unregister receiver” when I hit the back button to exit my application. How do I identify which Receiver is causing the leak and eliminate the error? I am using the code “DownLoader” from Google to download an expansion file. 10-27 22:13:32.818: E/ActivityThread(30744): Activity com.ssowens.groovebasstrial.BassActivity […]

Asking an IntentService for information about its queue

I have an IntentService that queues up web service calls that need to be made to my web server. So each Intent is a web service call to be made. I’d like to set something up where my application can ask this IntentService if it has any Intents containing a particular piece of data (IE: […]

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