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 Test { | |
fun <reified T : Parcelable> ByteString.toParcelable(): T { | |
val parcel = Parcel.obtain() | |
val byteArray = toByteArray() | |
parcel.unmarshall(byteArray, 0, byteArray.size) | |
parcel.setDataPosition(0) | |
val rtn = parcel.readParcelable<T>(null)!! | |
parcel.recycle() | |
return rtn | |
} |
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 com.crashlytics.android.answers.Answers; | |
import com.crashlytics.android.answers.CustomEvent; | |
import com.squareup.okhttp.Interceptor; | |
import com.squareup.okhttp.MediaType; | |
import com.squareup.okhttp.Request; | |
import com.squareup.okhttp.RequestBody; | |
import com.squareup.okhttp.Response; | |
import com.squareup.okhttp.ResponseBody; | |
import java.io.IOException; |
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
/* | |
* Copyright (c) 2013 Calvin Rien | |
* | |
* Based on the JSON parser by Patrick van Bergen | |
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
* | |
* Simplified it so that it doesn't throw exceptions | |
* and can be used in Unity iPhone with maximum code stripping. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
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 controllers | |
import play.api.libs.ws.WS | |
import play.api.mvc.{Action, Controller} | |
import scala.concurrent.Future | |
class VerifyCredentialsController extends Controller { | |
implicit val context = scala.concurrent.ExecutionContext.Implicits.global |