Android :: Implicit Intent Works
Mar 21, 2010To understand the implicit intents by example.

To understand the implicit intents by example.
I couldnt figure out the exact understanding of implicit intents.
When i was going through the tutorial i read about it.
Here are some important points to remember: 1 - Implicit Intents do not specify a target component 2 - Components willing to receive implicit intents have to declare their ability to handle a specific intent by declaring intent filters 3 - A component can declare any number of Intent Filters 4 - There can be more than one component that declares the same Intent Filters and hence can respond to the same implicit intent. In that case the user is presented both the component options and he can choose which one he wants to continue with 5- You can set priorities for the intent filters to ensure the order of responses.
I read this about Implicit Intents.
I couldnt get visualisation of 4th point. So wanted to try it out by writing some examples.
I tested this like below. Wrote two apps.
I had written two activities in one app, CallingActivity & anotherActivity.
CODE:...........
One more app,which has two activities like below.
CODE:..................
I ran the first app in emulator and pressed home screen, it mean it runs in the background.(Not exited ) Then i opened the second app and clicked a button in frirst activity(testmain) and tried to call setAction "com.android.localguide.GET_RESULT"
i.setAction("com.android.localguide.GET_RESULT");
But it is opening the activity "results".. It dint showed a options to choose which components( i expected first app ) activity i need to use ?
Am i right in executing in the right context to understand that point no 4 ?
I`m trying to develop an application, just to test the ability of android to call an activity with an intent based not in the specific class name but specifying the action, category and data information. Acording to this link
http://developer.android.com/guide/topics/intents/intents-filters.html
only three aspects are consulted when comparing an intent object to select the future activity to run. I created two android projects (and two activities), the first is the main project who sends the request and the second can be called directly or through the filter. This is the call of the activity in the main project:
CODE:..................
This is the part of the manifest that specifies (or at least I try to specify) in the secondary activity that it`s available to be selected to run with that information:
CODE:...............
I installed both separatelly and I was expecteing to see the second activity after the called but instead I got an ActivityNotFoundException. By the way if I comment the t3.addCategory (Intent.CATEGORY_HOME); line and change the t3.setAction (Intent.ACTION_EDIT); to t3.setAction(Intent.ACTION_VIEW); the browser is executed so I think the problem is in the manifest of the second activity.
I was trying to open an Activity of an other applicatoin by using an implicit Intent. It doesn't work, I thought it is possible to start an Activity of an other Application by using implicit Intent. Or do I missunderstand it?
I added following intent-filter to the AndroidManifest of Application A:
CODE:..............
And called the Intent in Application B by using folloing code:
CODE:.............
All I get ist, the error message that Application A was stoped unexpectedly.
I am trying to launch an activity by specifying only its action(custom) defined in its intent filter from an activity in other application. The activity to be launched is the main activity of its application thus have android.intent.action.MAIN & android.intent.category.LAUNCHER set as action and category in its intent filter. Now according to android doc on Intent and Intent Filter, i do not need to specify DEFAULT category at all in this case. But doing the same i am i am unable to launch the activity.
LogCat says, Activity could not be found...
Am i misinterpreting the text or is there something else missing...?
Code, used for calling the activity
CODE:.............
Definition of Activity being called in the manifest file
COE:....................
I am trying to activate an activity from another activity using implicit intent.
Code fragment of mail activity:
Code:
public void onClick(View view) {
intent = new Intent(Intent.ACTION_SEND);
int id = view.getId();[code].....
Is it possible to call the built-in Video Recorder in Android through an implicit Intent? I did some search but haven't figured out yet.
View 1 Replies View Relatedimplicit intent with class name as action defined in intentfilter. is not working. Only it it is defined as "android.intent.action." it is picked up ? is it so ?
I have app A with the following in manifest.xml file
CODE:.............
In app B, i tried to call the activity in A using below code.
CODE:.............
This code works. But not above line.
One of my application need to know a new day is coming, that is, if the clock of phone changed from 23:59 to 00:00, my application will do some logic. I tried to use android.intent.action.DATE_CHANGED, but based on my test, this event only occured when i change the date mannually, I could not get this action when clock changed from 23:59 to 00:00.
CODE:...................
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 just got back from the Verizon store. I was checking out the Droid... I popped open the browser and went to DI.FM.
Digitally Imported - Addictive Electronic Music
I tried all 3 public streams (MP3, Windows Media, AACPlus), and nothing. I asked the data tech guys at the counter and they said there might or will eventually probably be a app that will work with DI.FM.
So anyone checked into this? Anyone gotten DI.FM working? I'm especially interested to see if I can get the premium subscriber channels to work. The phone is pretty damn sweet and right now the only thing holding me back is the fact I can't stream my favorite internet radio station.
According to the specs of the Droid, it supports AACPlus streams. This is big! Currently it's next to impossible to stream AACplus encrypted streams on windows mobile.
Can someone explain to me the concept behind using bluetooth. my project in my studies is to make an android app using bluetooth, SQLLIGHT and google app, the app itself is a very easy one but i just dont get the tools i need to use :
How does the bluetooth works?
Is there a simple example ?
The concept behind android GUI (i allready nade one but i think i am not fully understood his power)?
I am using v 2.1
I have two apps, almost identical, that make heavy use of Maps. I have both of them signed with the same key. One of them works, but the other one doesn't, it just shows a grid, but works with the debug key. I tried everything already, i mean i searched for substancial differences, but the thing is: a) if it's a code problem, it should NEVER run (and it does work with debug key) b) if it's a key problem, it should work (or not to) in both apps (and works great with one of them). I've already asked in Stack Exchange and they couldn't help me. Do you have any idea?
View 2 Replies View RelatedOur remote service is working great on 1.1. It is a pretty rich API too. BUT, running the same code on cupcake, it hangs after the service returns the concrete interface stub it has new'd in onBind(). (onConnect() in the client's ServiceConnection is never executed)
View 3 Replies View RelatedLearning about the NDK and JNI today. I was able to build, install and run the Quake demo that was ported to Android via the NDK 1.6. Worked great. I then started looking at the hello-jni example. This example works for me in the emulator, but does NOT work for me on the G1:
I/ActivityManager( 76): Start proc com.example.hellojni for activity com.example.hellojni/.HelloJni: pid=508 uid=10030 gids={1015} I/jdwp ( 508): received file descriptor 20 from ADB W/dalvikvm( 508): Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lcom/example/hellojni/HelloJni;.<clinit> W/dalvikvm( 508): Class init failed in newInstance call (Lcom/example/hellojni/HelloJni;) D/AndroidRuntime( 508): Shutting down VM W/dalvikvm( 508): threadid=3: thread exiting with uncaught exception (group=0x4001da28) E/AndroidRuntime( 508): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 508): java.lang.ExceptionInInitializerError E/AndroidRuntime( 508): at java.lang.Class.newInstanceImpl(Native Method) E/AndroidRuntime............
Can some one give me an idiots guide as to how geo tagging works, only once have i had the option of 'show on map' the location of a piccy, i have everything turned on that can be turned on.
View 4 Replies View RelatedI've been working for a while in an Android app that uses a lot of the Maps API. And the thing is it works in the emulator with my debug key, but i see only a grid when i put "true" key, i tried with three already that i know they worked, so why could it be? I have internet permission (in the right place, befoce ) and i just can't find why this thing only works with the debug key.
View 1 Replies View RelatedI have developed an App that target version is 4 (Android 1.6) upto 7 (Android 2.1). I tested this app on the dev phone 2 (Google-Io-Device 1.6 version). I am doing some xml parsing stuff through Internet. i set the <uses-permission> on my Manifest. it works fine in WI-FI Network. But its not working in the Motorola Droid 2.1 with 3G Network. Is there any more specific stuff to do for 3G network?
View 2 Replies View RelatedI have created an application and I want to make sure it works in different resolution. i have used LinearLayout and some ListViews and buttons. I need to know will it be an issue if the apk is put to two different phones which has different resolution.
View 6 Replies View RelatedI wish to listen to android.intent.action.BOOT_COMPLETED. However I am not getting the broadcast intent, if I specify com.test.BootBroadcastReceiver in the manifest. When I change this value to simply BootBroadcastReceiver, then I am getting the broadcast intent.
<receiver android:name="BootBroadcastReceiver" android:enabled="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
My package in the manifest file is:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test"
And the BootBroadcastReceiver resides in this package. What is the reason behind this?
I have a problem getting the Geocoder to return results on my new PC during development. I started writing a android app on my other (Win XP) system and Geocoder worked fine and returned locations based on an address that I passed to it.
I recently bought a new PC (Win 7). Moved the code over to it and now the no address queries return any results. I tried a couple that did work on the xp machine, but are returning no results on the new pc. It does not give any errors.
I did generate a keyfile on the old pc. Do i need to create another on the new pc? Does the Geocoder require the key? It is not from the maps api.
Could anyone upload a small example file that will work? Every file I've tried fails. Is this function completely broken? All attempts result in no points being listed. No errors reported.
View 4 Replies View RelatedAnyone have a program that allows swyping and works well? I want to give it a shot.
View 38 Replies View RelatedI know this has been discussed before, but I am looking to get an Android phone soon, coming from windows mobile, and have a few questions about getting email. With WinMO, there's an app to make hotmail push to my phone instantly, even though hotmail doesn't natively support push. From what I've read on here, the standard email app doesn't work with push from hotmail. But I really need to get this to work. I use my hotmail for my work, since my work server sucks. Frequently though out the day, everyone at work will get emails about upcoming work, and basically whoever responds first gets the job.
So having the phone check every 5 minutes wont do for me, since the job will probably already be taken. I have read about having gmail check the hotmail, but from what I can see, it will only poll every 5 minutes or so as well. I also heard about the K9 app, but from what I have read, it has some problems with hotmail. So, since I don't have an android to play with yet, for those of you who use K9 to push hotmail, how does it work? Are there any other options to get this to work? I've heard about setting up hotmail as an exchange server instead of an email server, but I'm not sure how that will work.
We just put out a new Android Finance App - Portfolio Feed. Check it out and let us know how it works for you and how we could better improve it.
View 5 Replies View RelatedIs there anyone in here that knows of a dictionary app that works together with the sms program?
View 1 Replies View RelatedI have a ListView where I want to show the QuickContact (like in the default Contacts android app when you click on the photo of a contact).
It works fine on my Nexus One 2.2 or the emulator with avd 2.2, but doesn't work on my Samsung Galaxy S 2.1update1 or emulator 2.1.
On 2.1, I'm getting the error:
CODE:...........
This is the call in the code:
CODE:....................
I'm doing a little 3D app programming based on SDK 1.5. I can't change textures in any way with glDeleteTextures.
Please help to check if I did sth. wrong.
My subfunction is as below:
CODE:...................
I'm having a hard time trying to understand how the preferences activity works. Right now I have an activity for my preferences using a XML layout that has this:
CODE:............
The thing is that everything I do in the preferences are saved. I can reboot the emulator and I can access the preferences. I want to know how can I access this key from another activity on my application.
This is my activity:
CODE:.................
I know there is PDANET but they dont let you get to a HTTPS site with the free version.
View 11 Replies View Related