Bug与uber在几天前推出的新乘车请求小部件sdk相关
我可以通过此小部件预订cab,但在尝试呼叫/消息驱动程序时,我收到以下错误:
ERR_UNKNOWN_URL_SCHEME
String productId = bundle.getString(Constants.CAB_TYPE);
RideRequestView rideRequestView = (RideRequestView) findViewById(R.id.uber_book);
rideRequestView.setAccessToken(mAccessToken);
rideRequestView.setRideRequestViewCallback(new RideRequestViewCallback() {
@Override
public void onErrorReceived(RideRequestViewError error) {
if(error !=null) {
Utils.showToast(UberBookViewActivity.this, error.name(), Toast.LENGTH_SHORT);
}
}
});
if(bundle.containsKey(Constants.DESTINATION_ADDRESS)){
RideParameters rideParamsWithDestination = new RideParameters.Builder()
.setProductId(productId)
.setPickupLocation(bundle.getDouble(Constants.LATITUDE, 0.0), bundle.getDouble(Constants.LONGITUDE, 0.0), bundle.getString(Constants.SOURCE_ADDRESS)
, bundle.getString(Constants.SOURCE_ADDRESS))
.setDropoffLocation(bundle.getDouble(Constants.DEST_LATITUDE, 0.0), bundle.getDouble(Constants.DEST_LONGITUDE, 0.0), bundle.getString(Constants.DESTINATION_ADDRESS)
, bundle.getString(Constants.DESTINATION_ADDRESS))
.build();
rideRequestView.setRideParameters(rideParamsWithDestination);
}else{
RideParameters rideParams = new RideParameters.Builder()
.setProductId(productId)
.setPickupLocation(bundle.getDouble(Constants.LATITUDE, 0.0), bundle.getDouble(Constants.LONGITUDE, 0.0), bundle.getString(Constants.SOURCE_ADDRESS)
, bundle.getString(Constants.SOURCE_ADDRESS))
.build();
rideRequestView.setRideParameters(rideParams);
}
rideRequestView.load();
附件是错误widget error
的屏幕截图答案 0 :(得分:0)
Android SDK已更新,修复了此错误。
答案 1 :(得分:0)
Release 0.3.1修正issue #15" RideRequestView正确处理重定向以致电或发送驱动程序" ,这正是你的问题。