Loading...

android-discuss@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

[android-discuss] Show My Application Icon On Click of Native Contact Quick Badge in Android With out Using AbstractThreadedSyncAdapter(SyncAdapter).) nithin malikarjuna Fri Feb 24 02:00:17 2012

 I want to show My application Icon on click of native Contact Avatar.
I have Add Contact code and i am able successfully add a contact, and
into this contact i am added my own MIME Type called
**"vnd.android.cursor.item/vnd.com.nitz.ui.badge"**.

and my applyBatch(ArrayList operations)

    operations =[mType: 1, mUri: content://com.android.contacts/raw_contacts,
mSelection: null, mExpectedCount: null, mYieldAllowed: false, mValues:
account_name=null account_type=null, mValuesBackReferences: null,
mSelectionArgsBackReferences: null, mType: 1, mUri: 
content://com.android.contacts/data,
mSelection: null, mExpectedCount: null, mYieldAllowed: false, mValues:
data5=Name data2=Test mimetype=vnd.android.cursor.item/name data3=1,
mValuesBackReferences: raw_contact_id=0, mSelectionArgsBackReferences:
null, mType: 1, mUri: content://com.android.contacts/data, mSelection:
null, mExpectedCount: null, mYieldAllowed: false, mValues: data2=1
mimetype=vnd.android.cursor.item/phone_v2 data1=99999991,
mValuesBackReferences: raw_contact_id=0, mSelectionArgsBackReferences:
null, mType: 1, mUri: content://com.android.contacts/data, mSelection:
null, mExpectedCount: null, mYieldAllowed: false, mValues: data2=2
mimetype=vnd.android.cursor.item/phone_v2 data1=88888881,
mValuesBackReferences: raw_contact_id=0, mSelectionArgsBackReferences:
null, mType: 1, mUri: content://com.android.contacts/data, mSelection:
null, mExpectedCount: null, mYieldAllowed: false, mValues: data2=3
mimetype=vnd.android.cursor.item/phone_v2 data1=77777771,
mValuesBackReferences: raw_contact_id=0, mSelectionArgsBackReferences:
null, mType: 1, mUri: content://com.android.contacts/data, mSelection:
null, mExpectedCount: null, mYieldAllowed: false, mValues: data2=1
mimetype=vnd.android.cursor.item/email_v2 [EMAIL PROTECTED],
mValuesBackReferences: raw_contact_id=0, mSelectionArgsBackReferences:
null, mType: 1, mUri: content://com.android.contacts/data, mSelection:
null, mExpectedCount: null, mYieldAllowed: false, mValues: data2=1
mimetype=vnd.android.cursor.item/postal-address_v2 data1=Address
Home1, mValuesBackReferences: raw_contact_id=0,
mSelectionArgsBackReferences: null, mType: 1, mUri: 
content://com.android.contacts/data,
mSelection: null, mExpectedCount: null, mYieldAllowed: false, mValues:
mimetype=vnd.android.cursor.item/photo [EMAIL PROTECTED],
mValuesBackReferences: raw_contact_id=0, mSelectionArgsBackReferences:
null, mType: 1, mUri: content://com.android.contacts/data, mSelection:
null, mExpectedCount: null, mYieldAllowed: false, mValues:
data2=NitzProfile **mimetype=vnd.android.cursor.item/
vnd.com.nitz.ui.badge** data3=View data1=Nithin,
mValuesBackReferences: raw_contact_id=0, mSelectionArgsBackReferences:
null]

Looks like this. So i am able to see contact in Native Contact List
and also I am assuming my MIME type is Added to Contact, but i am not
able see my Application BADGE..

I do have Dummy app with an Activity and Intent Filter `<activity
android:name=".Badge"> <intent-filter android:icon="@drawable/icon">
<action android:name="android.intent.action.VIEW" /> <category
android:name="android.intent.category.DEFAULT" /> <data
android:mimeType="vnd.android.cursor.item/vnd.com.nitz.ui.badge" /> </
intent-filter> </activity> –`...But still i wont see Badge..

My Question: 1) Is SyncAdapter is really required to Add a badge. 2)
My Above Approach is ok to get a Badge????

-- 
You received this message because you are subscribed to the Google Groups 
"Android Discuss" 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-discuss?hl=en.