Tag: android-intent

Intent filter to download attachment from gmail apps on Android

I have android application with intent filter (ACTION_VIEW) to open file and import it into my application. I wish to download file attachment from gmail app into my application. Some of file type (i.e. jpg, png, txt) are saved correctly, but some are not (i.e doc, xls, ppt). I believe I have the correct intent […]

How Intents work internally?

I developed an App and i executed some tests. This tests consists in sending data from one background service to another background service. All data was received when the transmission rate was low (4 intents/second). However when i increased the transmission rate (8 and 12 intents/second), some data (typically 2- 3 %) was not received […]

Android ListView with fast scroll and alphabetical section index

How to add testview when touching a letter on right alphabet panel as shown in images? Could you please help me? Below is my code. In details, I am looking for an example exactly like below image. Currently I did the sorting of data. When I click on right alphabet panel it shows the data […]

Package manager has died

I got mail from a user who has a lot of apps installed that he has problems when my app gathers activity info with this code: getPackageManager().queryIntentActivities(mAinIntent, 0) whole source here: https://github.com/ligi/FAST this is what happens Caused by: java.lang.RuntimeException: Package manager has died at android.app.ApplicationPackageManager.queryIntentActivities(ApplicationPackageManager.java:479) at org.ligi.fast.BaseAppGatherAsyncTask.doInBackground(BaseAppGatherAsyncTask.java:34) at org.ligi.fast.BaseAppGatherAsyncTask.doInBackground(BaseAppGatherAsyncTask.java:1) at android.os.AsyncTask$2.call(AsyncTask.java:287) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) … 5 […]

Get Updated Contacts in Android for Contact Sync

I am working on Contact Sync in Android and I have successfully done with First time Contact Sync. Here is what I am doing. 1. Fetching all Contacts and Saving each contact in DB with Contact._ID 2. Fetching Names and Phone Numbers and saving in DB. After that I am sending my contacts data to […]

How do I send webview content body via email?

Currently in my app, I am using a webview for my html content to be displayed(which is coming via assets folder as expected,just to clarify). However, I have integrated send via email functionality and I see the subject body and title as null instead of content in focus in the selected email of choice. (say […]

How to send a large file or multiple files to other apps, and know when to delete them?

Background I have an App-Manager app, which allows to send APK files to other apps. Up until Android 4.4 (including), all I had to do for this task is to send the paths to the original APK files (all were under “/data/app/…” which is accessible even without root). This is the code for sending the […]

Android 4.1.1 Build Stack for Activity when receiving a Notification with URI

Our app has different notifications that can open different Activities. So we created the URI scheme to do so. The Notifications are received and open the correct activities. I create the stack for proper navigation with the following code: Intent intent = new Intent(Intent.ACTION_DEFAULT, Uri.parse(uri)); TaskStackBuilder stackBuilder = TaskStackBuilder.create(context); stackBuilder.addNextIntentWithParentStack(intent); PendingIntent contentIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT); […]

Android share intent chooser

I am using something like this to share some text using available applications on the user’s phone. public void share(String subject,String text) { final Intent intent = new Intent(Intent.ACTION_SEND); intent.setType(“text/plain”); intent.putExtra(Intent.EXTRA_SUBJECT, subject); intent.putExtra(Intent.EXTRA_TEXT, text); startActivity(Intent.createChooser(intent, getString(R.string.share))); } My main problem is that I would like to have a different text if the user chooses Twitter […]

Launch android app when a link is tapped on SMS

I don’t know if many people have tried this but I am trying a build an app that requires user to tap on a link on the sms he/she receives and this will launch the android app. Is it possible to do in android? If yes, how can I do this? I know this can […]

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