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
package com.ryanharter.android.util; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
/** | |
* Keeps track of the number of app launches, and days since first launch, and | |
* provides an easy way to determine whether you should show a rating prompt | |
* or not. | |
*/ |
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
#!/bin/bash | |
USAGE="Usage is: ./svg-to-android.sh <svg_file> <exported_png_name> <width_dp> <height_dp> [resources_dir] \n \ | |
If 'resources_dir' is ommited, a new folder is created in the current directory, named after the svg name.\n \ | |
Param 'exported_png_name' does not need extension.\n \ | |
On Mac OS specify full path for svg file and resources directory.\n \ | |
Exiting." | |
if [[ -z "$1" ]]; | |
then |
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
07-25 16:47:31.812 1715-4811/com.mirror.account.sample D/GigyaRequest: sendRequest[comments.getComments]: | |
{ | |
"UID": "_guid_L-E_Ea7bHymrSJwNpVuJrvlfXMrhd6rivj2_s4uUS30=", | |
"categoryID": "News", | |
"includeStreamInfo": true, | |
"includeUserOptions": true, | |
"start": "", | |
"streamID": "mirror-10663290", | |
"threadDepth": 5, | |
"threadLimit": 5 |
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
07-25 16:49:49.607 1715-1086/com.mirror.account.sample D/GigyaRequest: sendRequest[comments.vote]: | |
{ | |
"UID": "_guid_L-E_Ea7bHymrSJwNpVuJrvlfXMrhd6rivj2_s4uUS30=", | |
"categoryID": "News", | |
"commentID": "85c4d352f6014ce2bd20deab234de6db", | |
"streamID": "mirror-10663290", | |
"vote": "pos" | |
} | |
07-25 16:49:50.131 1715-1715/com.mirror.account.sample D/GigyaRequest: sendRequest[comments.vote]: errorCode:0 |
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
07-25 16:50:56.807 1715-8736/com.mirror.account.sample D/GigyaRequest: sendRequest[comments.getComments]: | |
{ | |
"UID": "_guid_L-E_Ea7bHymrSJwNpVuJrvlfXMrhd6rivj2_s4uUS30=", | |
"categoryID": "News", | |
"includeStreamInfo": true, | |
"includeUserOptions": true, | |
"start": "", | |
"streamID": "mirror-10663290", | |
"threadDepth": 5, | |
"threadLimit": 5 |
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
/* | |
* Copyright (C) 2013 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 |
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
private lateinit var activity: MyActivity | |
@Before | |
fun setUp() { | |
// Prepare fake data for MyActivity and MyFragment | |
// ... | |
// Open the activity that contains the Fragment under test | |
activity = Robolectric.setupActivity(MyActivity::class.java) | |
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
private lateinit var scenario: FragmentScenario<SearchFragment> | |
private val parentActivity = mock<SearchFragment.ParentActivity>() | |
@Before | |
fun setUp() { | |
// Prepare fake data for SearchFragment | |
// ... | |
// Setup the FragmentScenario and attach any required mock data to it | |
scenario = launchFragmentInContainer<SearchFragment>(Bundle.EMPTY, R.style.Theme_AppCompat_Light) |
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
@RunWith(AndroidJUnit4.class) | |
public class ScreenshotsAutomator { | |
@BeforeClass | |
public static void setUpOnce() { | |
EspressoTestSetup.injectScreenshotsData(...); | |
// Tell AndroidX to process each screenshot with our 'processor' | |
// See https://github.com/android/android-test/blob/master/runner/android_junit_runner/java/androidx/test/runner/screenshot/BasicScreenCaptureProcessor.java | |
Screenshot.setScreenshotProcessors( |