intent

freeze on sending certain bitmaps to activities

Basically I receive the Image's URI from the Gallery, then created a Bitmap and want to send to another activity for displaying: Uri imageUri = intent.getData(); mBitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), imageUri); Intent intent = new Intent(TakePictureActivity.this, PreviewActivity.class); intent.putExtra(EXTRA_...

android open url from code

How to open an URL from code in the built-in web browser rather than within my application ? I tried this : Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(strURL)); startActivity(myIntent); but I got an Exception : "No activity found to handle Intent{action=android.intent.action.VIEW data =www....

Android: Intent.ACTION_SEND with EXTRA_STREAM doesn't attach any image when choosing Gmail app on htc Hero.

On the Emulator with a default mail-app all works fine. But I have no attach when I'am receiving a mail which I've sent from my Hero using a Gmail app. The default Mail app on the hero works fine. How can I make this code works with Gmail app on Hero? You can see the code below. private void startSendIntent() { Bitmap bitm...

Capturing HOME intent programmatically

I need my activity to handle HOME button press with a receiver programmatically, but the event is not firing. I can, however, successfully register and capture this intent filter if I declare it in a manifest.xml activity section. Here's the code for the receiver that's not working: BroadcastReceiver br; br = new BroadcastReceiver()...

Difference Between 2 Ways to Start an Activity?

I have seen the following two examples of starting activities in Android: Example 1 Intent myIntent = new Intent(CurrentActivity.this, NextActivity.class); CurrentActivity.this.startActivity(myIntent); Example 2 // Calling activity NextActivity.show(this) // In the called activity static void show(Context context) { final I...

Detect if an outgoing call has been answered

Once ACTION_NEW_OUTGOING_CALL has been broadcasted, I need to capture the following event of the other party answer. Could you advice on how to achieve that please? I know it is possible as the android dialer app changes the green android icon to the person's photo excatly when they pick up. Thanks! UPDATED: I've had a look at the sourc...

My main Activity launches a new Activity (WebView). It's just a page. But when I click the "Back" button...a white screen appears?

public class Profile extends Activity{ WebView prof_webv; private String selected_username; private static final String INDEX = "http://14.143.227.140"; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.ma...

Android multiple email attachment using Intent question

Hi, I've been working on Android program to send email with attachment (image file , audio file , etc) using Intent with (ACTION_SEND) . THe program is working when email has a single attachment. I used Intent.putExtra( android.content.Intent.EXTRA_STREAM, uri) to attach the designated image file to the mail and it is wokring fin...

Intent resolution in Android

Hello community, If I want to create custom address book (which overrides my phone's default address book), and if I want it to be used by all applications, what should be my intent filter? Does Android allow me to do such a thing considering the fact that such a third-party app could potentially be malicious?! And, if I want to have ...

How to kill a Service by another Activity?

Activity 1 starts a Service, using the standard Intent. Activity 1 starts Activity 2. Then, Activity 1 gets finished(). Now, there's only Activity 2. How does Activity 2 kill the Service, since that Intent was generated in Activity 1? I don't want to pass the Intent everywhere... ...

Is this the correct way to start an Activity?

Intent nnn = new Intent(Hello.this, NewActivity.class); startActivity(nnn); finish(); This would start a new activity, and then close the current Activity forever, right? ...

Android - Can I send an intent on Wifi state change to a service?

Hi all, I want to send an intent to my service everytime the state of Wifi connectivity changes. So when I currently use a broadcast receiver to listen for the state changes in Wifi, so when this recieves an intent I want to be able to send this info on to my service. Is this possible and if so the correct way to do it? ...

How do I bind this service in Android?

This is the code in my Activity. Initiate an Intent, then a Connection, right? hello_service = new Intent(this, HelloService.class); hello_service_conn = new HelloServiceConnection(); bindService( hello_service, hello_service_conn, Context.BIND_AUTO_CREATE); But my question is...what goes inside the Connection? class HelloServiceC...

Issue with displaying TabHost Layout in new Intent

Dear Android folks, I am having an issue with using TabHost in a new Intent of type TabActivity which I hope you can point me in the right direction. Funnily it works fine when I try to view it in the original Intent : setContentView(R.layout.main) I get a "forced closed" and within logcat, I get the following error even though my Ta...

Which activity handles Intent.ACTION_CALL_PRIVILEGED?

I've been digging for awhile into the source of the Contacts app on Android to find out which Activity handles Intent.ACTION_CALL_PRIVILEGED. Unfortunately, I couldn't find its source code. Does anyone know how it's called, or even better where I can find it's source? Thank you! ...

Android - Registering a broadcast receiver for two intents?

Hi, I was wondering is it possible to register a broadcast receiver to receive two intents? My code is as follows: sipRegistrationListener = new BroadcastReceiver(){ @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if(SIPEngine.SIP_REGISTERED_INTENT.equals(action)){ Log.d("SE...

Android - Make sure activity is alive before firing Intent?

Hi all, I am currently firing an Intent to a Broadcast Receiver which in turns starts an Activity. Then from the same Service another Intent is fired to a Broadcast Receiver thats in the Activity. The problem is that the Activity isn't getting the Intent meant for it because it is fired before it is alive and the Broadcast Reciever is...

intent to play playlist/album in android player

Is there an intent to play the whole playlist or album in android player? As for an album, it is possible to browse songs using ACTION_PICK: Intent intent = new Intent(Intent.ACTION_PICK); intent.setDataAndType(Uri.EMPTY, "vnd.android.cursor.dir/track"); intent.putExtra("album", id); activity.startActivity(intent); However replacing ...

Android - Intents somehow incrementing?

Hi all, I have started using custom intents in my application and I have come across a bit of a problem. When I send a custom intent I register a Broadcast Receiver and I catch the intent no problem. However problems seem to appear when I send the intent again, the Broadcast Reciever seems to register two events of the intent and so o...

android tabwidget intent tabs refresh every hit

I want to create a tab using child tab having intents, so that when ever user click on tabs intents get refresh. Every time user click on tab i want to refresh and called oncreate method of child intent tabs. public class Tabs3 extends TabActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(save...