intent

How to make notification intent resume rather than making a new intent?

What i have here is a simple webview activity that when loaded it auto displays an ongoing notification. The idea is that people can navigate away from this activity and quickly access it again from any screen they want by pulling down the drop down menu and selecting it. Then when they want they can just close the notification by hittin...

Action before startActivity()

Hi, I'm new in Android development and I've a problem when I create my new activity. I want to use my activity before start it. For example, I have try it: MyActivity menu = new MyActivity(); menu.setXmppreception(reception); Intent intent = new Intent(Screen.this,MyActivity.class); Screen.this.startActivity(intent); But, my "menu" ...

How to create a new Intent for another app's broadcast receiver?

In the examples, they create Intent as: Intent intent = new Intent(this, AlarmReceiver.class); But suppose my AlarmReceiver class is in another app, how do I create this intent? I've tried with new Intent("com.app.AlarmReceiver") but nothing happens.. It was not called.. Any idea? --Broadcast definition added using the manifest ...

Cannot retrieve Intent Extras in Service onStart()

Hi, I'm trying to launch a service from another service with certain extras. However, I can't retrieve those extras in the launched service, .getIntExtra returns a NullPointerException. This is how I launch the service: Intent serviceIntent = new Intent(context, RefreshService.class); serviceIntent.putExtra(AppWidgetManager.EXTRA_APP...

Retain only one copy of an activity on the stack when called from non-activity

How can I make sure I only retain one copy of an activity on the stack when called from non-activity? When called from an activity I can just add the FLAG_ACTIVITY_REORDER_TO_FRONT flag to the Intent, but how can I do this from e.g. a widget or a notification? ...

android go back to first screen

I have an android app with links (made by linkify) that lead into other screens of my app. I'm wondering what's the best approach to close all of the 'child' activities and go back to the first activity that was originally launched. in otherwords something like this: HomeScreenActivity => Screen1 (via Linkify-link) => Screen2 => Scree...

Nested TabActivities and Intent based Communication

I have 2 nested tabactivities - TopTabActivity and EmbeddedTabActivity. I want to pass some information from TopTab Activity to EmbeddedTabActivity when OnTabChanged Event is triggered in TopTabActivity. Both activities are initialized in the beginning of the appln. The problem is when I use Intent to pass the information from TopTabAct...

Launching intent from a class outside an activity

I've got two activities, one of them is called MyActivity. I want both of them to be able to use a function located in a class othat we may call MyClass. In MyClass, I try to use an intent to launch the activity AnotherActivity. Since the constructor takes a context as parameter, I simply tried to store a context from the activity in the...

Runtime Exception in Android JUnit testing

I have a simple HelloWorld Activity that I try to test with an Android JUnit test. The application itself runs like it should but the test fails with an "java.lang.RuntimeException: Unable to resolve activity for: Intent { action=android.intent.action.MAIN flags=0x10000000 comp={no.helloworld.HelloWorld/no.helloworld.HelloWorld} } at n...

onActivityResult Intent data not correct

Hi, I'm venturing into startActivityForResult for the first time and I'm running into a problem. Activity A (ActivityMyList) launches Activity B (ActivityQuickList) waiting for a result: Intent intentLaunchQuickList = new Intent(ActivityMyList.this, ActivityQuickList.class); startActivityForResult(intentLaunchQuickList, REQUEST_QUICKL...

What does an IntentFilter do?

I don't quite understand what the IntentFilter does? Here is an example manifest: <activity android:name="SomeActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> ...

Pause any mediaplayer on some event

Hi, I have created an application that read messages with voice. I would like to pause any running media player when a message arrives in order to make the voice more clear. Is there any intent that could achieve this aim? I have noticed that google navigator, for example, is able to pause media player (and other music app like pandora)...

Android - Sending data from an activity to a service

I've a local service that is started in my main activity. The service is responsible for network I/O. It also interacts with other activities in my application. Till, now the service was only "providing" data to activity (using callbacks and not Intents.) Now I need to send data (custom objects) from my activities to the service. I unde...

android calling finish on intent.

Android: i am using twitter authentication by launching webview Intent authIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(authUrl)); startActivity(authIntent); after successfull authentication onNewintent get call and control returns to my activity. problem is webview still remain open after control return to my activity and if us...

How to open ICS file from mail attachment in own app?

I use the following manifest file: <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="text/calendar" /> <data android:pathPattern="\\*.ics" /> </intent-filter> <uses-permission android:name="android.permission.IN...

Intent not extracting extra

I have this code: protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); Log.i(TAG, "The id of the selected note is " + id); Intent editNote = new Intent(this, TaskEditActivity.class); editNote.putExtra(TasksDBAdapter.KEY_ID, id); startActivityForResult(...

What can be the Activity, I am using

Hi All I am new to Android Few words before I ask a question: We developing a selolar solutions based on Android os. I use internal libraries that are not a part of standard sdk A question: My class extends from InstrumentationTestCase class I perform the next operation: mPhone = PhoneFactory.getDefaultPhone(); I use mPhone for t...

android Intent problem

Actually i m little bit confused in Intent. Suppose i have three activities. A,b,c and in activity A i have exit button. When i click on exit button my application finishes. I have one more button in A which is next button. Which take me to new activity. and in activity B i have two buttons next and back, and in activity C also i have ...

android intent for sdcard ready

I have an application that uses a file on the SD card, the application runs when the phone boots, and it has become apparent that the file cannot be accessed when the program is first run as it starts working before SD card is avaliable. Is there an broadcast receiver I can use to tell when the SD card is ready? Update Just to summar...

Android Intent Filters for VIEW/EDIT/INSERT Contact

Hi, I've been trying to find one or all of the right filters. Does anyone have them? Down at the bottom you can see the logging output of the intents. Perhaps they aren't public? Have tried the following in my code to no avail... <receiver android:name=".ContactsBroadcastReceiver" android:label="@string/broadcast_receiver_name" a...