Skip to content

Instantly share code, notes, and snippets.

View David-Hackro's full-sized avatar
🏠
Working from home

David Hackro David-Hackro

🏠
Working from home
View GitHub Profile
? I/Appboy v3.1.1 .bo.app.go: Setting Braze Override configuration with config: AppboyConfig{ApiKey = '8b646d5e-9477-4c35-9461-a7a732a3e0e4'
ServerTarget = 'null'
SdkFlavor = 'null'
SmallNotificationIcon = 'null'
LargeNotificationIcon = 'null'
SessionTimeout = 11
DefaultNotificationAccentColor = null
TriggerActionMinimumTimeIntervalSeconds = 5
BadNetworkInterval = 120
GoodNetworkInterval = 60
E/Appboy v3.1.1 .com.appboy.Appboy: The AppboyFcmReceiver should be replaced with the AppboyFirebaseMessagingService. Check your AndroidManifest. See https://www.braze.com/docs/developer_guide/platform_integration_guides/android/push_notifications/integration/#displaying-push
E/Appboy v3.1.1 .com.appboy.Appboy: The Braze SDK is not integrated correctly. Please visit https://www.braze.com/documentation/Android
E/Appboy v3.1.1 .bo.app.cw: Error occurred while executing Braze request: An error occurred during request processing, resulting in no valid response being received. Check the error log for more details.
E/Appboy v3.1.1 .bo.app.cw: Error occurred while executing Braze request: An error occurred during request processing, resulting in no valid response being received. Check the error log for more details.
@David-Hackro
David-Hackro / example.xml
Created February 27, 2019 23:12
recycler
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:layout_width="0dp"
func almostIncreasingSequence(sequence: [Int]) -> Bool {
if (isIncreasingSequence(sequence : sequence)) {
return true;
}
for (n, c) in sequence.enumerated() {
var tmpSequence = sequence.dropFirst(0);
tmpSequence = tmpSequence[n...1];
if (isIncreasingSequence(sequence : Array<Int>(tmpSequence))) {
//Service GetStudent
public Observable<ResponseService> GetStudent(String id_student) {
return retrofit.create(Service.class).GetStudent(id_student);
}
//Ids of Students
String id_student1= "asdfghjkl11";
String id_student2= "qwertyuio88";
//creation of observables with the service
int COUNTER_START = 1;
int ATTEMPTST = 7;
int ORIGINAL_DELAY_IN_SECONDS = 2;
@Override
public Observable<ResponseService> getAllBus(String idSearch) {
return remoteData.servicePolling(idSearch)
.repeatWhen(new Func1<Observable<? extends Void>, Observable<?>>() {
@Override
public void RemoteClass(){
//funcion con el service de getAllGeneros
private Observable<GenerosResponse> makeRequestToServiceGender() {
return service.getAllGeneros("movie","list","key"); //some network call
}
//funcion con el service de getAllMovies
private Observable<ResponseMovies> makeRequestToServiceMovies(Genre genre) {
return service.getAllMovies(genre.getId(),"movies","key","created_at.asc"); //some network call based on response from ServiceA
public interface api{
@GET("{movie}/{list}")
Observable<GenerosResponse> getAllGeneros(
@Path("movie")String movie,
@Path("list")String list,
@Query("api_key")String key);
@GET("{number}/{movies}")
Observable<ResponseMovies> getAllMovies(
@Path("number")int number,
@Path("movies")String movies,
public class Result {
private boolean adult;
private String backdropPath;
private List<Integer> genreIds = null;
private int id;
private String originalLanguage;
private String original_title;
private String overview;
private String release_date;
private String poster_path;
public class ResponseMovies {
private int id;
private int page;
private List<Result> results = null;
private int totalPages;
private int totalResults;
}