Skip to content

Instantly share code, notes, and snippets.

@knezmilos13
knezmilos13 / EnableTestTracing.java
Created September 21, 2017 07:47
From android-perf-testing codelab
/*
* Copyright 2015, Google Inc.
*
* 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
@knezmilos13
knezmilos13 / EnableLogcatDump.java
Created September 21, 2017 07:45
From android-perf-testing codelab
/*
* Copyright 2015, Google Inc.
*
* 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
@knezmilos13
knezmilos13 / crash_handling2.kt
Created September 18, 2017 07:53 — forked from fabiocarballo/crash_handling2.kt
Crash Handling II
class AppExceptionHandler(val systemHandler: Thread.UncaughtExceptionHandler,
val crashlyticsHandler: Thread.UncaughtExceptionHandler,
application: Application) : Thread.UncaughtExceptionHandler {
private var lastStartedActivity: Activity? = null
private var startCount = 0
init {
application.registerActivityLifecycleCallbacks(
@knezmilos13
knezmilos13 / make_screenshot.py
Created September 15, 2017 12:53
Trying out monkeyrunner. Not quite getting it, but might find out a use for it in the future.
# Imports the monkeyrunner modules used by this program
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
import os
PROJECT_PATH = 'C:\\Users\\User\\AndroidStudioProjects\\WowStore'
SCREENSHOTS_PATH = PROJECT_PATH + '\\screenshots'
APK_PATH = PROJECT_PATH + '/app/build/outputs/apk/app-debug.apk'
def doStuff():