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 android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.os.Build; | |
import android.telephony.PhoneStateListener; | |
import android.telephony.TelephonyManager; | |
import permissions.dispatcher.PermissionUtils; | |
/* |
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
//=============ココらへん記述でコマンドラインは通る ========== | |
buildscript { | |
repositories { | |
jcenter() | |
maven { url 'https://maven.fabric.io/public' } | |
maven { url "https://plugins.gradle.org/m2/" } | |
//google() //support gradle runtime 4.0 upper | |
maven { url 'https://maven.google.com' } | |
} | |
dependencies { |
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
apply plugin: 'com.android.application' | |
apply plugin: 'realm-android' | |
import com.android.builder.core.DefaultManifestParser | |
android { | |
compileSdkVersion project.compileSdkVersion | |
buildToolsVersion project.buildToolsVersion | |
dataBinding { |
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
//ref https://gist.github.com/3595115 | |
// | |
// privious https://gist.github.com/kimukou/3598821 | |
import com.nihon0tc.ad.BuildConfig; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.slf4j.helpers.MessageFormatter; |
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
private static final float DEF_BASE_SCALE_X = 320.0f; | |
private static final float DEF_BASE_SCALE_Y = 240.0f; | |
private static final float DEF_BASE_HOSEI_X = 20.0f; | |
private static final float DEF_BASE_HOSEI_Y = 20.0f; | |
ImageView iv = (ImageView) gDlg.findViewById(R.id.gh_image); | |
if (sds.get(0).getData() != null) { | |
cleanupView(iv); //ivについてる画像情報を破棄する関数 | |
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
public class IrofDB { | |
public interface DataColumns extends BaseColumns { | |
public static final String _ID = "_id"; | |
public static final String _DATE = "_date_time"; | |
public static final String _OBJ = "_instance"; | |
} | |
private SQLiteDatabase irofDB; | |
private static final String DATABASE_TABLE = "irof_instance"; |
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
# sampling setiing | |
# https://github.com/irof/irof_history/blob/master/android/irof_history/AndroidManifest.xml | |
# | |
pkgname=com.irof.irof_history | |
start_activity=.IrofActivity | |
if [ $# -eq 0 ]; then | |
echo "=== usage: ===" | |
echo " ./apk_install.sh XXX.apk <DEVICE-ID>" |
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
//see http://jsoup.org/apidocs/ | |
// http://jsoup.org/cookbook/extracting-data/example-list-links | |
@Grab(group='org.jsoup', module='jsoup', version='1.7.2') | |
url ="http://atnd.org/events/39189" | |
//def txt = new URL(url).getText() | |
//println txt |
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
defaultTasks 'clean', 'build' | |
version = "x.y.z" | |
buildscript { | |
repositories { | |
maven { url 'http://repo1.maven.org/maven2' } | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.4' | |
} |
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
//see http://tatete.blogspot.jp/2012/01/androidxml.html | |
// http://tatete.blogspot.jp/2012/01/androidxml_18.html | |
// | |
@Grab('org.simpleframework:simple-xml:2.6.9') | |
import org.simpleframework.xml.Element | |
import org.simpleframework.xml.Root | |
import org.simpleframework.xml.core.Persister | |
@Root |
NewerOlder