# e-Passport NFC Reader
[![Get it on Google Play](http://www.tananaev.com/badges/google-play.svg)](https://play.google.com/store/apps/details?id=com.tananaev.passportreader)
Android app that uses the NFC chip to communicate with an electronic passport.
Third party apps can use custom intent action to use this app to retrieve passport data.
Custom action id:
- `com.tananaev.passportreader.REQUEST`
The following string extras can be set to allow pre-filling of input fields:
- `passportNumber` - String
- `dateOfExpiry` - String in format YYYY-MM-DD
- `dateOfBirth` - String in format YYYY-MM-DD
- `photoAsBase64` - Boolean indicating whether to return photo as base64 encoded image (default false)
Available data keys:
- `firstName` - String
- `lastName` - String
- `gender` - String
- `state` - String
- `nationality` - String
- `photo` - Bitmap (if `photoAsBase64` is false)
- `photoBase64` - String (if `photoAsBase64` is true)
Usage example:
```java
public class LoginActivity extends AppCompatActivity {
...
private void requestPassportData() {
Intent intent = new Intent();
intent.setAction("com.tananaev.passportreader.REQUEST");
startActivityForResult(intent, 0);
}
...
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == RESULT_OK) {
String name = data.getStringExtra("firstName") + " " + data.getStringExtra("lastName");
...
}
}
...
}
```
For full usage example see "sample" module in the repository.
## Contacts
Author - Anton Tananaev ([anton.tananaev@gmail.com](mailto:anton.tananaev@gmail.com))
## Dependencies
Note that the app includes following third party dependencies:
- JMRTD - [LGPL 3.0 License](https://www.gnu.org/licenses/lgpl-3.0.en.html)
- SCUBA (Smart Card Utils) - [LGPL 3.0 License](https://www.gnu.org/licenses/lgpl-3.0.en.html)
- Spongy Castle - MIT-based [Bouncy Castle Licence](https://www.bouncycastle.org/licence.html)
- JP2 for Android - [BSD 2-Clause License](https://opensource.org/licenses/BSD-2-Clause)
- JNBIS - [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0)
- Material DateTimepicker - [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0)
## License
Apache License, Version 2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
电子护照NFC读取器 使用NFC芯片与电子护照进行通信的Android应用。 第三方应用程序可以使用自定义意图操作来使用此应用程序检索护照数据。 自定义操作ID: com.tananaev.passportreader.REQUEST 可以设置以下字符串附加功能以允许预填充输入字段: passportNumber -字符串 dateOfExpiry格式为YYYY-MM-DD的字符串 dateOfBirth格式为YYYY-MM-DD的字符串 photoAsBase64布尔值,指示是否将照片作为base64编码图像返回(默认为false) 可用的数据键: firstName字符串 lastName字符串 gender -字符串 state -字符串 nationality -字符串 photo -位图(如果photoAsBase64为false) photoBase64字符串
资源详情
资源评论
资源推荐
收起资源包目录
passport-reader-master.zip (56个子文件)
passport-reader-master
.gitignore 53B
app
.gitignore 7B
build.gradle 1KB
src
main
AndroidManifest.xml 1KB
res
mipmap-xhdpi
ic_launcher.png 2KB
mipmap-mdpi
ic_launcher.png 1KB
layout
activity_main.xml 4KB
activity_result.xml 6KB
values-w820dp
dimens.xml 83B
mipmap-xxhdpi
ic_launcher.png 4KB
drawable
ic_launcher_foreground.xml 639B
linear_divider.xml 171B
ic_launcher_background.xml 699B
mipmap-anydpi-v26
ic_launcher_round.xml 270B
ic_launcher.xml 270B
xml
nfc_tech_filter.xml 154B
mipmap-hdpi
ic_launcher.png 2KB
mipmap-xxxhdpi
ic_launcher.png 5KB
drawable-xxhdpi
photo.png 3KB
values
strings.xml 1KB
colors.xml 208B
dimens.xml 139B
styles.xml 383B
assets
masterList 616KB
ic_launcher-web.png 13KB
java
com
tananaev
passportreader
MainActivity.java 25KB
ImageUtil.java 2KB
MainApplication.java 1006B
ResultActivity.java 2KB
lint.xml 279B
sample
.gitignore 7B
build.gradle 388B
src
main
AndroidManifest.xml 675B
res
mipmap-xhdpi
ic_launcher.png 5KB
mipmap-mdpi
ic_launcher.png 2KB
layout
activity_login.xml 2KB
mipmap-xxhdpi
ic_launcher.png 8KB
mipmap-hdpi
ic_launcher.png 3KB
mipmap-xxxhdpi
ic_launcher.png 10KB
values
strings.xml 234B
colors.xml 208B
dimens.xml 211B
styles.xml 302B
java
com
tananaev
sample
LoginActivity.java 1KB
settings.gradle 26B
build.gradle 297B
gradlew 5KB
legacy
Passport.java 50KB
.github
workflows
android.yml 340B
main.yml 1KB
README.md 3KB
gradlew.bat 2KB
gradle.properties 52B
gradle
wrapper
gradle-wrapper.properties 202B
gradle-wrapper.jar 49KB
icon.svg 2KB
共 56 条
- 1
管墨迪
- 粉丝: 21
- 资源: 4666
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0