Skip to content

Instantly share code, notes, and snippets.

View green760223's full-sized avatar

Lawrence Yi-Hsuan Chuang green760223

View GitHub Profile
// IMPORTANT: Check these settings with UnaBiz to use the SIGFOX library correctly.
static const String device = ""; // Set this to your device name if you're using SIGFOX Emulator.
static const bool useEmulator = false; // Set to true if using SIGFOX Emulator.
static const bool echo = true; // Set to true if the SIGFOX library should display the executed commands.
static const Country country = COUNTRY_SG; // Set this to your country to configure the SIGFOX transmission frequencies.
static UnaShieldV2S transceiver(country, useEmulator, device, echo); // Assumes you are using UnaBiz UnaShield V2S Dev Kit
.button {
outline: none;
}
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
private class getBookData extends AsyncTask<String, Integer, ArrayList<Book>> {
ArrayList<Book> booksResult = new ArrayList<Book>();
URL url = null;
StringBuffer sb = new StringBuffer();
String jsonResponse = "";
InputStream inputStream = null;
HttpURLConnection urlConnection = null;