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 com.example.study0930; | |
import android.app.Activity; | |
import android.app.ProgressDialog; | |
import android.os.AsyncTask; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.view.View; | |
import android.view.View.OnClickListener; | |
import android.widget.Button; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.dhw" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<!-- インターネット接続に必須--> | |
<uses-permission android:name="android.permission.INTERNET"/> | |
<uses-sdk |
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
InputStream in = null; | |
try { | |
// ②feedjsonを読み込む | |
in = getAssets().open("feed.json"); | |
BufferedReader buff = new BufferedReader(new InputStreamReader(in)); | |
StringBuilder bld = new StringBuilder(); | |
String line = null; | |
while ((line = buff.readLine()) != null) { | |
bld.append(line); | |
} |
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 com.example.listviewsample; | |
/** | |
* カスタマイズしたリストのビューは、タイトルや本文、画像のURLなど複数のデータを保持している。 | |
* データをやりとりするためのクラス Data Transfer Object を利用すると良い。 | |
* @author shikajiro | |
* | |
*/ | |
public class ArticleDTO { | |
private String title; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.gpsexample" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk | |
android:minSdkVersion="8" | |
android:targetSdkVersion="17" /> |
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 com.example.dhw; | |
import android.content.Context; | |
import android.database.sqlite.SQLiteDatabase; | |
import android.database.sqlite.SQLiteDatabase.CursorFactory; | |
import android.database.sqlite.SQLiteOpenHelper; | |
public class DBHelper extends SQLiteOpenHelper { | |
public DBHelper(Context context, String name, CursorFactory factory, int version) { |
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
echo "start adb shell capture" | |
DATE=$(date +%Y%m%d%H%M%S) | |
FILENAME=${DATE}.png | |
DROPBOX_ID=462856 | |
adb shell screencap -p /sdcard/temp.png | |
adb pull /sdcard/temp.png ~/Dropbox/Public/capture/${FILENAME} | |
adb shell rm /sdcard/temp.png | |
DROPBOX_URL=https://dl.dropboxusercontent.com/u/${DROPBOX_ID}/capture/${FILENAME} |
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
echo "start adb shell capture" | |
DATE=$(date +%Y%m%d%H%M%S) | |
FILENAME=${DATE}.mp4 | |
DROPBOX_ID=462856 | |
adb shell screenrecord --verbose --time-limit 5 --size 540x960 /sdcard/demo.mp4 | |
adb pull /sdcard/demo.mp4 ~/Dropbox/Public/capture/${FILENAME} | |
adb shell rm /sdcard/temp.png | |
DROPBOX_URL=https://dl.dropboxusercontent.com/u/${DROPBOX_ID}/capture/${FILENAME} |
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
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
tools:context=".MainActivity" > | |
<ListView | |
android:id="@+id/musicList" | |
android:layout_width="match_parent" |
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 com.example.contentprovidersample; | |
import android.app.Activity; | |
import android.database.Cursor; | |
import android.os.Bundle; | |
import android.provider.MediaStore; | |
import android.util.Log; | |
import android.view.Menu; | |
public class MainActivity extends Activity { |