Skip to content

Instantly share code, notes, and snippets.

View rakawestu's full-sized avatar

Raka Westu Mogandhi rakawestu

View GitHub Profile
@rakawestu
rakawestu / ConversationHistoryExample.kt
Created April 25, 2018 14:31
Prism Core SDK Example
class ConversationHistoryExample {
PrismCore.getInstance().getConversationHistory(
CONVERSATION_ID,
ACCESS_TOKEN,
object : Callback<ConversationHistoryResponse> {
override fun onSuccess(response: ConversationHistoryResponse) {
// Handle success obtain conversation history
}
override fun onFailure(error: PrismCoreException) {
@rakawestu
rakawestu / UiSettings.kt
Last active April 20, 2018 10:24
How to parse Prismapp settings
/**
* Created by rakawm on 6/6/17.
*/
class UiSettings {
var revision: Double? = null
var initialized: Boolean = false
var siteName: String? = null
var siteUrl: String? = null
var phone: String? = null
var installationComplete: Boolean? = null
@rakawestu
rakawestu / build.gradle
Created March 12, 2017 14:09
Library Module Proguard
buildTypes {
release {
minifyEnabled true
consumerProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
@rakawestu
rakawestu / ExampleLibraryUserFunction.java
Last active March 12, 2017 13:54
Example Library User Function
public void useFunction1ExampleLibrary() {
ExampleLibrary.getInstance().showExampleLibraryScreen(
YourActivity.this,
otherParams
);
}
public void useFunction2ExampleLibrary() {
ExampleLibrary.getInstance().exitExampleLibraryScreen(
YourActivity.this,
@rakawestu
rakawestu / ExampleLibrary.java
Last active March 12, 2017 14:15
Example of Library Project
public class ExampleLibrary {
private ExampleLibrary(String title, String message) {
// Initialize your Library here
}
class Builder {
private String title;
private String message;
@rakawestu
rakawestu / circle.yml
Created August 27, 2016 10:51
Circle CI Example Config for Android Automated Instrumentation Test
#
# Build configuration for Circle CI
#
general:
artifacts:
- /home/ubuntu/project-name/app/build/outputs/apk/
machine:
environment:
@rakawestu
rakawestu / app.js
Created July 21, 2016 06:59
Node JS and MySQL Example With Pug Templating Engine
var express = require('express');
var mysql = require('mysql');
var app = express();
///
/// Create connection to MySQL database server.
///
function getMySQLConnection() {
return mysql.createConnection({
@rakawestu
rakawestu / ParsePushBroadcastReceiver.java
Last active April 20, 2018 20:50
Get json payload from Parse push notification
public class ParsePushBroadcasReceiver extends ParsePushBroadcastReceiver{
/**
* Provide resource identifier of the small icon for each
* push notification in the notification bar.
* @param context application context
* @param intent intent
* @return the icon resource id.
*/
@Override