View Android best practices
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
#Android best practices |
View build.gradle
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
android { | |
dexOptions { | |
def filecheck = new File( 'local.properties' ) | |
if (filecheck.exists()) { | |
preDexLibraries true | |
} else { | |
preDexLibraries false | |
} | |
} | |
} |
View sample_toggle_config.json
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
{"name": "jsappbasics", "features": | |
[ | |
{"name":"video", "state":"disabled", "default": "enabled", "rules":[ | |
{"state": "disabled", "value": | |
{"apilevel_min": 21, "apilevel_max": 23, "appversion_min": 11, "appversion_max": 13, "date_min": 1452766668000, "date_max": 1455566668000, "buildtype":"debug", "device":[{"manufacturer":"xiaomi","model":"mi3"}, {"manufacturer":"samsung", "model":"s4"}]} | |
}, | |
{"state": "disabled", "value": {"appversion_max": 13}} | |
]}, | |
{"name":"crash_reporting", "rules":[ | |
{"state": "disabled", "value": |
View ObjectStore.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
package com.farmily.android.store; | |
import android.content.Context; | |
import com.anupcowkur.reservoir.Reservoir; | |
import rx.Observable; | |
import rx.Subscriber; | |
import rx.schedulers.Schedulers; |
View build.gradle
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
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion 22 | |
buildToolsVersion "22.0.1" | |
defaultConfig { | |
applicationId "com.example.databaseexample" | |
minSdkVersion 14 | |
targetSdkVersion 22 |
View skills.json
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
[ | |
{ | |
"displayName": "\"java script\"", | |
"id": 2651 | |
}, | |
{ | |
"displayName": "\tBusiness Planning & Analysis", | |
"id": 6279 | |
}, | |
{ |
View message.json
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
{ | |
"action": 8, | |
"message_time": "hhmmz", | |
"group_flag": 0, | |
"media_id": 123, | |
"payload:": "alpha", | |
"from": 1, | |
"to": 3, | |
"chat_type": 0, | |
"chat_message": "Hello this is a message", |
View promocode.json
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
[{ | |
"coupon-code":"ABCD", | |
"version":"1", | |
"coupon-validity-from":"01/01/2014", | |
"coupon-validity-to":"01/02/2014", | |
"features-list":{ | |
"recording":"enabled", | |
"gain":"enabled" | |
}, | |
"subscription-validity":"lifetime" |
View build.gradle
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
apply plugin: 'com.android.application' | |
apply plugin: 'hugo' | |
android { | |
compileSdkVersion 20 | |
buildToolsVersion "20.0.0" | |
defaultConfig { | |
applicationId "com.myorg.myapp" | |
minSdkVersion 19 |
View build.gradle
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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.12.2' | |
classpath 'com.jakewharton.hugo:hugo-plugin:1.1.0' |
NewerOlder