无法通过lat和lng API 0.5.4 Android

时间:2017-01-03 19:51:57

标签: android uber-api

我正在使用api uber版本0.5.4(Android)并传递经度和纬度数据(目标和当前位置),但该信息未在v4.134.5版本的应用程序中显示。在版本v3.134.5中,它可以正常工作。

可能出现什么问题?

        Double mapLat = Double.parseDouble(lat.toString());
        Double mapLng = Double.parseDouble(lng.toString());

        SessionConfiguration configuration = new SessionConfiguration.Builder()
                .setRedirectUri("https://www.example.com")
                .setClientId("CLIENT_ID")
                .setServerToken("SERVER_TOKEN")
                .build();

        validateConfiguration(configuration);
        ServerTokenSession session = new ServerTokenSession(configuration);

        RideParameters rideParametersForProduct = new RideParameters.Builder()
                //.setProductId(UBERX_PRODUCT_ID)
                .setPickupLocation(PICKUP_LAT, PICKUP_LONG, PICKUP_NICK, PICKUP_ADDR)
                .setDropoffLocation(mapLat, mapLng, razao_social, DROPOFF_ADDR)
                .build();

        // This button demonstrates deep-linking to the Uber app (default button behavior).
        blackButton = (RideRequestButton) findViewById(R.id.uber_ride);
        //blackButton.setRideParameters(rideParametersForProduct);
        blackButton.setSession(session);
        blackButton.setCallback(this);
        blackButton.loadRideInformation();

0 个答案:

没有答案