Android :: Finding All Supported Intents
Dec 22, 2009How do I LIST all the INTENTS supported by all the activities(all applications as well) in the Phone.
View 2 RepliesHow do I LIST all the INTENTS supported by all the activities(all applications as well) in the Phone.
View 2 RepliesI have some code that is creating and removing alarms, and which works great in Android 1.5 and 1.6 but breaks on the Android 2.0 AVD.The code that's giving this exception is: Code...
View 3 Replies View RelatedI have an IntentService that broadcasts an Intent each time if finishes some work. Each broadcast Intent is identical except that it contains a Bundle with some result information from the IntentService. Evidently, having different data in the Bundle is not enough for Android to think it's a different Intent. If the IntentService broadcasts two of these Intents back-to-back, the second one is dropped as a duplicate.
I know I've read about this behavior in this forum in the past but I can't find in the documentation where this duplicate elimination logic is described in detail. Mostly, I just want to differentiate the Intents enough that they are not considered duplicates. Any pointers would be appreciated.
I've a succession of 2 Intent: Intent intent = new Intent(); intent.setClass(EntryPoint.this, MainClass.class); startActivity(intent);
And I'd like an animation (which is present in res/anim) occurs during the transition between these 2 Intents...
I have a auto-complete textbox in which the user makes a selection. From here I want to load a tabbed layout which is based on the user selection. The problem is I cant figure out a clean way to pass that selection to each of the tabs. At the moment I can pass an intent to the 'tabhost' activity and then pass to each child activity explicitly, however this just seems like messy iterative code to me! So basically how can I pass my intent data bundles to the tabs activities cleanly & efficiently! Psuedo code is also very welcome.
View 2 Replies View RelatedI am trying to create intents that will be set using alarmmanager. Currently, I can do this with one intent, add extra data to it (strings, but i send them as one string with a seperator), and everything works fine and goes off at the correct time. However, when I try to send multiple intents like this, they are overwritten and only one goes off at the correct time. How can i structure my intents so that they appear different to the alarmmanager (i think they are getting deleted when filterIntent() is run).
long story short- putExtra() makes all the intents look the same still... how can i make them look different so they wont get deleted (and keep track of them in case i want to delete a specific one)
I want to received the Android broadcast, is there a list of all intents?
View 2 Replies View RelatedI have searched and searched and I just can't get this code to work. I have a main.xml layout and a setting.xml. I have some values I would like the Settings.class to change in my main apps class.Three string to be exact. I have tried this simple test code in my main app class.
settings.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
Intent intent = new Intent(v.getContext(), Settings.class);
startActivityForResult(intent, 0);}});
//Then a function
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent){
super.onActivityResult(requestCode, resultCode, intent);
Bundle extras = intent.getExtras();
String value = extras.getString("myKey");
if(value!=null){
Log.d("hmmm",value);}}}
In my settings.class I have the following
returnHome.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.putExtra("myKey", "YEAH");
setResult(RESULT_OK, intent);
finish();}});
Back in main app class it is not getting logged. Like I said I have three string in the main class that I want settings class to change and send back.
On the market, there's an application called App Protector, which seems to effectively block the launching of configured activities until a password is correctly provided. By default, it blocks access to itself (not very interesting), Settings, and a few others. I wrote my own app to launch settings (rather than doing so through the home screen) and App Protector continued to do the job it claims to do.
When an activity that is protected is started, App Protector's password input activity is shown instead. Once the correct password is provided, the activity that was started comes to the front.
First -- does anyone know how this app is able to get between the rest of the system and the activities it protects? I would like to do something along these lines in my own application as well. Perhaps this app is receiving a broadcast about other activities coming to the foreground, and when the foreground activity is protected, it forces itself to the foreground?
Second -- does anyone know how well this technique will stand up to attack? Are there other ways to circumvent, where start Activity(...) fails to? It seems that one could use adb to un install it, thus removing its protection easily, but if I pursue my plans here, the app will be a part of a device's firmware (which, I assume, offers some protection against its apps being installed?)
Found similar examples--not exactly what I need. I simply need to start messaging (SMS) and email intents from my app with their "to" fields already populated. So I need to send a number with the sms intent and an email address with the email intent.
View 1 Replies View RelatedDevelopers. I am a newbie to Android but a seasoned developer in UI, Java , and ECLIPSE. I am trying to do something I believe is very simple yet I am struggling. I have two tabs, A & B. I want to put an Activity in each tab. I want to have the 'B' Activity live inside 'A' so I can access it within 'A'. 'A' has a clock and every second that passes I need to update information in 'B', even if 'A' is not currently shown. I put 'B' into the 2nd tab as follows:TabSpec mapInfo=tabs.newTabSpec("tag3"); Intent intent = new Intent(this, MathleteMapActivity.class)mapInfo.setContent(intent); mapInfo.setIndicator("Course Map");tabs.addTab(mapInfo); I am totally confused on how to get the "MathleteMapActivity" Activity from the Intent 'intent'. There appears no way to do this. Can anyone please recommend a cleaner way to do this knowing what I am trying to do?
View 4 Replies View RelatedI am implementing a simple app. I need to start an activity based on the state of the Activity. Lets take i am using a button to start the activity.
1. If the activity is not started, I need to start XYZ activity.
2. If the XYZ activity is on focus, then i need to close the activity on the button press.
3. If the XYZ activity is not in focus (like onPause) state then, I need to change the button state.Can you please help me in the flags that i need to use for starting the intent. Is it possible to get the state of activity before I start that activity?
Working with android I realized that implicit intents are good choice in most of cases due to their's flexibility. But what's about explicit intents? What are benefits of using them? What are common cases when it's a good practice to use them?
View 1 Replies View RelatedI have two applications A and B (in different packages,but it doesn't matter).Application B is an sms application that i have made and contains one activity.This activity has a method called sendSMS(String number,String text).I want to call this method from application A and send an SMS without opening the activity(the GUI) of application B but just send an SMS in the background by calling just the method of the activity.Any ideas?
View 10 Replies View RelatedI have few intents in my manifest file and an AIR application. How can I instantiate AIR application from android.
View 3 Replies View RelatedI have an app that has two buttons one for email & one for SMS. Depending on the button pressed I want to email or else SMS a certain text. I have coded the email button and it is working fine. The problem is that the dialog box that pops-up gives an option of e-mail or Messaging the text. I want to separate out the two, so that when the user presses email, only the options of email is there, and when the user presses SMS, only the option of Messaging is there.
View 1 Replies View RelatedI've asked here a question about Task Killers and widgets stop working (SO Question) but now, I have reports of user that they don't use any Task Killer and the widgets didn't work after a while. I have a Nexus One and I don't have this problem.I don't know if this is a problem of memory or something. Based on the API: So, I don't know why widget stop working, if Android doesn't kill the Pending Intent by itself, what's the problem? Code...
View 1 Replies View RelatedI would like to show a notification that displays the progress of an ongoing operation. That works well for me. But at the same time the remote view should contain cancel button to stop the ongoing operation. The usual content intent should still do something else, i.e. not cancel the ongoing operation. It seems though that I can only have one intent. Code...
View 3 Replies View RelatedI am new to android. i want sample program how to use intent
View 3 Replies View RelatedIs there any way to discover which intents a given app supports? An old post indicated that PackageManager.GET_INTENT_FILTERS isn't supported, might there be some other way to do this?
View 18 Replies View RelatedHow can I populate a menu using intents? I didn't understand that thing.
Or is there any better way for that?
Update:
Suppose I have an application that need to resize the image,and there are many other applications that have a capability of resizing the image. How can I show the list of applications on a menu in my application so that when clicking on a particular option it will invoke the intent associated with that application. Simply saying I could resize the image in my application with out bothering about how that will get done.
I want to setup a part of my application that allows users to send a quick email to another user. It's not very hard to set this up:
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, subject);
intent.putExtra(Intent.EXTRA_TEXT, message);
Intent mailer = Intent.createChooser(intent, null);
startActivity(mailer);
However, the problem is that the ACTION_SEND is accepted by more than just email programs - for example, on my phone the Facebook app, Twitter, reddit is fun, and even Bluetooth come up as viable alternatives for sending this message. The message is entirely too long for some of these (especially Twitter). Is there a way to limit the chooser to just applications that support long messages (such as email)?
I need to be able to handle/catch Intents while my Activity is closed. So I am looking at either a Service or a BroadcastReceiver. Is it possible to "receive" intents to a service itself? I tried to search, but could not find anything helpful. With a BroadcastReceiver, I am not exactly sure how that works outside of an Activity. Does it depend on the Activity being open/running? Can it run by itself?
Let's say that my Activity is killed by Android(or a task killer app), does the BroadcastReceiver still receive intents and process them? I have used a BroadcastReceiver as a widget, but I do not want to use a widget this time. My goal is to have the user open the Activity to set some options. From there, they would be able to close the Activity, but I would still be able to process Intents that were sent out by the system. I am still fairly new to Android development, so I could be so far away from where I need to be.
I was just working on an application that will do stuff when a call is missed or made; and am left wondering why do you have to register a listener using a long lived background service for phone state changes instead of being able to use broadcast intents?
View 2 Replies View RelatedWas trying to call another application using an *explicit* intent, but am finding it does not seem possible. I do not wish to use implicit intents. To test it out, try calling the YouTube main activity.
Intent i = new Intent(); ComponentName cn = new ComponentName("com.google.android.youtube","com.google.android.youtube.HomeActivity.class"); i.setComponent(cn); startActivity(i);
I get this error:
08-29 00:54:26.598: ERROR/AndroidRuntime(7332): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.google.android.youtube/ com.google.android.youtube.HomeActivity.class}; have you declared this activity in your AndroidManifest.xml? Does anyone know whether this is possible? (using explicit intents to call another application)
I'm a writing a program to add a new way of communication such as MMS/SMS or SIP phone to Android.Is there a way to add an icon in the QuickContactBadge menu, when clicking on a contact photo in the Contacts application ?I wasn't able to fully understand how it works from android sources.Is the list of icons only populated from mime types found in contacts datas ?
View 3 Replies View RelatedI am trying to start an activity from the notification bar but it needs to get an int. From activity to activity I would just put an int into the intent but I can't seem to figure out where to add the extra for the notification bar? Is this possible? If not is there a better way to do it?public void notifyMe()Code...
View 1 Replies View RelatedIn my app, user starts a service and shows a notification from activity A. The notification creates a Pending Intent that will invoke activity A should the user tap on it. The problem with this behavior is that, if the user starts the service (which shows the notification), drags down the notification bar, then taps the notification, I now have two activity A's in the display stack, one on top of the other and both exactly the same. How can I re-use the original activity A in this situation so the user isn't duplicating activities?
View 4 Replies View RelatedI have a tabactivity with several tabs. They are all defined with intents. On one tab, I have an action that needs to bring me to another tab and with a specific data. I worked with Intents and I broadcast them to change the tab. For that I have no problem. But I am facing an issue as soon as I try to reset my tabs for the second time (when the application starts, my method does not fail while called for the second time it hrows an exception). The issue comes only If I call the clearAllTabs() method on TabHost. Here is the exception:..........................
View 2 Replies View RelatedWhat is the difference between 2 ways of interaction between applications on android:
1. implementing service in app #1 and using it in app #2.
2. handling intentions and posting answer intention.