├── .gitignore ├── .gitignore~ ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro ├── release │ └── output.json └── src │ ├── main │ ├── AndroidManifest.xml │ ├── ic_launcher-web.png │ ├── java │ │ └── com │ │ │ └── peerbits │ │ │ └── nfccardread │ │ │ ├── NFCCardReading.java │ │ │ ├── NFCPayActivity.java │ │ │ ├── NFCRead.java │ │ │ ├── NFCWrite.java │ │ │ ├── NfcHome.java │ │ │ └── SplashActivity.java │ └── res │ │ ├── anim │ │ └── swinging.xml │ │ ├── drawable-hdpi │ │ ├── bg_card.png │ │ ├── bg_home.png │ │ ├── bg_splash.png │ │ ├── ic_back.png │ │ ├── ic_card_chip.png │ │ ├── ic_card_reader.png │ │ ├── ic_home.png │ │ ├── ic_launcher.png │ │ ├── ic_read_nfc.png │ │ ├── ic_splash.png │ │ ├── ic_write_nfc.png │ │ ├── img_card.png │ │ ├── img_card_read.png │ │ └── img_card_write.png │ │ ├── drawable-ldpi │ │ ├── bg_card.png │ │ ├── bg_home.png │ │ ├── ic_back.png │ │ ├── ic_card_chip.png │ │ ├── ic_card_reader.png │ │ ├── ic_home.png │ │ ├── ic_launcher.png │ │ ├── ic_read_nfc.png │ │ ├── ic_splash.png │ │ ├── ic_write_nfc.png │ │ ├── img_card.png │ │ ├── img_card_read.png │ │ └── img_card_write.png │ │ ├── drawable-mdpi │ │ ├── bg_card.png │ │ ├── bg_splash.png │ │ ├── ic_back.png │ │ ├── ic_card_chip.png │ │ ├── ic_card_reader.png │ │ ├── ic_home.png │ │ ├── ic_launcher.png │ │ ├── ic_read_nfc.png │ │ ├── ic_splash.png │ │ ├── ic_write_nfc.png │ │ ├── img_card.png │ │ ├── img_card_read.png │ │ └── img_card_write.png │ │ ├── drawable-nodpi │ │ ├── button_background.xml │ │ ├── button_press.xml │ │ ├── gif_card.gif │ │ ├── gif_read.gif │ │ ├── gif_sucess.gif │ │ ├── gif_write.gif │ │ ├── ic_nfc.png │ │ ├── img_tag_reader.png │ │ └── nfc_write_img.png │ │ ├── drawable-xhdpi │ │ ├── bg_card.png │ │ ├── bg_home.png │ │ ├── bg_splash.png │ │ ├── ic_back.png │ │ ├── ic_card_chip.png │ │ ├── ic_card_reader.png │ │ ├── ic_home.png │ │ ├── ic_launcher.png │ │ ├── ic_read_nfc.png │ │ ├── ic_splash.png │ │ ├── ic_write_nfc.png │ │ ├── img_card.png │ │ ├── img_card_read.png │ │ └── img_card_write.png │ │ ├── drawable-xxhdpi │ │ ├── bg_card.png │ │ ├── bg_home.png │ │ ├── bg_splash.png │ │ ├── ic_back.png │ │ ├── ic_card_chip.png │ │ ├── ic_card_reader.png │ │ ├── ic_home.png │ │ ├── ic_launcher.png │ │ ├── ic_read_nfc.png │ │ ├── ic_splash.png │ │ ├── ic_write_nfc.png │ │ ├── img_card.png │ │ ├── img_card_read.png │ │ └── img_card_write.png │ │ ├── drawable-xxxhdpi │ │ ├── bg_card.png │ │ ├── bg_home.png │ │ ├── bg_splash.png │ │ ├── ic_back.png │ │ ├── ic_card_chip.png │ │ ├── ic_card_reader.png │ │ ├── ic_home.png │ │ ├── ic_launcher.png │ │ ├── ic_read_nfc.png │ │ ├── ic_splash.png │ │ ├── ic_write_nfc.png │ │ ├── img_card.png │ │ ├── img_card_read.png │ │ └── img_card_write.png │ │ ├── drawable │ │ └── card_bg.xml │ │ ├── layout │ │ ├── nfc_cardread.xml │ │ ├── nfc_home.xml │ │ ├── nfc_pay.xml │ │ ├── nfc_read.xml │ │ ├── nfc_write.xml │ │ └── splash.xml │ │ ├── mipmap-hdpi │ │ ├── master_logo.png │ │ └── visa_logo.png │ │ ├── mipmap-mdpi │ │ ├── master_logo.png │ │ └── visa_logo.png │ │ ├── mipmap-xhdpi │ │ ├── master_logo.png │ │ └── visa_logo.png │ │ ├── mipmap-xxhdpi │ │ ├── master_logo.png │ │ └── visa_logo.png │ │ ├── mipmap-xxxhdpi │ │ ├── master_logo.png │ │ └── visa_logo.png │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ ├── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── nfc_tech_filter.xml │ └── test │ └── java │ └── com │ └── peerbits │ └── nfccardread │ └── ExampleUnitTest.java ├── build.gradle ├── creditCardNfcReader ├── .gitignore ├── build.gradle ├── libs │ ├── bit-lib4j-1.4.12.jar │ ├── commons-collections4-4.0.jar │ └── commons-lang3-3.0.jar ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── peerbits │ │ └── creditCardNfcReader │ │ ├── CardNfcAsyncTask.java │ │ ├── enums │ │ ├── CommandEnum.java │ │ ├── EmvCardScheme.java │ │ ├── SwEnum.java │ │ ├── TagTypeEnum.java │ │ └── TagValueTypeEnum.java │ │ ├── exception │ │ ├── CommunicationException.java │ │ └── TlvException.java │ │ ├── iso7816emv │ │ ├── ByteArrayWrapper.java │ │ ├── EmvTags.java │ │ ├── EmvTerminal.java │ │ ├── ITag.java │ │ ├── TLV.java │ │ ├── TagAndLength.java │ │ ├── TerminalTransactionQualifiers.java │ │ └── impl │ │ │ └── TagImpl.java │ │ ├── model │ │ ├── AbstractData.java │ │ ├── Afl.java │ │ ├── EmvCard.java │ │ ├── EmvTransactionRecord.java │ │ ├── Service.java │ │ └── enums │ │ │ ├── CountryCodeEnum.java │ │ │ ├── CurrencyEnum.java │ │ │ ├── IKeyEnum.java │ │ │ ├── ServiceCode1Enum.java │ │ │ ├── ServiceCode2Enum.java │ │ │ ├── ServiceCode3Enum.java │ │ │ └── TransactionTypeEnum.java │ │ ├── parser │ │ ├── EmvParser.java │ │ ├── IProvider.java │ │ └── apdu │ │ │ ├── IFile.java │ │ │ ├── annotation │ │ │ ├── AnnotationData.java │ │ │ ├── AnnotationUtils.java │ │ │ └── Data.java │ │ │ └── impl │ │ │ ├── AbstractByteBean.java │ │ │ └── DataFactory.java │ │ └── utils │ │ ├── AtrUtils.java │ │ ├── BytesUtils.java │ │ ├── CardNfcUtils.java │ │ ├── CommandApdu.java │ │ ├── EnumUtils.java │ │ ├── Provider.java │ │ ├── ResponseUtils.java │ │ ├── TlvUtil.java │ │ └── TrackUtils.java │ └── res │ ├── values │ └── strings.xml │ └── xml │ └── nfc_tech_filter.xml ├── dotlib ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── bhargavms │ │ └── dotloader │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── bhargavms │ │ │ └── dotloader │ │ │ ├── AnimationRepeater.java │ │ │ ├── CubicBezierInterpolator.java │ │ │ ├── Dot.java │ │ │ └── DotLoader.java │ └── res │ │ └── values │ │ ├── attrs.xml │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── bhargavms │ └── dotloader │ └── ExampleUnitTest.java ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── screenshots ├── Screenshot_20160428-122024.png ├── Screenshot_20160428-122036.png └── Screenshot_20160428-122045.png └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | #built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin/ 13 | gen/ 14 | 15 | # Local configuration file (sdk path, etc) 16 | local.properties 17 | 18 | # Windows thumbnail db 19 | Thumbs.db 20 | 21 | # OSX files 22 | .DS_Store 23 | 24 | # Eclipse project files 25 | .classpath 26 | .project 27 | 28 | # Android Studio 29 | *.iml 30 | .idea 31 | #.idea/workspace.xml - remove # and delete .idea if it better suit your needs. 32 | .gradle 33 | build/ 34 | 35 | #NDK 36 | obj/ 37 | -------------------------------------------------------------------------------- /.gitignore~: -------------------------------------------------------------------------------- 1 | # Directories # 2 | /build/ 3 | */bin/* 4 | */gen/* 5 | */target/* 6 | target/* 7 | target/*.pom 8 | target/*.asc 9 | */proguard/* 10 | 11 | # OS Files # 12 | .DS_Store 13 | 14 | *.class 15 | 16 | # Package Files # 17 | *.war 18 | *.ear 19 | *.db 20 | 21 | ###################### 22 | # Windows 23 | ###################### 24 | 25 | # Windows image file caches 26 | Thumbs.db 27 | 28 | # Folder config file 29 | Desktop.ini 30 | 31 | ###################### 32 | # OSX 33 | ###################### 34 | 35 | .DS_Store 36 | .svn 37 | 38 | # Thumbnails 39 | ._* 40 | 41 | # Files that might appear on external disk 42 | .Spotlight-V100 43 | .Trashes 44 | 45 | 46 | ###################### 47 | # Eclipse 48 | ###################### 49 | 50 | *.pydevproject 51 | .project 52 | .metadata 53 | bin/** 54 | tmp/** 55 | tmp/**/* 56 | *.tmp 57 | *.bak 58 | *.swp 59 | *~.nib 60 | local.properties 61 | .classpath 62 | .settings/ 63 | .loadpath 64 | /src/main/resources/rebel.xml 65 | # External tool builders 66 | .externalToolBuilders/ 67 | 68 | # Locally stored "Eclipse launch configurations" 69 | *.launch 70 | 71 | # CDT-specific 72 | .cproject 73 | 74 | # PDT-specific 75 | .buildpath 76 | pom.xml.releaseBackup 77 | 78 | release.properties 79 | target/parent-1.0.0-SNAPSHOT.jar 80 | Status -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NFC Token & Credit Card reader 2 | 3 | This Project helps developer to read data from credit card: card number, expired date, card type , Read & Write data in NFC tocken.
4 | 5 | 1. [Screenshots](#screenshots)
6 | 2. [PlayStoreLink](#storelink)
7 | 3. [License](#license)
8 | 9 | Screenshots 10 |

11 | 1-1 12 | 1-2 13 | 1-3 14 | 1-5 15 | 1-10 16 | 1-12 17 |

18 |

19 | PlayStoreLink 20 | https://play.google.com/store/apps/details?id=com.peerbits.nfccardread 21 | 22 | 23 | 24 | ### License 25 | The MIT License (MIT) 26 | 27 | Copyright (c) 2018 Credit Card & NFC Token Reader 28 | 29 | Permission is hereby granted, free of charge, to any person obtaining a copy 30 | of this software and associated documentation files (the "Software"), to deal 31 | in the Software without restriction, including without limitation the rights 32 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 33 | copies of the Software, and to permit persons to whom the Software is 34 | furnished to do so, subject to the following conditions: 35 | 36 | The above copyright notice and this permission notice shall be included in all 37 | copies or substantial portions of the Software. 38 | 39 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 40 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 41 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 42 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 43 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 44 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 45 | SOFTWARE. 46 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 27 5 | buildToolsVersion '27.0.3' 6 | 7 | defaultConfig { 8 | applicationId "com.peerbits.nfccardread" 9 | minSdkVersion 16 10 | targetSdkVersion 27 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | implementation fileTree(include: ['*.jar'], dir: 'libs') 24 | testImplementation 'junit:junit:4.12' 25 | implementation 'com.android.support:appcompat-v7:27.0.0-alpha1' 26 | implementation 'com.android.support:design:27.0.0' 27 | implementation project(':creditCardNfcReader') 28 | implementation 'com.github.bhargavms:DotLoader:1.0.0' 29 | implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.15' 30 | implementation 'com.intuit.sdp:sdp-android:1.0.6' 31 | // You can include the library from implementation as well 32 | // implementation 'com.github.pro100svitlo:creditCardNfcReader:1.0.3' 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/pro100svitlo/Android/SDK/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 10 | 11 | 16 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 35 | 36 | 37 | 40 | 43 | 46 | 49 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /app/src/main/java/com/peerbits/nfccardread/NFCPayActivity.java: -------------------------------------------------------------------------------- 1 | package com.peerbits.nfccardread; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | import android.util.Log; 7 | import android.view.View; 8 | import android.widget.ImageView; 9 | import android.widget.TextView; 10 | import android.widget.Toast; 11 | 12 | import com.peerbits.creditCardNfcReader.CardNfcAsyncTask; 13 | 14 | public class NFCPayActivity extends Activity implements View.OnClickListener { 15 | 16 | public static final String TAG = NFCPayActivity.class.getSimpleName(); 17 | 18 | private TextView tvCardNumber; 19 | private TextView tvEXPDate; 20 | private ImageView mCardLogoIcon, ivBack; 21 | private String card = "", cardType = "", expiredDate = ""; 22 | 23 | @Override 24 | protected void onCreate(Bundle savedInstanceState) { 25 | super.onCreate(savedInstanceState); 26 | setContentView(R.layout.nfc_pay); 27 | initViews(); 28 | 29 | Bundle extras = getIntent().getExtras(); 30 | 31 | if (extras != null) { 32 | card = extras.getString("card"); 33 | cardType = extras.getString("cardType"); 34 | expiredDate = extras.getString("expiredDate"); 35 | 36 | tvCardNumber.setText("" + card); 37 | tvEXPDate.setText("" + expiredDate); 38 | 39 | parseCardType(cardType); 40 | } 41 | ivBack.setOnClickListener(new View.OnClickListener() { 42 | @Override 43 | public void onClick(View view) { 44 | finish(); 45 | } 46 | }); 47 | } 48 | 49 | 50 | private void parseCardType(String cardType) { 51 | 52 | Log.e("CardTyoe", " " + cardType); 53 | if (cardType.equals(CardNfcAsyncTask.CARD_UNKNOWN)) { 54 | Toast.makeText(NFCPayActivity.this, getString(R.string.snack_unknown_bank_card), Toast.LENGTH_LONG).show(); 55 | } else if (cardType.equals(CardNfcAsyncTask.CARD_VISA)) { 56 | mCardLogoIcon.setImageResource(R.mipmap.visa_logo); 57 | } else if (cardType.equals(CardNfcAsyncTask.CARD_NAB_VISA)) { 58 | mCardLogoIcon.setImageResource(R.mipmap.visa_logo); 59 | } 60 | } 61 | 62 | private void initViews() { 63 | 64 | 65 | tvCardNumber = findViewById(R.id.tvCardNumber); 66 | tvEXPDate = findViewById(R.id.tvEXPDate); 67 | ivBack = findViewById(R.id.ivBack); 68 | mCardLogoIcon = findViewById(R.id.ivCardIcon); 69 | } 70 | 71 | 72 | @Override 73 | public void onClick(View view) { 74 | Intent intent; 75 | switch (view.getId()) { 76 | case R.id.rlReadNFCTAG: 77 | intent = new Intent(this, NFCRead.class); 78 | this.startActivity(intent); 79 | break; 80 | 81 | case R.id.rlWriteWithNFC: 82 | intent = new Intent(this, NFCWrite.class); 83 | this.startActivity(intent); 84 | break; 85 | 86 | case R.id.rlCreditCard: 87 | intent = new Intent(this, NFCCardReading.class); 88 | this.startActivity(intent); 89 | break; 90 | } 91 | } 92 | 93 | 94 | } 95 | -------------------------------------------------------------------------------- /app/src/main/java/com/peerbits/nfccardread/NFCRead.java: -------------------------------------------------------------------------------- 1 | package com.peerbits.nfccardread; 2 | 3 | import android.app.Activity; 4 | import android.app.PendingIntent; 5 | import android.content.Intent; 6 | import android.content.IntentFilter; 7 | import android.nfc.NdefMessage; 8 | import android.nfc.NdefRecord; 9 | import android.nfc.NfcAdapter; 10 | import android.nfc.Tag; 11 | import android.nfc.tech.MifareClassic; 12 | import android.nfc.tech.Ndef; 13 | import android.nfc.tech.NdefFormatable; 14 | import android.nfc.tech.NfcA; 15 | import android.os.Bundle; 16 | import android.os.IBinder; 17 | import android.os.Parcel; 18 | import android.os.Parcelable; 19 | import android.util.Log; 20 | import android.view.View; 21 | import android.widget.ImageView; 22 | import android.widget.TextView; 23 | import android.widget.Toast; 24 | 25 | import com.bhargavms.dotloader.DotLoader; 26 | 27 | import java.io.IOException; 28 | 29 | public class NFCRead extends Activity { 30 | 31 | public static final String TAG = NFCRead.class.getSimpleName(); 32 | private TextView tvNFCMessage; 33 | private NfcAdapter mNfcAdapter; 34 | private DotLoader dotloader; 35 | private ImageView ivBack; 36 | 37 | @Override 38 | protected void onCreate(Bundle savedInstanceState) { 39 | super.onCreate(savedInstanceState); 40 | setContentView(R.layout.nfc_read); 41 | initViews(); 42 | ivBack.setOnClickListener(new View.OnClickListener() { 43 | @Override 44 | public void onClick(View view) { 45 | finish(); 46 | } 47 | }); 48 | } 49 | 50 | private void initViews() { 51 | tvNFCMessage = findViewById(R.id.tvNFCMessage); 52 | dotloader = findViewById(R.id.text_dot_loader); 53 | mNfcAdapter = NfcAdapter.getDefaultAdapter(this); 54 | ivBack = findViewById(R.id.ivBack); 55 | } 56 | 57 | @Override 58 | protected void onResume() { 59 | super.onResume(); 60 | 61 | IntentFilter tagDetected = new IntentFilter(NfcAdapter.ACTION_TAG_DISCOVERED); 62 | IntentFilter ndefDetected = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED); 63 | IntentFilter techDetected = new IntentFilter(NfcAdapter.ACTION_TECH_DISCOVERED); 64 | IntentFilter[] nfcIntentFilter = new IntentFilter[]{techDetected, tagDetected, ndefDetected}; 65 | 66 | PendingIntent pendingIntent = PendingIntent.getActivity( 67 | this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); 68 | if (mNfcAdapter != null) 69 | mNfcAdapter.enableForegroundDispatch(this, pendingIntent, nfcIntentFilter, null); 70 | } 71 | 72 | @Override 73 | protected void onPause() { 74 | super.onPause(); 75 | if (mNfcAdapter != null) 76 | mNfcAdapter.disableForegroundDispatch(this); 77 | } 78 | 79 | @Override 80 | protected void onNewIntent(Intent intent) { 81 | Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); 82 | patchTag(tag); 83 | if (tag != null) { 84 | readFromNFC(tag, intent); 85 | } 86 | } 87 | 88 | 89 | public Tag patchTag(Tag oTag) { 90 | if (oTag == null) 91 | return null; 92 | 93 | String[] sTechList = oTag.getTechList(); 94 | 95 | Parcel oParcel, nParcel; 96 | 97 | oParcel = Parcel.obtain(); 98 | oTag.writeToParcel(oParcel, 0); 99 | oParcel.setDataPosition(0); 100 | 101 | int len = oParcel.readInt(); 102 | byte[] id = null; 103 | if (len >= 0) { 104 | id = new byte[len]; 105 | oParcel.readByteArray(id); 106 | } 107 | int[] oTechList = new int[oParcel.readInt()]; 108 | oParcel.readIntArray(oTechList); 109 | Bundle[] oTechExtras = oParcel.createTypedArray(Bundle.CREATOR); 110 | int serviceHandle = oParcel.readInt(); 111 | int isMock = oParcel.readInt(); 112 | IBinder tagService; 113 | if (isMock == 0) { 114 | tagService = oParcel.readStrongBinder(); 115 | } else { 116 | tagService = null; 117 | } 118 | oParcel.recycle(); 119 | 120 | int nfca_idx = -1; 121 | int mc_idx = -1; 122 | 123 | for (int idx = 0; idx < sTechList.length; idx++) { 124 | if (sTechList[idx] == NfcA.class.getName()) { 125 | nfca_idx = idx; 126 | } else if (sTechList[idx] == MifareClassic.class.getName()) { 127 | mc_idx = idx; 128 | } 129 | } 130 | 131 | if (nfca_idx >= 0 && mc_idx >= 0 && oTechExtras[mc_idx] == null) { 132 | oTechExtras[mc_idx] = oTechExtras[nfca_idx]; 133 | } else { 134 | return oTag; 135 | } 136 | 137 | nParcel = Parcel.obtain(); 138 | nParcel.writeInt(id.length); 139 | nParcel.writeByteArray(id); 140 | nParcel.writeInt(oTechList.length); 141 | nParcel.writeIntArray(oTechList); 142 | nParcel.writeTypedArray(oTechExtras, 0); 143 | nParcel.writeInt(serviceHandle); 144 | nParcel.writeInt(isMock); 145 | if (isMock == 0) { 146 | nParcel.writeStrongBinder(tagService); 147 | } 148 | nParcel.setDataPosition(0); 149 | Tag nTag = Tag.CREATOR.createFromParcel(nParcel); 150 | nParcel.recycle(); 151 | 152 | return nTag; 153 | } 154 | 155 | private void readFromNFC(Tag tag, Intent intent) { 156 | 157 | try { 158 | Ndef ndef = Ndef.get(tag); 159 | if (ndef != null) { 160 | ndef.connect(); 161 | NdefMessage ndefMessage = ndef.getNdefMessage(); 162 | 163 | if (ndefMessage != null) { 164 | /*String message = new String(ndefMessage.getRecords()[0].getPayload()); 165 | Log.d(TAG, "NFC found.. "+"readFromNFC: "+message ); 166 | tvNFCMessage.setText(message);*/ 167 | 168 | Parcelable[] messages = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES); 169 | 170 | if (messages != null) { 171 | NdefMessage[] ndefMessages = new NdefMessage[messages.length]; 172 | for (int i = 0; i < messages.length; i++) { 173 | ndefMessages[i] = (NdefMessage) messages[i]; 174 | } 175 | NdefRecord record = ndefMessages[0].getRecords()[0]; 176 | 177 | byte[] payload = record.getPayload(); 178 | String text = new String(payload); 179 | tvNFCMessage.setText(text); 180 | dotloader.setVisibility(View.GONE); 181 | Log.e("tag", "vahid --> " + text); 182 | ndef.close(); 183 | 184 | } 185 | 186 | } else { 187 | Toast.makeText(this, "Not able to read from NFC, Please try again...", Toast.LENGTH_LONG).show(); 188 | 189 | } 190 | } else { 191 | NdefFormatable format = NdefFormatable.get(tag); 192 | if (format != null) { 193 | try { 194 | format.connect(); 195 | NdefMessage ndefMessage = ndef.getNdefMessage(); 196 | 197 | if (ndefMessage != null) { 198 | String message = new String(ndefMessage.getRecords()[0].getPayload()); 199 | Log.d(TAG, "NFC found.. " + "readFromNFC: " + message); 200 | tvNFCMessage.setText(message); 201 | ndef.close(); 202 | } else { 203 | Toast.makeText(this, "Not able to read from NFC, Please try again...", Toast.LENGTH_LONG).show(); 204 | 205 | } 206 | } catch (IOException e) { 207 | e.printStackTrace(); 208 | } 209 | } else { 210 | Toast.makeText(this, "NFC is not readable", Toast.LENGTH_LONG).show(); 211 | } 212 | } 213 | } catch (Exception e) { 214 | e.printStackTrace(); 215 | } 216 | 217 | } 218 | } 219 | -------------------------------------------------------------------------------- /app/src/main/java/com/peerbits/nfccardread/NFCWrite.java: -------------------------------------------------------------------------------- 1 | package com.peerbits.nfccardread; 2 | 3 | import android.app.Activity; 4 | import android.app.PendingIntent; 5 | import android.content.Intent; 6 | import android.content.IntentFilter; 7 | import android.nfc.NdefMessage; 8 | import android.nfc.NdefRecord; 9 | import android.nfc.NfcAdapter; 10 | import android.nfc.Tag; 11 | import android.nfc.tech.Ndef; 12 | import android.nfc.tech.NdefFormatable; 13 | import android.os.Bundle; 14 | import android.text.TextUtils; 15 | import android.view.View; 16 | import android.widget.EditText; 17 | import android.widget.ImageView; 18 | import android.widget.Toast; 19 | 20 | import java.io.IOException; 21 | 22 | public class NFCWrite extends Activity { 23 | 24 | public static final String TAG = NFCWrite.class.getSimpleName(); 25 | private EditText evTagMessage; 26 | private NfcAdapter mNfcAdapter; 27 | private boolean isWrite = true; 28 | private ImageView ivBack; 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) { 32 | super.onCreate(savedInstanceState); 33 | setContentView(R.layout.nfc_write); 34 | initViews(); 35 | ivBack.setOnClickListener(new View.OnClickListener() { 36 | @Override 37 | public void onClick(View view) { 38 | finish(); 39 | } 40 | }); 41 | } 42 | 43 | private void initViews() { 44 | ivBack = findViewById(R.id.ivBack); 45 | evTagMessage = findViewById(R.id.evTagMessage); 46 | mNfcAdapter = NfcAdapter.getDefaultAdapter(this); 47 | } 48 | 49 | public boolean writeTag(Tag tag, NdefMessage message) { 50 | int size = message.toByteArray().length; 51 | try { 52 | Ndef ndef = Ndef.get(tag); 53 | if (ndef != null) { 54 | ndef.connect(); 55 | if (!ndef.isWritable()) { 56 | return false; 57 | } 58 | if (ndef.getMaxSize() < size) { 59 | return false; 60 | } 61 | ndef.writeNdefMessage(message); 62 | return true; 63 | } else { 64 | NdefFormatable format = NdefFormatable.get(tag); 65 | if (format != null) { 66 | try { 67 | format.connect(); 68 | format.format(message); 69 | return true; 70 | } catch (IOException e) { 71 | return false; 72 | } 73 | } else { 74 | return false; 75 | } 76 | } 77 | } catch (Exception e) { 78 | return false; 79 | } 80 | } 81 | 82 | @Override 83 | protected void onResume() { 84 | super.onResume(); 85 | 86 | IntentFilter tagDetected = new IntentFilter(NfcAdapter.ACTION_TAG_DISCOVERED); 87 | IntentFilter ndefDetected = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED); 88 | IntentFilter techDetected = new IntentFilter(NfcAdapter.ACTION_TECH_DISCOVERED); 89 | IntentFilter[] nfcIntentFilter = new IntentFilter[]{techDetected, tagDetected, ndefDetected}; 90 | 91 | PendingIntent pendingIntent = PendingIntent.getActivity( 92 | this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); 93 | if (mNfcAdapter != null) 94 | mNfcAdapter.enableForegroundDispatch(this, pendingIntent, nfcIntentFilter, null); 95 | } 96 | 97 | @Override 98 | protected void onPause() { 99 | super.onPause(); 100 | if (mNfcAdapter != null) 101 | mNfcAdapter.disableForegroundDispatch(this); 102 | } 103 | 104 | @Override 105 | protected void onNewIntent(Intent intent) { 106 | Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); 107 | 108 | if (tag != null) { 109 | if (isWrite) { 110 | String messageToWrite = evTagMessage.getText().toString(); 111 | 112 | if (messageToWrite != null && (!TextUtils.equals(messageToWrite, "null")) && (!TextUtils.isEmpty(messageToWrite))) { 113 | NdefRecord record = NdefRecord.createMime(messageToWrite, messageToWrite.getBytes()); 114 | NdefMessage message = new NdefMessage(new NdefRecord[]{record}); 115 | 116 | if (writeTag(tag, message)) { 117 | Toast.makeText(this, (getString(R.string.message_write_success)), Toast.LENGTH_SHORT).show(); 118 | finish(); 119 | } else { 120 | Toast.makeText(this, (getString(R.string.message_write_error)), Toast.LENGTH_SHORT).show(); 121 | } 122 | } else { 123 | evTagMessage.setError("Please enter the text to write"); 124 | /*Toast.makeText(this,"Please enter the text to write",Toast.LENGTH_LONG).show();*/ 125 | } 126 | } 127 | } 128 | } 129 | 130 | } 131 | -------------------------------------------------------------------------------- /app/src/main/java/com/peerbits/nfccardread/NfcHome.java: -------------------------------------------------------------------------------- 1 | package com.peerbits.nfccardread; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | import android.view.View; 7 | import android.view.animation.Animation; 8 | import android.view.animation.AnimationUtils; 9 | import android.widget.ImageView; 10 | import android.widget.RelativeLayout; 11 | 12 | public class NfcHome extends Activity implements View.OnClickListener { 13 | 14 | public static final String TAG = NfcHome.class.getSimpleName(); 15 | private RelativeLayout rlRead; 16 | private RelativeLayout rlWrite; 17 | private RelativeLayout rlCreditCard; 18 | private ImageView ivHomeicon; 19 | private Animation mAnimation; 20 | 21 | @Override 22 | protected void onCreate(Bundle savedInstanceState) { 23 | super.onCreate(savedInstanceState); 24 | setContentView(R.layout.nfc_home); 25 | initViews(); 26 | rlRead.setOnClickListener(this); 27 | rlWrite.setOnClickListener(this); 28 | rlCreditCard.setOnClickListener(this); 29 | } 30 | 31 | private void initViews() { 32 | 33 | rlRead = findViewById(R.id.rlReadNFCTAG); 34 | rlWrite = findViewById(R.id.rlWriteWithNFC); 35 | rlCreditCard = findViewById(R.id.rlCreditCard); 36 | ivHomeicon = findViewById(R.id.ivHomeicon); 37 | mAnimation = AnimationUtils.loadAnimation(NfcHome.this, R.anim.swinging); 38 | } 39 | 40 | 41 | @Override 42 | public void onClick(View view) { 43 | Intent intent; 44 | switch (view.getId()) { 45 | case R.id.rlReadNFCTAG: 46 | intent = new Intent(this, NFCRead.class); 47 | this.startActivity(intent); 48 | break; 49 | 50 | case R.id.rlWriteWithNFC: 51 | intent = new Intent(this, NFCWrite.class); 52 | this.startActivity(intent); 53 | break; 54 | 55 | case R.id.rlCreditCard: 56 | intent = new Intent(this, NFCCardReading.class); 57 | this.startActivity(intent); 58 | break; 59 | } 60 | } 61 | 62 | @Override 63 | public void onResume() { 64 | super.onResume(); 65 | ivHomeicon.startAnimation(mAnimation); 66 | } 67 | 68 | @Override 69 | public void onPause() { 70 | ivHomeicon.clearAnimation(); 71 | super.onPause(); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/src/main/java/com/peerbits/nfccardread/SplashActivity.java: -------------------------------------------------------------------------------- 1 | package com.peerbits.nfccardread; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.os.Bundle; 7 | import android.os.Handler; 8 | 9 | public class SplashActivity extends Activity { 10 | 11 | public static final String TAG = SplashActivity.class.getSimpleName(); 12 | 13 | Context context = SplashActivity.this; 14 | 15 | @Override 16 | protected void onCreate(Bundle savedInstanceState) { 17 | super.onCreate(savedInstanceState); 18 | setContentView(R.layout.splash); 19 | 20 | new Handler().postDelayed(new Runnable() { 21 | @Override 22 | public void run() { 23 | /* Create an Intent that will start the Menu-Activity. */ 24 | Intent i = new Intent(context, NfcHome.class); 25 | startActivity(i); 26 | finish(); 27 | } 28 | }, 1000); 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/res/anim/swinging.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bg_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/bg_card.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bg_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/bg_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bg_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/bg_splash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/ic_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_card_chip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/ic_card_chip.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_card_reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/ic_card_reader.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/ic_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_read_nfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/ic_read_nfc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/ic_splash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_write_nfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/ic_write_nfc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/img_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/img_card.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/img_card_read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/img_card_read.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/img_card_write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-hdpi/img_card_write.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/bg_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-ldpi/bg_card.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/bg_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-ldpi/bg_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-ldpi/ic_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/ic_card_chip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-ldpi/ic_card_chip.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/ic_card_reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-ldpi/ic_card_reader.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/ic_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-ldpi/ic_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/ic_read_nfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-ldpi/ic_read_nfc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/ic_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-ldpi/ic_splash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/ic_write_nfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-ldpi/ic_write_nfc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/img_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-ldpi/img_card.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/img_card_read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-ldpi/img_card_read.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/img_card_write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-ldpi/img_card_write.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/bg_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-mdpi/bg_card.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/bg_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-mdpi/bg_splash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-mdpi/ic_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_card_chip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-mdpi/ic_card_chip.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_card_reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-mdpi/ic_card_reader.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-mdpi/ic_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_read_nfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-mdpi/ic_read_nfc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-mdpi/ic_splash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_write_nfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-mdpi/ic_write_nfc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/img_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-mdpi/img_card.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/img_card_read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-mdpi/img_card_read.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/img_card_write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-mdpi/img_card_write.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/button_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/button_press.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/gif_card.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-nodpi/gif_card.gif -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/gif_read.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-nodpi/gif_read.gif -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/gif_sucess.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-nodpi/gif_sucess.gif -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/gif_write.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-nodpi/gif_write.gif -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/ic_nfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-nodpi/ic_nfc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/img_tag_reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-nodpi/img_tag_reader.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/nfc_write_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-nodpi/nfc_write_img.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/bg_card.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/bg_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/bg_splash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/ic_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_card_chip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/ic_card_chip.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_card_reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/ic_card_reader.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/ic_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_read_nfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/ic_read_nfc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/ic_splash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_write_nfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/ic_write_nfc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/img_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/img_card.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/img_card_read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/img_card_read.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/img_card_write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xhdpi/img_card_write.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/bg_card.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/bg_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/bg_splash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/ic_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_card_chip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/ic_card_chip.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_card_reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/ic_card_reader.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/ic_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_read_nfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/ic_read_nfc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/ic_splash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_write_nfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/ic_write_nfc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/img_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/img_card.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/img_card_read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/img_card_read.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/img_card_write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxhdpi/img_card_write.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/bg_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/bg_card.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/bg_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/bg_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/bg_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/bg_splash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/ic_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_card_chip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/ic_card_chip.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_card_reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/ic_card_reader.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/ic_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_read_nfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/ic_read_nfc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/ic_splash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_write_nfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/ic_write_nfc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/img_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/img_card.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/img_card_read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/img_card_read.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/img_card_write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Peerbits/Android-NFC/e0f3de8499dd74476415004f95fd45e68228795f/app/src/main/res/drawable-xxxhdpi/img_card_write.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/card_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 11 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/nfc_cardread.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 15 | 26 | 27 | 35 | 36 | 37 | 38 | 51 | 52 | 58 | 59 | 66 | 67 | 68 | 69 | 70 | 71 | 78 | 79 | 88 | 89 | 97 | 98 | 99 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /app/src/main/res/layout/nfc_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 21 | 22 | 30 | 31 | 37 | 38 | 45 | 46 | 54 | 63 | 64 | 73 | 74 | 75 | 76 | 77 | 78 | 85 | 86 | 87 | 94 | 95 | 103 | 112 | 113 | 122 | 123 | 124 | 125 | 126 | 132 | 133 | 134 | 141 | 142 | 150 | 159 | 160 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | -------------------------------------------------------------------------------- /app/src/main/res/layout/nfc_pay.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 14 | 15 | 16 | 27 | 28 | 36 | 37 | 38 | 39 | 40 | 41 | 49 | 50 | 56 | 66 | 78 | 79 | 89 | 90 | 100 | 101 | 112 | 113 | 123 | 124 | 125 | 126 | 127 |