Open Aym9n opened 5 years ago
Can you write here which phone (model name) you used and version of Android? How many times did error occur?
The error always occur, tested on Lollipop Android studio 3.2.1
Thank you for respond! This app works only on Android 6 an higher. This app uses an internal Android database where is information about network usage and this is only in Android 6.0 and higher.
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.seremtinameno.datamanager, PID: 27109 kotlin.TypeCastException: null cannot be cast to non-null type android.app.usage.NetworkStatsManager at com.example.seremtinameno.datamanager.features.datausage.DataRepository$Data.obtainMonthlyData(DataRepository.kt:36) at com.example.seremtinameno.datamanager.features.datausage.DataRepository$Data.getData(DataRepository.kt:28) at com.example.seremtinameno.datamanager.features.datausage.GetDataUsage.run(GetDataUsage.kt:13) at com.example.seremtinameno.datamanager.features.datausage.GetDataUsage.run(GetDataUsage.kt:8) at com.example.seremtinameno.datamanager.core.interactor.UseCase$invoke$job$1.doResume(UseCase.kt:23) at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:42) at kotlinx.coroutines.experimental.DispatchedTask$DefaultImpls.run(Dispatched.kt:161) at kotlinx.coroutines.experimental.DispatchedContinuation.run(Dispatched.kt:25) at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1392) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:257) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:852) at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1681) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1636) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)