I can't get the mac address
can anyone help me please
I am newbies in android development please help me
manifest.xml
<receiver
android:name="com.example.v3rlu.authentification.DeviceAdmin"
android:permission="android.permission.BIND_DEVICE_ADMIN">
<meta-data android:name="android.app.device_admin"
android:resource="@xml/xml" />
<intent-filter>
<action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
<action android:name="android.app.action.ACTION_DEVICE_ADMIN_DISABLE_REQUESTED" />
<action android:name="android.app.action.ACTION_DEVICE_ADMIN_DISABLED" />
</intent-filter>
</receiver>
launch activity checkact
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_check);
mac=(TextView) findViewById(R.id.textView) ;
DeviceAdminReceiver admin = new DeviceAdminReceiver();
DevicePolicyManager devicepolicymanager =
admin.getManager(getApplicationContext());
ComponentName name1 = admin.getWho(getApplicationContext());
if (devicepolicymanager.isAdminActive(name1)){
mac_address = devicepolicymanager.getWifiMacAddress(name1);}
mac.setText(mac_address);
}}
for the receiverclass I got the code from android site