19 messages in com.googlegroups.android-developersRe: Intent Receiver for android.inten...| From | Sent On | Attachments |
|---|---|---|
| Dexter's Brain | 24 Mar 2008 09:49 | |
| Megha Joshi | 25 Mar 2008 15:15 | |
| Dexter's Brain | 25 Mar 2008 20:35 | |
| hackbod | 25 Mar 2008 23:34 | |
| Dexter's Brain | 25 Mar 2008 23:52 | |
| Diego Torres Milano | 26 Mar 2008 03:24 | |
| hackbod | 26 Mar 2008 09:53 | |
| Dexter's Brain | 26 Mar 2008 10:02 | |
| Peli | 26 Mar 2008 10:41 | |
| jtaylor | 26 Mar 2008 12:12 | |
| hackbod | 26 Mar 2008 12:55 | |
| Peli | 26 Mar 2008 17:19 | |
| Dexter's Brain | 26 Mar 2008 20:13 | |
| Dexter's Brain | 26 Mar 2008 20:16 | |
| Peli | 26 Mar 2008 20:57 | |
| severian | 26 Mar 2008 21:30 | |
| Dexter's Brain | 26 Mar 2008 21:52 | |
| hackbod | 26 Mar 2008 22:40 | |
| severian | 26 Mar 2008 23:28 |
| Subject: | Re: Intent Receiver for android.intent.action.INSERT![]() |
|---|---|
| From: | Dexter's Brain (coom...@gmail.com) |
| Date: | 03/26/2008 08:13:00 PM |
| List: | com.googlegroups.android-developers |
What do you mean by sync???
On Mar 27, 12:12 am, jtaylor <juan...@gmail.com> wrote:
Possibly using sync as well.
- Juan
On Mar 26, 1:42 pm, Peli <peli...@googlemail.com> wrote:
Could a ContentObserver be registered for cases like
these?http://code.google.com/android/reference/android/database/ContentObse......)
Peli
On Mar 26, 6:02 pm, "Dexter's Brain" <coom...@gmail.com> wrote:
ok...Let me tell you what i wanted to do....I have a local file that has information about all the contacts on the phone. And my application uses this local file and not the phone book data directly....
So I wanted that, whenever a new contact is added or an old one is deleted, I should run a program that would update this local file . But this seems to be impossible right now if there's no intent for this. I will have to do a check for changes in the phone book and update my local file, everytime my application starts....Thats a bit of overhead on my app....and will also affect the startup time...
hackbod wrote:
No, it has nothing to do with writing a contacts provider. The provider is the back-end data; an activity is the user interface. You just write a new activity that operates on the existing content provider.
On Mar 26, 3:24 am, Diego Torres Milano <dtmi...@gmail.com> wrote:
If you want to write your own activity implementing those actions, how would you do that ? Implementing a new whole ContactsProvider ? If you only want to replace, say INSERT ? How your new ContactsProvider can coexist with the standard one if you want to extend its functionality ?
On Mar 26, 7:35 am, hackbod <hack...@gmail.com> wrote:
The android.intent.action.INSERT and android.intent.action.VIEW actions are not broadcasts, they are actions for starting activities to show a UI to insert a new entry, or view an existing entry, respectively. Thus you don't register for them with a <receiver>, you launch them with startActivity(). (You can also write your own activity implementing those actions to replace the standard UI, but that's probably not what you are wanting.)
On Mar 25, 8:35 pm, "Dexter's Brain" <coom...@gmail.com> wrote:
Thanks Megha...But, will it be provided in the subsequent releases???
Can you think of a situation where we would need this???
Dexter.
On Mar 26, 3:15 am, "Megha Joshi" <mjo...@google.com> wrote:
Hi,
I don't think that the intents for contacts added and contacts deleted intents are broadcasted. So you cannot receive these intents.
Thanks, Megha
On Mon, Mar 24, 2008 at 9:49 AM, Dexter's Brain <coom...@gmail.com> wrote:
Hello All,
I have an Intent Receiver which I will be triggered when a contact is added or deleted.
My reciever properties in the androidmanifest.xml are as follows.
<receiver android:name=".ContactAdded"> <intent-filter> <action ndroid:name="android.intent.action.INSERT" /> <action android:name="android.intent.action.VIEW" /> </intent-filter> </receiver>
And in my Intent Reciever class, I have the following lines of code.
public class ContactAdded { public void onReceiveIntent(Context context, Intent intent){ try{ Log.i("Received Intent", intent.getAction()); } catch(Exception e){ Log.i("Exception in Intent",e.getLocalizedMessage ()); } } }
Now, when I try to add or delete a contact, I can see in the LogCat that the required Intent is broadcast, but I don't see my message "Received Intent" in the LogCat which I have coded in my reciever class.
Am I doing something wrong???




