You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've StrictMode enabled in our app and we see the following policy violation:
StrictMode policy violation; ~duration=301 ms: android.os.strictmode.DiskReadViolation
at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1504)
at java.io.UnixFileSystem.checkAccess(UnixFileSystem.java:251)
at java.io.File.exists(File.java:815)
at android.app.ContextImpl.ensurePrivateDirExists(ContextImpl.java:605)
at android.app.ContextImpl.ensurePrivateDirExists(ContextImpl.java:596)
at android.app.ContextImpl.getDatabasesDir(ContextImpl.java:835)
at android.app.ContextImpl.getDatabasePath(ContextImpl.java:814)
at android.content.ContextWrapper.getDatabasePath(ContextWrapper.java:327)
at com.amplitude.api.DatabaseHelper.<init>(DatabaseHelper.java:80)
at com.amplitude.api.DatabaseHelper.getDatabaseHelper(DatabaseHelper.java:64)
at com.amplitude.api.AmplitudeClient.initialize(AmplitudeClient.java:228)
at com.amplitude.api.AmplitudeClient.initialize(AmplitudeClient.java:202)
at <our_own_package>.<init>(AmplitudeClient.kt:22)
Hello, all. We just released our new generation Android SDK. You can try to use this one instead. It doesn't have any 3rd party dependencies. @prashanOS
We've StrictMode enabled in our app and we see the following policy violation:
As seen in https://github.com/amplitude/Amplitude-Android/blob/master/src/com/amplitude/api/AmplitudeClient.java#L252 the database is opened in the thread calling the initialize.
Is there any chance that DB initialization could be moved inside the
runOnLogThread
to avoid accessing disk?The text was updated successfully, but these errors were encountered: