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 enum HockeyAppHelper { | |
instance; | |
private static final String HOCKEY_UPLOAD_URL = "https://rink.hockeyapp.net/api/2/apps/{0}/crashes/"; | |
private static final String TAG = HockeyAppHelper.class.getSimpleName(); | |
private CrashManagerListener listener; | |
public static void checkForCrashes(@NotNull final Activity context) { | |
instance.listener = createCrashManagerListener(context); |
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 ColorDrawable generateRandomColor() { | |
return generateRandomColor(255, 255, 255, 255); | |
} | |
public static ColorDrawable generateRandomColor(int alpha, int red, int green, int blue) { | |
final Random random = new Random(); | |
int r = random.nextInt(256); |
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
namespace Platform.Android.NexusPlayer | |
{ | |
public class NexusPlayerRemoteDelegate : MonoBehaviour | |
{ | |
/** | |
* Nexus Player KeyCodes | |
* | |
* |-------------------------------------------------------------| | |
* |------------------------ F2 ---------------------------------| |
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
@see https://github.com/android/platform_frameworks_base/tree/master/core/res/res | |
Language / Locale Supported since version | |
English, US (en_US) 1.1 | |
German, Germany (de_DE) 1.1 | |
Chinese, PRC (zh_CN) 1.5 | |
Chinese, Taiwan (zh_TW) 1.5 | |
Czech, Czech Republic (cs_CZ) 1.5 | |
Dutch, Belgium (nl_BE) 1.5 |
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
<!-- | |
Transparency | |
100% — FF | |
95% — F2 | |
90% — E6 | |
85% — D9 | |
80% — CC | |
75% — BF |
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
Observable. | |
timer(10, TimeUnit.SECONDS) | |
.subscribeOn(Schedulers.newThread()) | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribe(r -> { | |
Logger.v(tag(), "on complete " + r); | |
}, Throwable::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
#!/bin/bash | |
set -ex | |
echo y | android update sdk --no-ui --all --filter extra-android-support | grep 'package installed' | |
echo y | android update sdk --no-ui --all --filter platform-tools | grep 'package installed' | |
echo y | android update sdk --no-ui --all --filter tools | grep 'package installed' | |
echo y | android update sdk --no-ui --all --filter build-tools-24.0.1 | grep 'package installed' | |
echo y | android update sdk --no-ui --all --filter android-24 | grep 'package installed' | |
echo y | android update sdk --no-ui --all --filter extra-android-m2repository | grep 'package installed' | |
echo y | android update sdk --no-ui --all --filter extra-google-m2repository | grep 'package installed' |
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
configurations.all { | |
resolutionStrategy.force 'com.android.support:support-annotations:24.2.0' | |
} |
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 boolean isInForeground() { | |
Activity activity = getActivity(); | |
return activity != null && !activity.isFinishing() && activity.getWindow() != null; | |
} |
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
#!/bin/bash | |
set -ex | |
echo y | android update sdk --no-ui --all --filter extra-android-support | grep 'package installed' | |
echo y | android update sdk --no-ui --all --filter build-tools-24.0.1 | grep 'package installed' | |
echo y | android update sdk --no-ui --all --filter android-24 | grep 'package installed' | |
echo y | android update sdk --no-ui --all --filter extra-android-m2repository | grep 'package installed' |