Skip to content

Instantly share code, notes, and snippets.

View laramartin's full-sized avatar

Lara Martin laramartin

View GitHub Profile
package eu.laramartin.reportcard;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Lara on 28/08/2016.
*/
public class ReportCard {
int studentId;
#!/bin/bash
adb shell settings put global sysui_demo_allowed 1
adb shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1200
adb shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e level 4 -e datatype false
adb shell am broadcast -a com.android.systemui.demo -e command notifications -e visible false
adb shell am broadcast -a com.android.systemui.demo -e command battery -e plugged false -e level 100
adb shell am broadcast -a com.android.systemui.demo -e command exit
PROJECT LICENSE
This project was submitted by Lara Martín as part of the Nanodegree At Udacity.
As part of Udacity Honor code, your submissions must be your own work, hence
submitting this project as yours will cause you to break the Udacity Honor Code
and the suspension of your account.
Me, the author of the project, allow you to check the code as a reference, but if
you submit it, it's your own responsibility if you get expelled.
#!/usr/bin/env bash
locales=('en-US')
tests_apk_path="/path/to/app-debug-androidTest.apk"
app_apk_path="/path/to/app-debug.apk"
./gradlew assembleDebug assembleAndroidTest
rm -r /path/to/fastlane/metadata/android/
function start_clean_status_bar {
# Start demo mode
adb shell settings put global sysui_demo_allowed 1
# Display time 12:00
adb shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1200
# Display full mobile data without type
adb shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e level 4 -e datatype false
adb shell am broadcast -a com.android.systemui.demo -e command network -e wifi show -e level 4 -e fully true
# Hide notifications
for i in "${locales[@]}"
do
start_clean_status_bar
fastlane screengrab \
--locales=$i \
--tests_apk_path="$tests_apk_path" \
--app_apk_path="$app_apk_path"
stop_clean_status_bar
done
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#4d4d4d"
android:pathData="M1,1H20v1H1" />
class Gamer constructor(username: String){
...
}
class Gamer constructor(username: String) {
val username : String
init {
this.username = username
}
}
class Gamer(val username: String)