Reputation: 27
I created a sync adapter to sync data from android mobile to a server at interval. The adapter is working perfectly in all android devices except Redmi note 4. Tried with changing different different settings in Redmi note 4 but of no use.
What could be the reason for this?
Upvotes: 1
Views: 557
Reputation: 3316
Following code is typical registering code syncAdaptor Service
<service
android:name="com.example.android.datasync.SyncService"
android:exported="true"
android:process=":sync">
<intent-filter>
<action android:name="android.content.SyncAdapter"/>
</intent-filter>
<meta-data android:name="android.content.SyncAdapter"
android:resource="@xml/syncadapter" />
</service>
The attribute android:process=":sync" tells the system to run the Service in a global shared process named sync. If you have multiple sync adapters in your app they can share this process, which reduces overhead.
if you remove this attribute from Service tag, that will work on Xiami phone
Upvotes: 2
Reputation: 27
You could remove the security app. Although it would require you to root. Here's some further reading.
Upvotes: 1
Reputation: 1005
The Xiaomi's Security app blocking the service. Check it, and enable the service running. But I don't know the real solution
Upvotes: 0