I have an application that almost always needs to know the location of the user.
When I need to access a location, I do this:
final AlertDialog.Builder builder = new AlertDialog.Builder( MapScreen.this); builder.setTitle("MyAppName"); builder.setMessage("The location service is off. Do you want to turn it on?"); builder.setPositiveButton("Enable location", new DialogInterface.OnClickListener() { @Override public void onClick( final DialogInterface dialogInterface, final int i) { startActivity(new Intent( android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS)); } }); builder.setNegativeButton("Continue without location", null); builder.create().show();
However, GPS gives me some information that is not always accurate enough. Wi-Fi always gives me enough refueling, so I want to ask the user to turn on Wi-Fi in the same way as I ask to turn it on. I donโt want to just turn it on, I want the user to be notified about it and manually turn it on.
Are there any intentions to bring the WiFi menu to the user?
source share