2013-09-01から1ヶ月間の記事一覧
参考:ListViewの基本形とArrayAdapterクラス package com.efolab; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.LinearLayout; import android.wid…
private void getManifest(){ ApplicationInfo appliInfo = null; String packageName ="org.mozilla.firefox"; try { Context c = createPackageContext(packageName,CONTEXT_IGNORE_SECURITY); appliInfo = c.getPackageManager().getApplicationInfo(pack…
エミュレータへのコマンド adb devicesadb shell netstatadb shell $ am monitor 80
アプリがインストールされていないとき main.js function launchApp(appUrl, storeUrl) { var iframe, time; iframe = document.createElement('iframe'); iframe.style.visibility = "hidden"; iframe.src = appUrl; document.body.appendChild(iframe); ti…
参考 Cookie とは、以下のようなことを実現するための機構です。 訪問者がそのページに何回訪れたか記録して表示する。 通常モード、フレームモードなど、訪問者の好みを記録しておき、次回訪問時にその好みのモードで表示する。 掲示板やチャットで入力した…
回避 var i for(i=0;i<10;i+=1){ //処理 } と、i++をi+=1
Intent intent = getIntent(); としてintentを受け取った後 以下のメソッドを実行 (intent.getData())など getData().toString(): myapp://com.efolab/openwith?hoge=1&moga=100 getAction(): android.intent.action.VIEW getDataString(): myapp://com.efol…
PackageManagerを使う Main.java package com.efolab.listofinstalled; import java.util.ArrayList; import java.util.List; import java.util.Map; import android.app.Activity; import android.content.Context; import android.content.pm.ApplicationI…
スクロールさせるとき import android.app.Activity; import android.os.Bundle; import android.widget.LinearLayout; import android.widget.ScrollView; public class ScrollViewTest extends Activity { ScrollView scrollView; LinearLayout linearLayo…
目的 EFOページを起動しているブラウザ(標準ブラウザ,FireFox,operaなど)から音声認識アプリを起動させる 音声認識アプリがインストールされていない場合はインストール用ページを表示する ブラウザの入力欄がフォーカス時に音声認識プログラムを起動する …
private void mWriteFile() { try { FileOutputStream fileOutputStream = openFileOutput("myfile.txt", MODE_PRIVATE); String writeString = "test"; fileOutputStream.write(writeString.getBytes()); } catch (FileNotFoundException e) { Toast.makeTe…
private void openBrower(){ String packageName = "com.android.browser"; String className = "com.android.browser.BrowserActivity"; Intent internetIntent = new Intent(Intent.ACTION_VIEW); internetIntent.addCategory(Intent.CATEGORY_LAUNCHER); …
Manifest.xml <activity android:name="Main" android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity>
"use strict" ( function() { function init() { alert("start"); xhrConnect(); }; function xhrConnect() { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState == 4) {// DONE if (xhr.status == 200) {// OK al…
<html lang="ja"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no"> <title>html5</title> </head> <body> </body> </html>