Tag: android-intent

How to use non-main activity to capture custom url in unity game?

When someone clicks on a link in a webpage of form “com.foo.bar://testtest” I want it to open my unity game and for me to get the testtest data. I’m an experienced programmer, but when it comes to android I kind of google my way around rather than really understanding anything. Bare that in mind. 🙂 […]

How to programmatically insert call log entries WITH display name and photo?

I am able to programmatically insert an entry into the Android call log with a number, date, duration & type BUT I cannot figure out how to also include a photo, label and name? The entry I’m adding is for an existing Contact with the exact same number. I’ve noticed on a Motorola device the […]

*Any* way for linking Android /drawable graphics to /assets?

I am trying to support two Icon_Picker intents: org.adw.launcher.icons.ACTION_PICK_ICON and com.betterandroid.launcher2.icons.PICK_ICON_ACTION Unfortunately ADW, Go Launcher and LauncherPro look for drawables in the /drawable either using the intent mentioned above, or by using an XML which looks in /drawable Whereas the old BetterAndroid intent scans for images in the /assets folder. Now, I know of the […]

How to load a Picasa image from URI?

I’m using ACTION_PICK intent to select an image from gallery. Some albums like “Posts”, “Profile Photos”, etc are marked with Picasa icon. For images from such albums I get a URI similar to this: content://com.google.android.gallery3d.provider/picasa/item/5769844615871490082 I can load an image from this URI using ContentResolver and BitmapFactory with no problem: final InputStream ist = context.getContentResolver().openInputStream(intent.getData()); […]

Choose folder on Android device

I would like to let user pick directory and save downloaded file (my app downloads file). I know that some tools (for example, ES File Explorer) provide such intent-filters. see http://www.estrongs.com/en/support/developers.html. I start activity for result and then get selected folder as a result. Also, I know that there are no “select folder” intent standards […]

Why is my searchable activity's Intent.getAction() null?

I’ve followed the SearchManager documentation yet am still having trouble making one of my app’s activities searchable. From my activity, the Search dialog appears, I enter a query, hit search, my activity reopens, then I see this in the log: D/SearchDialog( 584): launching Intent { act=android.intent.action.SEARCH flg=0x10000000 cmp=com.clinkybot.geodroid2/.views.Waypoints (has extras) } I/SearchDialog( 584): Starting (as […]

Android playing Music in Background

I have My Activity Code like Below: public class Player extends Activity implements OnCompletionListener, OnPreparedListener, OnErrorListener, OnBufferingUpdateListener, MusicFocusable { private Boolean playState = false; private String station = “”; public static final float DUCK_VOLUME = 0.1f; private String artistName = null; private String trackName = null; private TextView artist; private TextView track; private TextView status; […]

Android “java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object”

I have an Android application in which I add one more enum: public enum RootNavigationOption { HOME(R.string.home, R.drawable.ic_home), SETTINGS(R.string.settings, R.drawable.ic_settings), LOGOUT( R.string.logout_label, R.drawable.ic_logout); private int navigationOptionLabelResId; private int navigationOptionImageResId; private RootNavigationOption(int navigationOptionLabelResId, int navigationOptionImageResId) { this.navigationOptionLabelResId = navigationOptionLabelResId; this.navigationOptionImageResId = navigationOptionImageResId; } public int getNavigationOptionLabelResId() { return navigationOptionLabelResId; } public int getNavigationOptionImageResId() { return navigationOptionImageResId; […]

Read data from NFC tag (IsoDep)

I am newbie in Android NFC API. Currently, I have a NFC tag, I am making an Android app to read data from it. My simple App is launched when my phone get closer enough to the NFC Tag. But I have no idea how to read the data inside the NFC Tag. The tag […]

Activity.finishAffinity() vs Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK

In Android, if you want to clear your current Activity stack and launch a new Activity (for example, logging out of the app and launching a log in Activity), there appears to be two approaches. Are there any advantages to one over the other if your target API level is above 16? 1) Finish Affinity […]

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