Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ua.inazaruk.internalandhidden;
- import android.app.Activity;
- import android.content.Context;
- import android.net.wifi.WifiManager;
- import android.os.Bundle;
- import android.util.Log;
- import com.android.internal.os.PowerProfile;
- public class TestActivity extends Activity {
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
- /* example of Internal API */
- PowerProfile profile = new PowerProfile(this);
- int speedSteps = profile.getNumSpeedSteps();
- Log.d("Internal API","Speed steps: "+speedSteps);
- /* examaple of Hidden API */
- WifiManager wifiManager = (WifiManager)getSystemService(Context.WIFI_SERVICE);
- boolean wifiApEnabled = wifiManager.isWifiApEnabled();
- Log.d("Hidden API","Wifi AP enabled:"+wifiApEnabled);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement