Tag: android-intent

Email issue (send hyperlink in email body) android

mIntent = new Intent(Intent.ACTION_SEND); mIntent.putExtra(Intent.EXTRA_SUBJECT, getString(“”)); mIntent.setType(“text/html”); Uri myUri = Uri.parse(“http://www.Google.com/”); mIntent.putExtra(android.content.Intent.EXTRA_TEXT,Html.fromHtml(“<a href=\””+myUri+”\”>Link</a>”)); startActivity(android.content.Intent.createChooser(mIntent, “Email:”)); I tried the above code but at receiver side I can not get Link. it convert into normal text..

Intent filter using path,pathPrefix, or pathPattern

My test uri string is http://test.host.com/path/test.html?key1=val1&key2=val2 And I make intent-filter in manifest A. scheme & host (It works but I do not want) <intent-filter> <action android:name=”android.intent.action.VIEW” /> <data android:scheme=”http” android:host=”test.host.com” /> <category android:name=”android.intent.category.BROWSABLE” /> <category android:name=”android.intent.category.DEFAULT” /> </intent-filter> B. A & path(pathPrefix, pathPattern) (Not worked) <data android:scheme=”http” android:host=”test.host.com” 1. android:path=”path/test.html” -> not worked (link to […]

How to send String intent extra value from command line?

My automated test sends intents via adb shell am, but I’m having trouble specifying an extra that is a String Array. According to the Intent class docs, it is possible to put an String[] extra to an intent. However the Intent specification docs for the am command does not list a string array type. The […]

Put Object as intent for next activity

Is it possible to to put an object of type Object into an intent as a Extra? I have a variable of type object and won’t know until it is assigned a value as to what the object datatype is. Maybe something to do with serialization or as a bundle i’m not sure? And then […]

Difference between START_STICKY and START_REDELIVER_INTENT?

I am creating a service for my android app, providing data to the service via Intents. The problem is that when the service is destroyed by the system than the intent data provided to it can’t be restored, as a result of which my app crashes. I have heard START_REDELIVER_INTENT will restart my service as […]

Programatically starting the 'Add Account' activity in Android 2.2

I’ve been experimenting with the Android SDK over the past few days, in readiness to write an App for the store, however I’ve run across a bit of a problem. The App I’ll be writing requires that the user has a Google account associated with the phone. Retreiving and making use of the Auth token […]

Force video to open in Youtube app on Android

I have a mobile website that links to a youtube video. On Android, clicking on this link brings up a dialog asking the user to “Complete action using” their browser or the Youtube app. Is there a way to bypass this screen and just play the video in the Youtube app? (For example with a […]

FLAG_ACTIVITY_NEW_TASK clarification needed

So my problem is: I start App1, open Screen1 and then Screen2. I press Home, leaving App1 in the background. I open App2, start App1.Screen1 with FLAG_ACTIVITY_NEW_TASK, expecting to be on App1.Screen2 in the previously left task. Instead Im on App1.Screen1 and the system called onNewIntent(). When I press back it brings Sceen2 and Screen1 […]

How to display transparent activity on the another activity without removing previous activity

How to display transparent activity on the another activity without removing previous activity ? I am able to create transparent activity but when i trying to push it using intent , the previous activity gets removed. I want my transparent activity on the top of previous activity. Thanks!

Alarm Manager does not work in background on Android 6.0

This is my Activity code, Long time = new GregorianCalendar().getTimeInMillis()+20000;//Setting alarm after 20 sec Intent intentAlarm = new Intent(“alarm”); intentAlarm.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intentAlarm.putExtra(“req_code”,10); PendingIntent pendingIntent = PendingIntent.getBroadcast(context,10, intentAlarm, PendingIntent.FLAG_UPDATE_CURRENT); AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE); alarmManager.set(AlarmManager.RTC_WAKEUP, time, pendingIntent); These are all the permissions that I have in my app, <uses-permission android:name=”android.permission.VIBRATE” /> <uses-permission android:name=”android.permission.INTERNET”/> <uses-permission android:name=”android.permission.ACCESS_COARSE_LOCATION”/> <uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION”/> […]

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