Android IntentFilter.MalformedMimeTypeException - 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 IntentFilter.MalformedMimeTypeException class.

This code example shows how to use the following methods:printStackTrace
		// NDEF type指定 
		IntentFilter typeNdef = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);
		try { 
			typeNdef.addDataType("*/*");
		} catch (MalformedMimeTypeException e) {
			e.printStackTrace();
		} 
		// NDEF スキーマ(http)指定 
		IntentFilter httpNdef = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);
		httpNdef.addDataScheme("http");
		IntentFilter[] filters = new IntentFilter[] {
				typeNdef, httpNdef
		}; 
		// TECH指定 
		String[][] techLists = new String[][] {
				new String[] { IsoDep.class.getName() },
				new String[] { NfcA.class.getName() },
				new String[] { NfcB.class.getName() },
				new String[] { NfcF.class.getName() },
				new String[] { NfcV.class.getName() },
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
        // Setup an intent filter for all MIME based dispatches 
        IntentFilter ndef = new IntentFilter( NfcAdapter.ACTION_NDEF_DISCOVERED );
        try { 
            ndef.addDataType( "*/*" );
        } catch ( MalformedMimeTypeException e ) {
			e.printStackTrace();
        } 
        mFilters = new IntentFilter[] { ndef, };
        // Setup a tech list for Type-A Type-B Type-F tags 
 		mTechLists = new String[][] { 
			new String[] { NfcA.class.getName() } , 
			new String[] { NfcB.class.getName() } , 
			new String[] { NfcF.class.getName() } };
    } 
 
// === onResume === 
    protected void enableForegroundDispatch() { 
        if ( mAdapter != null ) {
        	mAdapter.enableForegroundDispatch( this, mPendingIntent, mFilters, mTechLists );
        } 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
		try 
		{ 
            ndef.addDataType( "*/*" );
        } 
		catch ( MalformedMimeTypeException e ) {
			e.printStackTrace();
        } 
		 
        mFilters = new IntentFilter[] { ndef, };
 		mTechLists = new String[][]
 		{  
			new String[] { NfcA.class.getName() } , 
			new String[] { NfcB.class.getName() } , 
			new String[] { NfcF.class.getName() } 
		}; 
    } 
 
    protected void enableForegroundDispatch() 
    { 
        if ( mAdapter != null )
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
		receiver.mListener = listener;
 
		try { 
			sAppContext.registerReceiver(receiver, new IntentFilter(sIntentAction, BASE_MIME_TYPE + "/*"));
		} catch (MalformedMimeTypeException e) {
			e.printStackTrace();
		} 
 
		sReceiversMap.put(++sRegistrationId, receiver);
		return sRegistrationId;
	} 
 
	public static synchronized void unregister(int regId) {
		check(); 
		EventsReceiver receiver = sReceiversMap.get(regId);
		sReceiversMap.delete(regId);
		if (receiver != null) sAppContext.unregisterReceiver(receiver);
	} 
 
	public static void send(int eventId) {
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
        // Setup an intent filter for all MIME based dispatches 
        IntentFilter ndef = new IntentFilter( NfcAdapter.ACTION_NDEF_DISCOVERED );
        try { 
            ndef.addDataType( "*/*" );
        } catch ( MalformedMimeTypeException e ) {
			if (D) e.printStackTrace();
        } 
        mFilters = new IntentFilter[] { ndef, };
        // Setup a tech list for Type-A Type-B Type-F tags 
 		mTechLists = new String[][] { 
			new String[] { NfcA.class.getName() } , 
			new String[] { NfcB.class.getName() } , 
			new String[] { NfcF.class.getName() } };
    } 
 
	/** 
	 * enable ForegroundDispatch 
	 */ 
    public void enable() { 
        if ( mAdapter != null ) {
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Android IntentFilter.MalformedMimeTypeException Methods: