In my splash screen I have request to server, but when there's no internet connection i'm opening
Intent settingsIntent = new Intent(Settings.ACTION_SETTINGS);
startActivityForResult(settingsIntent, REQUEST_ENABLE_CONNECTION);
But problem is that onActivityResult
is called immediately with requestCode = REQUEST_ENABLE_CONNECTION
I've also tried to add the flag FLAG_NEW_TASK
for the intent with no luck.
The activity is not singleTop
or singleInstance
in the manifest
.
What is the best android solution to resolve this issue? I don't want to use Broadcast as it's not the best way to my flow so it will be taken as last choice for me.
Thanks a lot for the help.