Skip to content

Instantly share code, notes, and snippets.

Nicolas POMEPUY PomepuyN

  • LevelUp Studio
  • France
Block or report user

Report or block PomepuyN

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:db67516349330ad9c988
DisplayManager.DisplayListener displayListener = new DisplayManager.DisplayListener() {
public void onDisplayAdded(int displayId) {
public void onDisplayRemoved(int displayId) {
PomepuyN /
Created Dec 15, 2014
Take a screenshot by second on android
while [ 1=1 ]
adb shell screencap -p | sed 's/\r$//' > screen${LEVEL}.png
PomepuyN /
Last active Jun 5, 2018
Functional example of WearableListView
public class SettingsAdapter extends WearableListView.Adapter {
private final Context context;
private final List<SettingsItems> items;
public SettingsAdapter(Context context, List<SettingsItems> items) {
this.context = context;
this.items = items;
PomepuyN / gist:7b29e2592d39d687e95a
Last active Aug 29, 2015
Request Wear Mini Launcher to be disabled on your app
View gist:7b29e2592d39d687e95a

As Wear Mini launcher constantly retain a zone of the screen from being touched, it may cause issue with your app. Here is how you can disable it when your app is running.


Add this line to your Manifest. Wear Mini Launcher will retrieve this meta to put your app in the exclusion list by default (the user will be able to revert this setting).

PomepuyN / Watch face Ambient mode detection
Last active Nov 5, 2018
Allow to detect Ambient mode to switch Watch face display on Wear devices
View Watch face Ambient mode detection
Handler handler = new Handler(Looper.getMainLooper());
final DisplayManager displayManager = (DisplayManager) getSystemService(Context.DISPLAY_SERVICE);
displayManager.registerDisplayListener(new DisplayManager.DisplayListener() {
public void onDisplayAdded(int displayId) {
You can’t perform that action at this time.