More Related Content
Similar to 第四回月次セミナー(公開版)
Similar to 第四回月次セミナー(公開版) (20)
第四回月次セミナー(公開版)
- 25. - FeliCaProxy FeliCa
http://www.sony.co.jp/Products/felica/consumer/download/felicaportsoftware.html
- 28. private static const PORT:int = 10250;
private var fc:FeliCaControl = new FeliCaControl();
public function doPolling():void{
! //
! fc.open(PORT);
}
- 30. //FeliCaProxy
//
private function doRWHold():void{
! //
! var request:FeliCaSessionRequest = new FeliCaSessionRequest();
! request.type! ! ! = FeliCaSessionRequest.HOLD;
! request.lockTimeout! this.lockTimeout;!
=
! request.unlockTimeout! = this.unlockTimeout;
! fc.access(request);
}
- 33. ✓ Polling
✓
FeliCa
FFFFh →
- 40. FeliCa
http://www.toppan-tl.co.jp/sp/nfc.html
- 46. AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="info.moaikids.android.nfc.twitter"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:icon="@drawable/icon" android:label="@string/app_name"
android:debuggable="true">
<activity android:name=".NfcTwitter"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.nfc.action.TECH_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="@xml/filter_nfc" />
</activity>
</application>
<uses-feature android:name="android.hardware.nfc" android:required="true" />
</manifest>
xml/filter_nfc.xml
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<tech-list><tech>android.nfc.tech.NfcF</tech></tech-list>
</resources>