Requirements:
-
Device should be a rooted (simulator’s are rooted by default)
-
adbd should be started as root. (Rub command:
adb root)
Now, send local push message using command:
| import androidx.animation.IntToVectorConverter | |
| import androidx.animation.tween | |
| import androidx.compose.Composable | |
| import androidx.compose.mutableStateOf | |
| import androidx.compose.remember | |
| import androidx.ui.animation.animatedFloat | |
| import androidx.ui.animation.animatedValue | |
| import androidx.ui.core.* | |
| import androidx.ui.core.gesture.scrollorientationlocking.Orientation | |
| import androidx.ui.foundation.animation.FlingConfig |
| public class InputStreamRequestBody extends RequestBody { | |
| private final InputStream inputStream; | |
| private final MediaType contentType; | |
| public InputStreamRequestBody(MediaType contentType, InputStream inputStream) { | |
| if (inputStream == null) throw new NullPointerException("inputStream == null"); | |
| this.contentType = contentType; | |
| this.inputStream = inputStream; | |
| } |
| import com.google.gson.Gson; | |
| import io.reactivex.Completable; | |
| import io.reactivex.Flowable; | |
| import io.reactivex.Maybe; | |
| import io.reactivex.MaybeSource; | |
| import io.reactivex.Observable; | |
| import io.reactivex.ObservableSource; | |
| import io.reactivex.Scheduler; | |
| import io.reactivex.Single; | |
| import java.lang.annotation.Annotation; |
Requirements:
Device should be a rooted (simulator’s are rooted by default)
adbd should be started as root. (Rub command: adb root )
Now, send local push message using command:
| /* | |
| * Copyright (C) 2016 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 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| /* | |
| * Copyright (C) 2017 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 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| package com.example.playground; | |
| import android.arch.lifecycle.Lifecycle; | |
| import android.arch.lifecycle.LifecycleObserver; | |
| import android.arch.lifecycle.OnLifecycleEvent; | |
| import android.support.annotation.NonNull; | |
| import android.util.Log; | |
| import java.lang.ref.WeakReference; | |
| import java.util.Map; |
| import javax.inject.Named; | |
| import javax.inject.Singleton; | |
| import io.reactivex.Observable; | |
| import io.reactivex.ObservableTransformer; | |
| import io.reactivex.Scheduler; | |
| @Singleton | |
| public class RxSchedulers { |