views:

31

answers:

1

Hi all,

I have an application which using a sync adapter and one of the requirements is to have a notification in the status bar.

I added a notification but the problem is that there is also a system icon which is displayed but only part of the time during the sync operation.

I would like to use one (just one) of the icons.

Does anyone know a way how to use/display the system sync icon or how to disable it completely?

I've noticed that it's displayed when I insert records to the DB with the URI parameter: CALLER_IS_SYNCADAPTER, BUT it also displayed without that.

Thanks in advance,

Erez

A: 

Sync icon you need is part of the Android resources available through ID

android.R.drawable.stat_notify_sync

I am afraid you cannot disable displaying icons for notifications, except through dirty tricks (transparent icon), which anyway reserves space in the task bar and does not produce wanted result.

Desiderio
Hi Desiderio,Thanks for your prompt respond. I think my question was not clear enough. I wish to use either the system notification or my custom notification but not both.The problem is that the Sync Adapter activates the system notification but only for part of the time the sync operation is running. I'm looking for: a way to
Erez
Hi Desiderio,Thanks a lot for your prompt respond. I think my question was not clear enough. I wish to use either the system notification or my custom notification but not both.The problem is that the Sync Adapter activates the system notification but only for part of the time the sync operation is running. I'm looking for: 1. A way to make the system notification appear for the all sync operation.Or2. A way to avoid displaying the system notification (for example, avoid using the 'CALLER_IS_SYNCADAPTER' while inserting to DB). Thanks again,Erez
Erez
Thanks, now I understand it better. Could it be possible to notify when System sync finishes, and then display your own notification icon until your custom sync completes. Your sync is done on Contacts?
Desiderio
Erez
You mentioned that sync status icon disappears at some moment. How is that related (in time) to the start/completition of DB update.
Desiderio