# take screenshot
adb exec-out screencap -p > screen.png
# start intent with url, e.g. to test deep linking urls
adb shell 'am start -a android.intent.action.VIEW -d "https://my.url.io/my_file"'
# enter text
adb shell 'input text "asdf"'
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
/** | |
* Use methods provided in this class for linear interpolation over multiple argb colors, e.g. to | |
* create gradients. <br> | |
* For better results try converting to a different colorspace before interpolating (e.g. CIELAB | |
* {@link <a href="http://www.cs.rit.edu/~ncs/color/t_convert.html">Color Conversion Algorithms</a>} | |
* ). | |
*/ | |
public final class ColorInterpolator { | |
/** |
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
OkHttpClient okHttpClient = new OkHttpClient(); | |
try { | |
int cacheSize = 10 * 1024 * 1024 // 10 MiB | |
Cache cache = new Cache(getCacheDir(), cacheSize); | |
okHttpClient.setCache(cache); | |
} catch (IOException e) { | |
Log.e(TAG, "Could not set cache", e); | |
} | |
// Forces cache. Used for cache connection |