Code example for IntentFilter

Methods: addDataType

0
    private void addToTechList(String[] techs) {
        techLists.add(techs);
    } 
 
    private IntentFilter createIntentFilter(String mimeType) throws MalformedMimeTypeException {
        IntentFilter intentFilter = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);
        intentFilter.addDataType(mimeType);
        return intentFilter;
    } 
 
    private PendingIntent getPendingIntent() {
        return pendingIntent;
    } 
 
    private IntentFilter[] getIntentFilters() {
        return intentFilters.toArray(new IntentFilter[intentFilters.size()]);
    } 
 
    private String[][] getTechLists() {
        //noinspection ToArrayCallWithZeroLengthArrayArgument 
        return techLists.toArray(new String[0][0]);