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 androidx.compose.foundation.BorderStroke | |
/* | |
* Copyright 2020 The Android Open Source Project | |
* | |
* 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 |
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
class FirebaseMessagingProxyService : FirebaseMessagingService() { | |
private val messagingServices: List<FirebaseMessagingService> by lazy { | |
listOf(FlutterFirebaseMessagingService()) | |
.onEach { it.injectContext(this) } | |
} | |
override fun onNewToken(token: String) { | |
super.onNewToken(token) | |
Log.d(TAG, "onNewToken: token") |
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 void login(final String mac, final String devicesOs, final String appVersion, String userAcct, String userPwd, String memType) { | |
getSubscription().add(ApiClient.getInstance().personLogin(mac, devicesOs, appVersion, userAcct, userPwd, memType) | |
.subscribeOn(Schedulers.newThread()) // (1) | |
.observeOn(AndroidSchedulers.mainThread()) // (2) | |
.flatMap(new Func1<PersonLogin, Observable<PersonData>>() { | |
@Override | |
public Observable<PersonData> call(PersonLogin personLogin) { | |
// main thread | |
return ApiClient.getInstance().queryPersonData(mac, devicesOs, appVersion, personLogin.getUId(), personLogin.getSessionId()).subscribeOn(Schedulers.newThread()); | |
} |
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.donnfelker.rxexample; | |
import android.os.Bundle; | |
import android.support.v7.app.ActionBarActivity; | |
import rx.Subscriber; | |
import rx.Subscription; | |
import rx.android.schedulers.AndroidSchedulers; | |
import rx.schedulers.Schedulers; |
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.your.package; | |
import android.support.design.widget.Snackbar; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import com.daimajia.easing.BaseEasingMethod; | |
import com.daimajia.easing.Glider; | |
import com.daimajia.easing.Skill; | |
import com.nineoldandroids.animation.AnimatorSet; |
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.github.pgloaguen; | |
import android.animation.ValueAnimator; | |
import android.graphics.ColorMatrix; | |
import android.graphics.ColorMatrixColorFilter; | |
import android.view.animation.AccelerateDecelerateInterpolator; | |
import android.view.animation.Interpolator; | |
import android.widget.ImageView; | |
import java.lang.ref.SoftReference; |
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/sh | |
# | |
# Startup / shutdown script for the couchbase sync_gateway | |
# | |
if [ "$(id -u)" != "0" ]; then | |
echo "Must run as root" | |
exit 1 | |
fi |