Open MonteCreasor opened 7 years ago
I recommend checking the API level, and making notification based on this:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { display notification for API 26 } else { display notification for API < 26 }
you can just change "O" with 28 .That will work for you.
The Background Location Updates in Android "O" code lab has a minSdkVersion of 16 but the source code uses a number of API features that are, for example, only available in SDK 24 and 26. This results in the application halting with ClassNotFoundException when run on any device < SDK 26. The solution is to set minSdkVersion to 26.