Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Tab webview in Android sdk #29

Open
ghost opened this issue May 19, 2023 · 1 comment
Open

Custom Tab webview in Android sdk #29

ghost opened this issue May 19, 2023 · 1 comment

Comments

@ghost
Copy link

ghost commented May 19, 2023

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
Copy link
Author

ghost commented May 19, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

0 participants