I have some code that downloads a \"Current\" object\'s JSON. But this same code needs to be called by an IntentService whenever an alarm goes off (when the app is not runni
If you use the Realm in IntentService ,you will use new Realm .for example
Realm.getInstance(RealmConfiguration config)
I used the Realm in IntentService
@Override
protected void onHandleIntent(Intent intent) {
Realm realm = Realm.getDefaultInstance();
...
realm.close(); // important on background thread
}