App A has this BroadcastReceiver in its manifest (within <application>):
And this receiver:
public class RemoteControl extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Log.w(TAG, "Look what I did!");
}
}
I'm trying to trigger this from App B:
public void onClic...
I have a main class which extends Activity which should spawn a ListActivity and obtain the selection made.
So I have an onListItemClick() in the class which extends ListActivity which accepts the selection via getItemAtPosition.
This ListActivity is started by startActivityForResult.
Now, since I have already obtained the result in on...
Trying to grok intents and actions in android and looking through the documentation.
But one thing I keep seeing is an intent filter with multiple actions defined. Like this, from the above link:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
<action ...
Android provides a lot of Intents in the base OS and packages. How do I determine the arguments (that is, Data, Extras, etc.) to send to an Intent? For example, you can open the Settings app to show the Application Info for a particular app using this intent:
String pkgname = "com.example.application"; // whatever the app is
Intent i...
I'm trying to make test-program that opens a website by pushing a button. I have made a listener and everything, my problem is just that, the url-opening-script makes an error and tells me "Uri cannot be resolved". Here's the script I use to open up an webpage:
Intent browserIntent = new Intent("android.intent.action.VIEW",Uri.parse("ht...
0
in my case i hav to navigate frm 1 screen to nthr aftr the timer is completed ... i hav 2 classes named test.java and test2.java!! inside Test.java class i hav created a class named Timer and in that in onFinish() method wen i write
startActivity(new Intent(this,Test2.class)); finish();
eclipse shows an error "The constructor Intent...
i want to dispaly text views n other stuff on 1 screen and when ny1 of those is selected i want to go another screen which already has textviews and radiobuttons on it???
how do i do that???
...
i want to call a new activity from within an inner class which is defined in d class which extends Activity....
the piece of written in one of the methods of that Inner class is::
Intent intent = new Intent(this, Test2.class);
startActivity(intent);
Test2 is placed inside the same package as my main clas is placed and eclipse is...
wat changes do i hav 2 make in AndroidManifest.xml if am calling an intent....
m calling Intent frm an Inner class method defined inside class which extends name test.java
i wanna disply content mentioned in class named Test2.java......
n both classes r in same package.....
n hw can i define textvies n radiobuttons n othr stuff on dat...
Suppose an app gets a content stream by being called with the android.intent.action.SEND filter. Also suppose the Uri and the stream is received like this:
Uri contentUri = (Uri) extras.get(Intent.EXTRA_STREAM);
InputStream in = getContentResolver().openInputStream(contentUri);
Now, how can I determine the total length of the content ...
Im trying to send a List to next activity
the list
List mGF = new ArrayList();
i cant figur it out... i have read and try for days...
Intent i = new Intent(mContext, ViewImages.class);
i.put....? (mGF);
How do i send and how do i get it as mGF in the next activity
hope you understand
...
I want to start a new activity from my UncaughtExceptionHandler when an uncaught exception appears. Is this possible?
I think the current activity can't start a new child activity in its "error" state because I always get this errors:
07-14 14:34:06.075: INFO/ActivityManager(74): Starting activity: Intent { flg=0x10000000 cmp=de.rwth/s...
I have a ListView that uses Linkify to create a link to another activity in my app. the url looks something like content://com.myapp/activitiy/view?param=blah
this works fine every time.
however, in another view, I'm trying to call some code like this:
Intent i = new Intent("content://com.myapp/activity/view?param=blah");
i.set...
I'd like to present a Contact picker, but add additional prompting when the picker is opened. On 1.5 the title is simply "Contacts".
I was thinking I could add an EXTRA_TITLE to the Intent which opens the picker, but it supposedly only works on ACTION_CHOOSER, not ACTION_PICK.
Or do I have to roll my own Contact picker?
...
I want to know how to move from one class to other class in android.
I have one main class i.e Addition.java(Main Activity) and i created other subactivity(Form.java).
I want to how to make my move from one class(ie.Activity)to other.
I tried this,but not working out,just trying to figure out
Intent intent = new Intent();
intent.setCl...
I execute the following code:
Uri uri =
Uri.withAppendedPath(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
imageIdStr); Intent intent = new
Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setData(uri);
activity.startActivity(intent);
which opens the image viewer activity but I don't want to see th...
Here is my LogCat log:
07-17 14:05:10.226: INFO/ActivityManager(71): Starting activity: Intent { cmp=com.mohit.gtd/.TaskEdit }
07-17 14:05:10.316: VERBOSE/GTDActivity(579): Starting TaskEdit activity
07-17 14:05:10.576: DEBUG/PhoneWindow(579): couldn't save which view has focus because the focused view com.android.internal.policy.im...
Hi
I'm trying to develop an app that prevents a user from getting to a specified app without a password. The scenario is...
user clicks on "Email" app (for example)
my app detects launch of an app
my app confirms it is the "Email" app
my app opens a view over the top, asking for a password
user enters a password, if correct, my app dis...
How can I setup an method to be called whenever Intent.ACTION_BATTERY_CHANGED is raised? Do I have to subclass BroadcastReciever? Or can I use a method to hook up the action to a method.
...
Hello,
Below is My code to create a shortcut to a selected application. I have really no problem and the application work quite well.
The problem is that I am able to create a shortcut with a ressource from my application:
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(this, R.drawable...