Android NfcF - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android NfcF class.

This code example shows how to use the following methods: connect, isConnected, transceive
        if (this.felicaTag == null) {
            throw new NfcException("felicaTag is null!"); 
        } 
 
        try { 
            if (!felicaTag.isConnected()) {
                felicaTag.connect();
            } 
            result = felicaTag.transceive(commandPacket.getBytes());
        } catch (IOException e) {
            throw new NfcException(e);
        } 
        return new CommandResponse(result);
    } 
 
    /** 
     * Pollingを行います。正常に終了した場合、取得したIDmを自身オブジェクト内に保存します。 
     *  
     * @param systemCode 
     *            Pollingを行う対象の systemCode 
Full Snippet Info
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: close, connect, transceive
    public byte[] executeRawCommand(byte[] rawCommand) throws TagLostException, IOException {
        if (rawCommand == null || rawCommand.length == 0)
            throw new IllegalArgumentException();
 
        try { 
            mNfcF.connect();
            byte[] response = mNfcF.transceive(rawCommand);
            return response;
        } finally { 
            try { 
                mNfcF.close();
            } catch (IOException e) {
                // ignore 
            } 
        } 
    } 
 
    /** 
     * 対応していないタグを渡された際に発生する例外です 
     *  
Full Snippet Info
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: close
	/** 
	 * スマートタグを閉じます。 
	 * @throws Exception 
	 */ 
	public void close() throws Exception{ 
		mFelica.close();
	} 
 
	/** 
	 * スマートタグかどうかを取得します。 
	 * @return スマートタグである場合はtrue、それ以外はfalse。 
	 */ 
	public boolean isSmartTag(){ 
		if(mSystemCode == null)
			return false; 
 
		if(mSystemCode.length < 2)
			return false; 
 
		if(mSystemCode[0] != (byte)0xfe
Full Snippet Info
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: close
	 * @throws IOException 
	 * @see		{@link FelicaLite#connect(Tag)} 
	 * @note	- {@link FelicaLite#connect(Tag)}でキャッシュしたtagを解放する 
	 */ 
	public static void close() throws IOException { 
		mNfcF.close();
		mTag = null;
		mNfcF = null;
	} 
 
 
	/** 
	 * ポーリング 
	 *  
	 * {@link FelicaLite#connect()}を呼び出しておくこと。 
	 * 
	 * @param sc			[in]サービスコード 
	 * @return				true	ポーリング成功 
	 * @throws IOException 
	 */ 
Full Snippet Info
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: connect
	 * @see		{@link FelicaLite#close()} 
	 */ 
	public static NfcF connect(Tag tag) throws IOException {
		mTag = tag;
		mNfcF = NfcF.get(tag);
		mNfcF.connect();
		return mNfcF;
	} 
 
	 
	/** 
	 * {@link #connect(Tag)}を呼び出したかどうかのチェック 
	 *  
	 * @return	true	呼び出している 
	 */ 
	static boolean check() { 
		return (mTag != null) && (mNfcF != null);
	} 
	 
 
Full Snippet Info
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Android NfcF Questions & Answers:

See Code Examples for Android NfcF Methods: