Have both GMS and HMS in the project

So, I managed to do it like this: Defined two flavours gms { dimension “services” buildConfigField “String”, “SERVICE_USED”, ‘”g”‘ } hms { dimension “services” buildConfigField “String”, “SERVICE_USED”, ‘”h”‘ } I use the “g” and “h” in the code whenever I need to decide on doing things like: the API requires a deviceType of “android” or … Read more

“Protected Apps” setting on Huawei phones, and how to handle it

There isn’t a setting in the manifest, and Huawei has enabled Tinder because it’s a popular app. There isn’t a way to know if apps are protected. Anyway I used ifHuaweiAlert() in onCreate() to show an AlertDialog: private void ifHuaweiAlert() { final SharedPreferences settings = getSharedPreferences(“ProtectedApps”, MODE_PRIVATE); final String saveIfSkip = “skipProtectedAppsMessage”; boolean skipMessage = … Read more