Uber 优步叫车插件 - 正式发布!

Uber 优步叫车插件 - 正式发布!

几周前,我们发布了一个基于国内众多开发人员的反馈而设计出来的 HTML5 叫车插件。现在有关此插件的技术文档也已经发布到 Uber 开发者网站上了。从此开发者只需短短几行代码,即可让用户在其应用里直接打车,无需跳转到其他应用。

RideRequestButton rideRequestButton = new RideRequestButton(context);
rideRequestButton.setRequestBehavior(new RideRequestActivityBehavior(this, 1234));
layout.addView(rideRequestButton);

或者用 XML 来设置按钮:

<LinearLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:uber="http://schemas.android.com/apk/res-auto"
   android:layout_width="match_parent"
   android:layout_height="match_parent">

   <com.uber.sdk.android.rides.RideRequestButton
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      uber:style="black"/>
</LinearLayout>

请大家立刻体验一下这个超简单且好用的整合方式,为您的应用添加一个最优质的叫车功能。
还请密切关注我们的官方微博博客