Skip to content

Instantly share code, notes, and snippets.

View ingyesid's full-sized avatar
🏠
Working from home

Yesid Lázaro Mayoriano ingyesid

🏠
Working from home
View GitHub Profile
@ingyesid
ingyesid / layout.xml
Last active November 27, 2016 07:32
Colored Button Style With AppCompat +22
<Button
android:id="@+id/but_next"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/but_continue"
android:theme="@style/Button.Tinted" />
@ingyesid
ingyesid / ChromeTabsUtils.java
Last active September 6, 2015 02:30
Utils for Android's CustomTabs Support Library
/*
* Copyright 2015 Diego Rossi (@_HellPie)
*
* 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
@ingyesid
ingyesid / UploadWorkouts.java
Created January 3, 2016 17:02 — forked from baluubas/UploadWorkouts.java
Uploading a workout to Google Fit
package com.anderspersson.mioji.Services.GoogleFit;
import android.app.IntentService;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.support.annotation.NonNull;
[
{
"name": "Timon",
"description": "El travieso de la manada, hermano de pumba, hijo de Rozy. le encanta nadar.",
"photo_url": "https://media.istockphoto.com/id/1456853266/es/foto/retrato-del-perro-golden-retriever-con-correa-en-la-boca-sobre-fondo-amarillo.jpg?s=612x612&w=0&k=20&c=ykVjasaoxoiAxZaLtACeZDz-ILGybcTbwf062bPrD7s=",
"age": 2
},
{
"name": "Nala",
"description": "La más joven de la manada, super protectora como su mamá, le encanta salir a caminar y atacar las gallinas.",
fun parseISOMessageWithDebug(message: String): Map<Int, String> {
val result = mutableMapOf<Int, String>()
// Extraer MTI (primeros 4 caracteres)
val mti = message.substring(0, 4)
result[0] = mti
println("MTI: $mti")
// Extraer el Bitmap primario (64 bits = 16 caracteres hexadecimales)
val primaryBitmap = message.substring(4, 20)