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
for (String key : bundle.keySet()) { | |
Object value = bundle.get(key); | |
Log.d(TAG, String.format("%s %s (%s)", key, | |
value.toString(), value.getClass().getName())); | |
} |
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
try { | |
PackageInfo info = getPackageManager().getPackageInfo("com.xxx.yyy", PackageManager.GET_SIGNATURES); | |
for (Signature signature : info.signatures) { | |
MessageDigest md = MessageDigest.getInstance("SHA"); | |
md.update(signature.toByteArray()); | |
Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT)); | |
} | |
} catch (PackageManager.NameNotFoundException e) { | |
} catch (NoSuchAlgorithmException e) { | |
} |
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
if (Looper.getMainLooper().equals(Looper.myLooper())) { | |
// UI thread | |
} else { | |
// Non UI thread | |
} | |
// Run on UI | |
new Handler(Looper.getMainLooper()).post(new Runnable() { | |
@Override | |
public void run() { |
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
/** | |
* PagerTitleStrip is a non-interactive indicator of the current, next, | |
* and previous pages of a {@link ViewPager}. It is intended to be used as a | |
* child view of a ViewPager widget in your XML layout. | |
* Add it as a child of a ViewPager in your layout file and set its | |
* android:layout_gravity to TOP or BOTTOM to pin it to the top or bottom | |
* of the ViewPager. The title from each page is supplied by the method | |
* {@link PagerAdapter#getPageTitle(int)} in the adapter supplied to | |
* the ViewPager. | |
*/ |
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
Hi All! | |
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future. | |
Feel free to request any features you'd like to see, and I'll prioritize them accordingly. | |
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it. | |
Here's the link to the repository: https://github.com/Pulimet/ADBugger | |
App Description: | |
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups. |
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 String getAdvertisingId() { | |
try { | |
return AdvertisingIdClient.getAdvertisingIdInfo(Contextor.getInstance().getContext()).getId(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} catch (GooglePlayServicesNotAvailableException e) { | |
e.printStackTrace(); | |
} catch (GooglePlayServicesRepairableException e) { | |
e.printStackTrace(); | |
} |
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 OkHttpHelper { | |
public static final String TAG = "OkHttpHelper"; | |
public static final boolean SHOW_NETWORK_LOGS = true; | |
public static OkHttpClient getOkHttpClient() { | |
int cacheSize = 10 * 1024 * 1024; // 10 MB | |
Cache cache = new Cache(getCacheDir(), cacheSize); | |
return new OkHttpClient.Builder() | |
.addInterceptor(applicationInterceptor) |
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 DashTestActivity extends AppCompatActivity { | |
public static final String DASH_SAMPLE = "http://www.bok.net/dash/tears_of_steel/cleartext/stream.mpd"; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_dash_test); | |
SimpleExoPlayerView exoPlayerView = findViewById(R.id.exoPlayerView); |
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
# Gradle files | |
.gradle/ | |
# Intellij | |
.idea/ | |
*.iml | |
# Build | |
build/ |
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
private String gdprCounries[] = new String[]{ | |
"US", //United States | |
"UM", //United States Minor Outlying Islands | |
"AT", //Austria | |
"BE", //Belgium | |
"BG", //Bulgaria | |
"HR", //Croatia | |
"CY", //Cyprus | |
"CZ", //Czech Republic | |
"DK", //Denmark |
OlderNewer