Dear All,

I am updating RemoteView from Services, but if I pass PendingIntent very
fast.
RemoteView is not updating..

I got the fix, but i doest feel .. it is good from App prospective.
My doubt is, why remoteViews.setImageViewResource call does not work
properly.


Code snippet:
RemoteViews remoteViews = null;
    private void showNotification(int n) {
    if(remoteViews == null)
    {
    remoteViews = new RemoteViews(getPackageName(),//call always to fix the
problem
            R.layout.activity_lesson_one);
            setupRemoteButtons(remoteViews);
    }

        mNotification.icon = R.drawable.ic_launcher;
        mNotification.contentView = remoteViews;
        remoteViews.setTextViewText(R.id.text1, Integer.toString(n) );
remoteViews.setImageViewResource(R.id.image1, num % 2 == 0 ? R.drawable.a :
R.drawable.b);

        mNotiManager.notify(getPackageName(), 0x07010004, mNotification);
    }

if i initialize RemoteViews once and use it. problem occurs... To fix this,
I need to make object of "RemoteViews " every showNotification() call.

If Issue occurs once , notification never update again.

So plz tell me the exact working of Remote View.. it is not documented
anywhere.

-- 
Thank & Regards
Peeyush Varshney

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to