https://www.iubenda.com/blog/about-googles-eu-user-consent-policy/
Android script to output a “cookie notice”
// This code works on Android API level 1 (Android 1.0) and up.
// Tested on the latest (at the moment) API level 19 (Android 4.4 KitKat).
// In the main activity of your app:
public class MainActivity extends Activity {
(...)
@Override
public void onStart() {
super.onStart();
final SharedPreferences settings =
getSharedPreferences("localPreferences", MODE_PRIVATE);
if (settings.getBoolean("isFirstRun", true)) {
new AlertDialog.Builder(this)
.setTitle("Cookies")
.setMessage("Your message for visitors here")
.setNeutralButton("Close message", new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
settings.edit().putBoolean("isFirstRun", false).commit();
}
}).show();
}
}
}