public class LazyNfcFHCELite
extends java.lang.Object
LazyNfcFHCELite zlib License Copyright (c) 2018 GPS_NMEA_JP This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution.
コンストラクタと説明 |
---|
LazyNfcFHCELite() |
LazyNfcFHCELite(android.app.Activity activity,
java.lang.String packageName,
java.lang.String HCEService) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
disable()
HCE-Fサービスを無効化する.
|
void |
enable()
システムにサービスの存在を知らせ,HCE-Fサービスを有効化する.
|
static boolean |
isHCESupported(android.app.Activity activity)
この端末がHCE-Fをサポートしているかを返す
|
void |
register(android.app.Activity activity,
java.lang.String packageName,
java.lang.String LazyNfcFHCELiteProxy)
Activityの登録と各インスタンスの生成, LocalBroadcastManagerへの登録を行う.
|
void |
registerCallback(jp.ne.sakura.sabowl.gpsnmeajp.intent_hce.LazyNfcFHCELite.onHCEFAccessCallback callback)
FeliCa Lite相当のNFCパケットを受信した際に呼び出されるコールバックを登録する
|
void |
sendResponsePacket(byte[] responsePacket)
サービス側へsendResponsePacketの実行を依頼する.
|
void |
unregister()
Activityの登録解除と各インスタンスの破棄, LocalBroadcastManagerへの登録解除を行う.
|
void |
unregisterCallback()
コールバックを登録解除する
|
public LazyNfcFHCELite()
public LazyNfcFHCELite(android.app.Activity activity, java.lang.String packageName, java.lang.String HCEService)
public static boolean isHCESupported(android.app.Activity activity)
activity
- 現在のActivitypublic void register(android.app.Activity activity, java.lang.String packageName, java.lang.String LazyNfcFHCELiteProxy)
activity
- 現在のActivitypackageName
- 文字列.現在のパッケージ名を入れる.例:jp.ne.sakura.sabowl.gpsnmeajp.intent_hceLazyNfcFHCELiteProxy
- 文字列.Proxyサービスのフル名を入れる.例:jp.ne.sakura.sabowl.gpsnmeajp.intent_hce.LazyNfcFHCELiteProxypublic void unregister()
public void enable()
public void disable()
public void registerCallback(jp.ne.sakura.sabowl.gpsnmeajp.intent_hce.LazyNfcFHCELite.onHCEFAccessCallback callback)
callback
- onHCEFAccessCallbackインターフェースにもとづいて生成されたインスタンスpublic void unregisterCallback()
public void sendResponsePacket(byte[] responsePacket)
responsePacket
- NFC応答パケット(nullの場合は送信しない)