Skip to content

Instantly share code, notes, and snippets.

View Cuncis's full-sized avatar
😜
Like a Boss

Cuncis

😜
Like a Boss
View GitHub Profile
public class HelloWorld {
public static void main(String[] args) {
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");
}
}
public class DatabaseHelper extends SQLiteOpenHelper {
public static final String DB_NAME = "biodata.db";
public static final int DB_VERSION = 1;
public static final String TABLE_NAME = "student";
public static final String ID = "id";
public static final String NAME = "name";
public static final String CITY = "city";
public static final String CURRENT_DATE = "current_date";
package com.example.bpr.bpr.view.Beranda.pengajuan_pinjaman;
import android.Manifest;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.graphics.Bitmap;
package com.example.bpr.bpr.view.Beranda.pengajuan_pinjaman;
import android.Manifest;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.graphics.Bitmap;
private void openWhatsApp() {
// Ganti nomermu
String smsNumber = "6283854775376"; // awal +62 berubah cuma 62 aja
try {
Intent sendIntent = new Intent("android.intent.action.MAIN");
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.setType("text/plain");
sendIntent.putExtra(Intent.EXTRA_TEXT, "Aku Orang Ganteng dan Intelek");
sendIntent.putExtra("jid", smsNumber + "@s.whatsapp.net");
sendIntent.setPackage("com.whatsapp");
@Cuncis
Cuncis / library
Last active March 24, 2020 01:51
fast android networking = implementation 'com.amitshekhar.android:android-networking:1.0.2'
//retrofit
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.okhttp3:okhttp:4.2.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
@Cuncis
Cuncis / Link
Created December 8, 2019 02:47
apply plugin: 'kotlin-kapt'
// additional
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
// retrofit + rxjava
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
apply plugin: 'kotlin-kapt'
// additional
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
// retrofit
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
@Cuncis
Cuncis / gist:82ee2b2c3791fe1bdc8eabb287658005
Last active April 23, 2020 11:07
LiveData ViewModel Coroutine Room
buildscript {
.......
ext {
roomVersion = '2.2.5'
archLifecycleVersion = '2.2.0'
coreTestingVersion = '2.1.0'
materialVersion = '1.1.0'
coroutines = '1.3.4'
}