Thanks - I figured out that the "original app" co-exists with the
"replacing app" and the user has a choice to select either (kinda like
windows). I like that, though it would be awesome if there was a
setting to select the default app.
The follow up to the previous question that I have is - how do I find
out what actions/intent (that are handled by the contacts app) to
override? For example, I found out that to replace the home screen you
need to have the following intent filter in the manifest:
<intent-filter>
<action
android:name="android.intent.action.MAIN"></action>
<category
android:name="android.intent.category.DEFAULT"></
category>
<category
android:name="android.intent.category.HOME"></category>
</intent-filter>
I found this in the groups - how do I find out the set of actions/
category/data to override for replacing the contacts app? Is there
some documentation by Google on this?
Rohit
On Oct 13, 12:05 pm, hackbod <[EMAIL PROTECTED]> wrote:
> Sure, the contacts provider is public, and you can handle the action
> that is broadcast by the phone button.
>
> Note that in -any- situation where you are "replacing an app," the
> original application will still be there in the launcher for the user
> to see, what it means to replace an app is that you handle the various
> Intent activities etc that the built-in one does, so the user can
> decide to use your app instead of the built-in one.
>
> On Oct 13, 11:36 am, Rohit Mordani <[EMAIL PROTECTED]> wrote:
>
> > How about replacing the contacts app with your own - Is there any way
> > to do that?
>
> > Rohit
>
> > On Sep 29, 8:00 pm, Xolotl Loki <[EMAIL PROTECTED]> wrote:
>
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
>
> > > > 2) Hidden Content Providers. The open access guarantees don't
> > > > necessarily grant access to the underlying content providers that
> > > > power the native applications. At the moment (this might change)
> > > > access to the native mail, SMS, and IM Content Providers is not
> > > > available.
>
> > > I figured out how to read the SMS provider:
>
> > > Cursor c =
> > > this.getContentResolver().query(Uri.parse("content://sms/inbox"), null,
> > > null, null, null);
> > > Log.d(TAG, "Read " + Integer.toString(c.getCount()) + " SMS messages
> > > from content (" + Integer.toString(c.getColumnCount()) + " columns)");
> > > String[] cols = c.getColumnNames();
> > > for(int i = 0; i < cols.length; i++) {
> > > Log.d(TAG, "Column: " + cols[i]);
> > > }
> > > while(c.moveToNext()) {
> > > Log.d(TAG, c.getString(c.getColumnIndex("address")) + ":" +
> > > c.getString(c.getColumnIndex("person")) + ":"
> > > +c.getString(c.getColumnIndex("date")) + ":"
> > > +c.getString(c.getColumnIndex("body")));
> > > }
>
> > > I saw the URI "content://sms/inbox" after adding the receiver and
> > > listening for incoming SMS. I got the column names from the middle
> > > block of code.
>
> > > cheers,
> > > - --
> > > ᛏᚠᛖᚾᚱᛁᛊᚢᛚᚠᚱᛏ
> > > ᛏᚢᛚᚠᛊᛚᛖᛁᚠᚨᚱᛏ
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.9 (GNU/Linux)
> > > Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org
>
> > > iEYEARECAAYFAkjhlmcACgkQNig/07RbnEvfwACfVuJbDVbkmN4254ACfGK+sj8Q
> > > GT0An3iVFc8COgtX500vO3okk0viN7AD
> > > =xsFW
> > > -----END PGP SIGNATURE-----
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---