App application can not be separated from the server and network interaction, but there is time in the network information is not good time, we want to give the user tips for network settings, in our application will generally have a network load error (failure) of the page, above the operating controls, click to enter the mobile phone network settings interface, the code is very simple:
The /**intent object.
Intent Intent = null;
Mobile phone version of the system that determine / * * API greater than 10 is 3 or above and mobile phone Meizu.
If (android.os.Build.VERSION.SDK_INT > 10 & & android.os.Build.MANUFACTURER.equals! ("Meizu")) {
Intent = Intent new (android.provider.Settings.ACTION_WIRELESS_SETTINGS);
}
{else
Intent = Intent new ();
Component new = ComponentName ComponentName ("com.android.settings", "com.android.settings.WirelessSettings");
Intent.setComponent (component);
Intent.setAction ("android.intent.action.VIEW");
}
Context.startActivity (intent);
The above used to determine whether it is the Meizu phone, because we found in the project, the use of the Meizu phone to call the code in else.
Copyright statement: This article is the original article of the main Bo, without the permission of the owner.
- On aAn open source framework for increasing the interface experience of App project
- Next articleCustom CheckBox check and no style
- Top
- 0
- Step
- 0
- Guess what you're looking for.