This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias adb_wifi='function _adb_wifi() { | |
DEBUG_PORT=`nmap -sT -p30000-45000 $1 |\ | |
tail -n 3 |\ | |
head -n 1 |\ | |
sed -r "s/([1-9][0-9]+)(\/tcp.+)/\1/"` | |
adb connect $1:$DEBUG_PORT | |
};_adb_wifi' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package mobileforum; | |
/** | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hu.aut.sensorhub.network.https; | |
import com.squareup.okhttp.OkHttpClient; | |
import android.content.Context; | |
import android.support.annotation.RawRes; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.security.KeyManagementException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.gson.Gson; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
import android.util.Log; | |
import java.lang.reflect.Type; | |
public class Eagle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Bitmap loadContactPhoto(ContentResolver cr, String uri) { | |
InputStream input = ContactsContract.Contacts.openContactPhotoInputStream(cr, uri); | |
if (input == null) { | |
return null; | |
} | |
return BitmapFactory.decodeStream(input); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Contact getContactByNumber(String number) | |
{ | |
Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number)); | |
Contact contact = new Contact(); | |
ContentResolver contentResolver = context.getContentResolver(); | |
Cursor contactLookup = null; | |
try | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainThreadBus extends Bus | |
{ | |
public MainThreadBus(ThreadEnforcer enforcer) | |
{ | |
super(enforcer); | |
} | |
private final Handler mHandler = new Handler(Looper.getMainLooper()); |