smartcar / android-sdk

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

Custom Tab webview in Android sdk #29

Open ghost opened 1 year ago

ghost commented 1 year ago

Hi, When I try to click allow button in permission screen of car, which i have logged in for agreeing to privacy policy nothing happening . Here the below code i have used to initiate the authorization

CLIENT_ID = getString(R.string.client_id); REDIRECT_URI = "sc" + getString(R.string.client_id) + "://" + getString(R.string.smartcar_auth_host); Log.d("initSmartCar", REDIRECT_URI); SCOPE = new String[]{"required:read_vehicle_info", "read_vin", "read_vehicle_info", "read_location", "read_engine_oil", "read_battery", "read_charge", "read_fuel", "control_security", "read_odometer", "read_tires", "read_charge"}; //SCOPE = new String[]{"required:read_vehicle_info"}; smartcarAuth = new SmartcarAuth( CLIENT_ID, REDIRECT_URI, SCOPE, false, new SmartcarCallback() { @Override public void handleResponse(final SmartcarResponse smartcarResponse) {

                    if (smartcarResponse != null) {
                        presenter.onVehicleInfoRequested(smartcarResponse.getCode());
                        Log.d("MainActivity", smartcarResponse.getCode());
                        Log.d("MainActivity", smartcarResponse.getError());
                        Log.d("MainActivity", smartcarResponse.getState());
                        Log.d("MainActivity", smartcarResponse.getErrorDescription());
                    } else {
                        Log.d("AuthorizationFlow", "Response is null");
                    }
                }
            });
    smartcarAuth.addClickHandler(this, start);
ghost commented 1 year ago

Hi, When I try to click allow button in permission screen of car, which i have logged in for agreeing to privacy policy nothing happening . Here the below code i have used to initiate the authorization

CLIENT_ID = getString(R.string.client_id); REDIRECT_URI = "sc" + getString(R.string.client_id) + "://" + getString(R.string.smartcar_auth_host); Log.d("initSmartCar", REDIRECT_URI); SCOPE = new String[]{"required:read_vehicle_info", "read_vin", "read_vehicle_info", "read_location", "read_engine_oil", "read_battery", "read_charge", "read_fuel", "control_security", "read_odometer", "read_tires", "read_charge"}; //SCOPE = new String[]{"required:read_vehicle_info"}; smartcarAuth = new SmartcarAuth( CLIENT_ID, REDIRECT_URI, SCOPE, false, new SmartcarCallback() { @OverRide public void handleResponse(final SmartcarResponse smartcarResponse) {

                    if (smartcarResponse != null) {
                        presenter.onVehicleInfoRequested(smartcarResponse.getCode());
                        Log.d("MainActivity", smartcarResponse.getCode());
                        Log.d("MainActivity", smartcarResponse.getError());
                        Log.d("MainActivity", smartcarResponse.getState());
                        Log.d("MainActivity", smartcarResponse.getErrorDescription());
                    } else {
                        Log.d("AuthorizationFlow", "Response is null");
                    }
                }
            });
    smartcarAuth.addClickHandler(this, start);

This is the screen where i am not able to move further image