Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void showSettingsNetworkAlert(){
- AlertDialog.Builder alertDialog = new AlertDialog.Builder(mContext);
- alertDialog.setTitle("Network is settings");
- alertDialog.setMessage("Network is not enabled. Do you want to go to settings menu?");
- alertDialog.setPositiveButton("Settings", new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog,int which) {
- Intent intent = new Intent(Settings.ACTION_SETTINGS);
- mContext.startActivity(intent);
- }
- });
- alertDialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- dialog.cancel();
- }
- });
- alertDialog.show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement