when the device is not connected to the internet, I send the user to the settings
startActivity(new Intent(android.provider.Settings.ACTION_SETTINGS)
but then I’m stuck in the settings page. How can I go back to my main activity?
thanks
Jul
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In that case, the user will have to explicitly go back to your activity (e.g. by pressing the back button a couple of times). I usually do this on my first
Activityin those kind of situations:As you can see, I check the Internet connection in the
onResumemethod, so that it will check if it user activated the WiFi or not.