这是Uber SDK的初始化:
SessionConfiguration config = new SessionConfiguration.Builder()
// mandatory
.setClientId("xxx")
// required for enhanced button features
.setServerToken("xxx")
// required for implicit grant authentication
.setRedirectUri("http://www.wnna.co")
// required scope for Ride Request Widget features
.setScopes(Arrays.asList(Scope.RIDE_WIDGETS))
// optional: set Sandbox as operating environment
.setEnvironment(SessionConfiguration.Environment.SANDBOX)
.build();
UberSdk.initialize(config);
这是要求搭便车的优步按钮:
RideParameters rideParams = new RideParameters.Builder()
.setDropoffLocation(placeObject.getLat(), placeObject.getLng(), placeObject.getName(), placeObject.getFormatted_address())
.setPickupLocation(Global.loc.getLatitude(), Global.loc.getLongitude(), "WNNA", "")
.build();
holder.requestButton.setRideParameters(rideParams);
我认为我的代码应该可以正常运行但不幸的是,在深入链接到Uber应用程序时,它只显示我的位置而不会通过导航下降点
深度链接后的应用程序:
有没有遗漏的步骤或什么?