Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to listen in a BroadcastReceiver (onReceive) ether Auto-sync data is turning on/off ?

 
Hasnain Ahmad
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to monitor the state of Auto-sync data is turning on/off in BroadcastReceiver.
How to get status of Auto-sync data in onReceive method via intent/context?
What will be action name in the manifest to monitor the status of Auto-sync data ?

Here is my AutoSyncReceiver code.

Here is my manifest code.
 
Giovanni Montano
Ranch Hand
Posts: 318
4
Android Open BSD Slackware
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not clear to me, are you maybe speaking over a sync adapter?
 
Hasnain Ahmad
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Giovanni Montano wrote:not clear to me, are you maybe speaking over a sync adapter?


I want to check if the user change the state of Auto-sync data, I want to listen it, bound the state until pattern is true.
Like

Assume that firstly Auto-sync data is enable
In showPatternDialog I have dialog with that shows pattern if pattern is valid then,
I will disable it using this code.

Assume that firstly Auto-sync data is disable
In showPatternDialog I have dialog with that shows pattern if pattern is valid then,
I will enable it using this code.
 
Giovanni Montano
Ranch Hand
Posts: 318
4
Android Open BSD Slackware
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cannot help you, I would use a Sync Adapter to manage that.

https://developer.android.com/training/sync-adapters/running-sync-adapter.html
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!