Skip to content

Instantly share code, notes, and snippets.

TypeToken<Map<String, String>> mapType = new TypeToken<Map<String, String>>() {
};
new TypeAdapterFactory() {
@Override
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
if(type.equals(mapType)) {
return new TypeAdapter<T>() {
@Override
public void write(JsonWriter out, T value) throws IOException {
{
"horizonForm" : {
"title" : "OASIS #1",
"description" : "Form used for evaluating patient.",
"pages" : [
[
{
"number" : 1,
"mooNumber" : "M112",
"hasCheckMark": true,
[
{
"questionNumber": 3,
"mooNumber": "M12",
"TimeSpent": 33,
"timeStarted": 80,
"questionsFromPage" : [
//list of questions in a page
]
},
package com.koziodigital.bluetooth;
import android.content.Context;
import android.media.AudioManager;
import android.media.MediaRecorder;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
REQUEST
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prof="http://profile.webservices/">
<soapenv:Header/>
<soapenv:Body>
<prof:getUserInfo>
<UserID>1</UserID>
</prof:getUserInfo>
</soapenv:Body>
</soapenv:Envelope>
POST http://173.164.36.4:8080/TrackingWS/Pro HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "getUserInfo"
Content-Length: 281
Host: 173.164.36.4:8080
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prof="http://profile.webservices/">
12-14 15:28:56.302 12753-12753/? A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 12753 (iesanywhere_ama)
12-14 15:28:56.402 258-258/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-14 15:28:56.402 258-258/? I/DEBUG: Build fingerprint: 'Amazon/thor/thor:4.4.3/KTU84M/13.4.5.5_user_455004220:user/release-keys'
12-14 15:28:56.402 258-258/? I/DEBUG: Revision: '0'
12-14 15:28:56.402 258-258/? I/DEBUG: pid: 12753, tid: 12753, name: patrykapp >>> com.patryk.io <<<
12-14 15:28:56.402 258-258/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
12-14 15:28:56.592 258-258/? I/DEBUG: r0 41828328 r1 b5c00019 r2 00000000 r3 00000000
12-14 15:28:56.592 258-258/? I/DEBUG: r4 57a10c50 r5 418299f8 r6 41828328 r7 4169aa8c
12-14 15:28:56.592 258-258/? I/DEBUG: r8 bebab140 r9 4169aa84 sl 41829a08 fp bebab154
12-14 15:28:56.592 258-258/? I/DEBUG: ip 5d55d855 sp bebab130 lr 415e2690 pc 5d55d858 cpsr 800f0030
t.onload = t.onreadystatechange = function() {
r || this.readyState && "loaded" !== this.readyState && "complete" !== this.readyState || (r = !0,
n(),
t.onload = t.onreadystatechange = null,
i && t.parentNode && i.removeChild(t))
}
{
"firstName" : "Patryk",
"lastName" : "Poborca",
"weight" : {
"value" : "180",
"unitType" : "KG"
}
}
package patrykpoborca.io.testapp;
import android.content.Context;
import android.os.Bundle;
import android.os.Looper;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.LinearLayout;
import android.widget.TextView;