Record a video of your app
Developer options -> Check show touches
adb shell screenrecord /sdcard/video.mp4
adb pull /sdcard/video.mp4
/** | |
* This class allows to inject into objects through a base class, | |
* so we don't have to repeat injection code everywhere. | |
* | |
* The performance drawback is about 0.013 ms per injection on a very slow device, | |
* which is negligible in most cases. | |
* | |
* Example: | |
* <pre>{@code |
#!/usr/bin/python | |
# License for any modification to the original (linked below): | |
# ---------------------------------------------------------------------------- | |
# "THE BEER-WARE LICENSE" (Revision 42): | |
# Sebastiano Poggi and Daniele Conti wrote this file. As long as you retain | |
# this notice you can do whatever you want with this stuff. If we meet some day, | |
# and you think this stuff is worth it, you can buy us a beer in return. | |
import argparse, sys, subprocess, tempfile |
/* | |
* Copyright (C) 2015 Jake Wharton | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
/* | |
* Copyright 2014 Chris Banes | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This is a short Gist showing how I transmit any uncaught exceptions happening in the Wearable part of my App to the connected Smartphone/Tablet. This is necessary because Android Wear devices are not directly connected to the Internet themselves.
##Wear
import rx.Observable; | |
import rx.subjects.PublishSubject; | |
import rx.subjects.SerializedSubject; | |
import rx.subjects.Subject; | |
/** | |
* Simple pass-thru event bus with error handling and reconnect. | |
*/ | |
public class EventBus { |
RecyclerView
does not have an OnItemClickListener like it's predecessor, ListView
. However, detecting item clicks is pretty simple.
Set an OnClickListener
in your ViewHolder
creation:
private class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> {
public static class ViewHolder extends RecyclerView.ViewHolder
# Retrofit, OkHttp, Gson | |
-keepattributes *Annotation* | |
-keepattributes Signature | |
-keep class com.squareup.okhttp.** { *; } | |
-keep interface com.squareup.okhttp.** { *; } | |
-dontwarn com.squareup.okhttp.** | |
-dontwarn rx.** | |
-dontwarn retrofit.** | |
-keep class retrofit.** { *; } | |
-keepclasseswithmembers class * { |
# Copyright (c) 2011, Eng Eder de Souza | |
# ___ _ _ ___ | |
# | __|__| |___ _ _ __| |___ / __| ___ _ _ _____ _ | |
# | _|/ _` / -_) '_| / _` / -_) \__ \/ _ \ || |_ / _` | | |
# |___\__,_\___|_| \__,_\___| |___/\___/\_,_/__\__,_| | |
#Accessing the Google API for speech recognition! | |
#Open a file type Wav to speech recognition | |
#This source does not require any external programs to perform audio conversions :-) | |
#http://ederwander.wordpress.com/2011/11/06/accessing-the-google-speech-api-python/ | |
#Eng Eder de Souza |