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
public class GCMBroadcastReceiver extends BroadcastReceiver { | |
private static final String TAG = GCMBroadcastReceiver.class.getSimpleName(); | |
@Override | |
public void onReceive(Context context, Intent intent) { | |
if ("com.google.android.c2dm.intent.REGISTRATION".equals(intent.getAction())) { | |
// Register Localytics (this will call Localytics.handleRegistration(intent)) |
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 | |
# ------------------------------------------------------------------------------ | |
# This is a configuration file to set up a clean and safe development environment. | |
# To use this file, you need to source it (add a call in your ~/.bashrc file | |
# for example) then you can simply run functions | |
# Contact renaudmathieu.fr if you have any question. | |
# ------------------------------------------------------------------------------ | |
# ------------------------------------------------------------------------------ |
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
############################################################################### | |
# Continuous Integration Platform for Android with Jenkins using Docker | |
# You can provide your plugin list in a plugin.txt file | |
############################################################################### | |
FROM jenkins | |
MAINTAINER Renaud MATHIEU | |
ENV API_LEVEL 23 |
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
# Built application files | |
*.apk | |
*.ap_ | |
# Files for the ART/Dalvik VM | |
*.dex | |
# Java class files | |
*.class |
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
import android.content.Context | |
import android.graphics.Canvas | |
import android.graphics.drawable.Drawable | |
import android.support.v4.content.ContextCompat | |
import android.support.v7.widget.RecyclerView | |
class ListPaddingDecoration( | |
context: Context, | |
val paddingLeft: Int, | |
val paddingRight: Int |
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
/** | |
* A LiveData class which wraps the network connection status | |
* Requires Permission: ACCESS_NETWORK_STATE | |
* | |
* See https://developer.android.com/training/monitoring-device-state/connectivity-monitoring | |
* See https://developer.android.com/reference/android/net/ConnectivityManager | |
* See https://developer.android.com/reference/android/net/ConnectivityManager#CONNECTIVITY_ACTION | |
*/ | |
class ConnectivityLiveData @VisibleForTesting internal constructor( | |
private val connectivityManager: ConnectivityManager |
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
plugins { | |
id 'com.android.application' | |
id 'kotlin-android' | |
} | |
android { | |
compileSdkVersion 30 | |
buildToolsVersion "30.0.2" | |
defaultConfig { |
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
dependencies { | |
// Kotlin | |
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${Kotlin.version}") | |
// Ktor | |
implementation("io.ktor:ktor-server-netty:${Ktor.version}") | |
implementation("io.ktor:ktor-server-core:${Ktor.version}") | |
implementation("io.ktor:ktor-locations:${Ktor.version}") | |
implementation("io.ktor:ktor-server-tests:${Ktor.version}") |
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
object Kotlin { | |
const val version = "1.5.0" | |
} | |
object Ktor { | |
const val version = "1.5.4" | |
} | |
object Moshi { | |
const val version = "1.12.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
plugins { | |
id("org.openapi.generator") version "5.1.1" | |
} | |
openApiGenerate { | |
generatorName.set("kotlin") | |
inputSpec.set("./api-client.yml") | |
outputDir.set("$buildDir") | |
apiPackage.set("com.innovorder.data.api") | |
modelPackage.set("com.innovorder.data.models") |
OlderNewer