GovindaPaliwal / Aadhaar-Offline-KYC-Android-Library

:iphone: :star: Publish this Android library as a open source to easily implement Offline KYC using Aadhaar Secure QR Code in Android app without any external SDK and API.
http://gpfreetech.co/offline-kyc-using-aadhaar-secure-qr-code-android-library/
Apache License 2.0
9 stars 0 forks source link

Unable to use the dependency #2

Closed easycodersid closed 4 years ago

easycodersid commented 4 years ago

I am trying to use your reporsitory for my project and when I try to run the gradle after adding the dependency, it says -> ERROR: Failed to resolve: com.gpfreetech:aadhaarofflinekyc:1.1. Can you please let me know if there is any thing I am missing?

Also have downloaded the public certificate from UIDAI website and placed it under raw folder in my project

GovindaPaliwal commented 4 years ago

Hey Sid Try again, Now it's working.

Actually i am working on next version. in that you can add latest certificate in your asset folder and pass name as a parameter but in current version no need to add certificate, already add updated certificate in it.

Please Try and post issue if any.

Thanks

easycodersid commented 4 years ago

Hi Govind,

Thanks for the reply!

I was able to deploy the app, not able to get a response. I found the below stacktrace from the logcat.

java.util.zip.ZipException: Not in GZIP format 2020-03-04 14:00:59.928 21803-21803/com.example.docverification W/System.err: at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:166) 2020-03-04 14:00:59.928 21803-21803/com.example.docverification W/System.err: at java.util.zip.GZIPInputStream.(GZIPInputStream.java:80) 2020-03-04 14:00:59.928 21803-21803/com.example.docverification W/System.err: at java.util.zip.GZIPInputStream.(GZIPInputStream.java:92) 2020-03-04 14:00:59.929 21803-21803/com.example.docverification W/System.err: at com.gpfreetech.aadhaarkyc.AadhaarParser.decompress(AadhaarParser.java:281) 2020-03-04 14:00:59.929 21803-21803/com.example.docverification W/System.err: at com.gpfreetech.aadhaarkyc.AadhaarParser.parse(AadhaarParser.java:337) 2020-03-04 14:00:59.929 21803-21803/com.example.docverification W/System.err: at com.example.docverification.MainActivity.onCreate(MainActivity.java:29) 2020-03-04 14:00:59.929 21803-21803/com.example.docverification W/System.err: at android.app.Activity.performCreate(Activity.java:7224) 2020-03-04 14:00:59.929 21803-21803/com.example.docverification W/System.err: at android.app.Activity.performCreate(Activity.java:7213) 2020-03-04 14:00:59.929 21803-21803/com.example.docverification W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272) 2020-03-04 14:00:59.929 21803-21803/com.example.docverification W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2926) 2020-03-04 14:00:59.929 21803-21803/com.example.docverification W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081) 2020-03-04 14:00:59.929 21803-21803/com.example.docverification W/System.err: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 2020-03-04 14:00:59.929 21803-21803/com.example.docverification W/System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 2020-03-04 14:00:59.929 21803-21803/com.example.docverification W/System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 2020-03-04 14:00:59.930 21803-21803/com.example.docverification W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831) 2020-03-04 14:00:59.930 21803-21803/com.example.docverification W/System.err: at android.os.Handler.dispatchMessage(Handler.java:106) 2020-03-04 14:00:59.930 21803-21803/com.example.docverification W/System.err: at android.os.Looper.loop(Looper.java:201) 2020-03-04 14:00:59.930 21803-21803/com.example.docverification W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6810) 2020-03-04 14:00:59.930 21803-21803/com.example.docverification W/System.err: at java.lang.reflect.Method.invoke(Native Method) 2020-03-04 14:00:59.930 21803-21803/com.example.docverification W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) 2020-03-04 14:00:59.930 21803-21803/com.example.docverification W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)

GovindaPaliwal commented 4 years ago

Are you sure , you scan secure qr code ? send me the step to reproduce this issue.

easycodersid commented 4 years ago

I am just executing this code.

final TextView textView = (TextView) findViewById(R.id.name);

    AadhaarParser aadhaarParser=AadhaarParser.getInstance(this);

    aadhaarParser.parse("678553320635", new OnAadhaarResponse() {
        @Override
        public void onAadhaarResponse(AadhaarUser aadhaarCard) {
            textView.setText(aadhaarCard.getUid());
            Toast.makeText(context, aadhaarCard.getName(), Toast.LENGTH_LONG).show();

            // aadhaarCard is your user model object
            /*Intent intent = new Intent(getApplicationContext(), ProfileActivity.class);
            intent.putExtra("card", aadhaarCard);
            startActivity(intent);*/
        }
    });

Once this gives some output is when I should follow Offline KYC step right?

GovindaPaliwal commented 4 years ago

Replace "678553320635" with your scanned secure qr code string, so in aadhaarCard object you received user details. you can use this details. If you pass incorrect qrcode string then above error will accrued.

Thanks for this issue. In next version will try to add onErrorResponse method for incorrect scanning.

Thanks