2020/10/25

1.0.14.127-SNAPSHOT-20201021.234023-6

- GemiusHitEmitterWorker behavior changed: worker used to send 50 hits on one invocation. Now it sends hits until there are none left to send or until operating system suspends it's execution

- GemiusHitEmitterWorker limit of sent hits implemented: in case network connection is lost during performing work, Gemius HitEmitterWorker tries to send every hit in database twice, than seases execution. Changes can be found in  GemiusHitEmitterWorker.doWork()

- TimestampSynchronizerNew.onDeviceBoot(context) called in MobienceSDKReceiver in case of action BOOT_COMPLETED, which is necessary for timestamp synchronisation to work properly after device rebooted

- FacebookInfo collector moved to workManager, because it's time of execution is too long to execute in BroadcastReceiver

- Gradle version bumped so that sample project can resolve androidx.appcompat package

- redundant logs removed

- Root, Nfc, MediaFiles, WifiDataConnection collectors moved from JobIntentService to BroadcastReceiver

- NullPointer in appslist/AppListBroadcastReceiver.java  configureCollector() fixed: if(bundle != null)

- device prevented from going into dose mode before collector completes work. Using goAsync() method in BroadcastReceiver ensures that the device will not go to dose mode until pendingResult.finish() is invoked.
That enables delegating work of BroadcastReceiver to another thread in a safe way. Maximum time before pendingResult.finish() can be invoked is 10 seconds

    AbstractDataCollectorNew.java

    public synchronized void lockReceiver(long autoReleaseTime) {
        if(pendingResult == null) {
            pendingResult = goAsync();
            Utils.insertMyLog(context, Log.INFO,getClass().getSimpleName() + " LOCKED",LOG_TAG);
        }
        scheduleAutoRelease(autoReleaseTime);
    }

    public synchronized void releaseReceiver() {
        if(pendingResult != null) {
            try{
                pendingResult.finish();
                pendingResult = null;
                Utils.insertMyLog(context, Log.INFO,getClass().getSimpleName() + " RELEASED",LOG_TAG);
            }catch(IllegalStateException exception){
                Utils.insertMyLog(context, Log.ERROR,getClass().getSimpleName() + " " + exception.getMessage(),LOG_TAG);
            }
        }
    }

- added util method for copying SQLite database to external storage in order to download logs from local device for analysis and debugging

 

Tags:
Spicy Mobile
spicymobile.pl