smartcar / android-sdk

Smartcar Android Auth SDK
https://smartcar.github.io/android-sdk
MIT License
19 stars 2 forks source link

NumberFormatException: s == null when Deny Access to Permissions #30

Open dharmendrasinh-concetto opened 1 year ago

dharmendrasinh-concetto commented 1 year ago

@sankethkatta I am getting crash when Press on Deny Access on Scope Permission screen. I have checked Uri returned which contains VIN & Make but doesn't contain Model & Year.

int year = Integer.parseInt(uri.getQueryParameter("year"));

Caused by: java.lang.NumberFormatException: s == null
E/AndroidRuntime(29757):    at java.lang.Integer.parseInt(Integer.java:577)
E/AndroidRuntime(29757):    at java.lang.Integer.parseInt(Integer.java:650)
E/AndroidRuntime(29757):    at com.smartcar.sdk.SmartcarAuth.receiveResponse(SmartcarAuth.java:290)
E/AndroidRuntime(29757):    at com.smartcar.sdk.SmartcarCodeReceiver.onCreate(SmartcarCodeReceiver.java:40)
E/AndroidRuntime(29757):    at android.app.Activity.performCreate(Activity.java:7893)
E/AndroidRuntime(29757):    at android.app.Activity.performCreate(Activity.java:7880)
E/AndroidRuntime(29757):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)