简体   繁体   English

Android Wear - 在手机上启动Google Play

[英]Android Wear - Launching Google Play on Phone

I have followed the sample here: https://github.com/googlesamples/android-WearVerifyRemoteApp . 我在这里跟踪了示例: https//github.com/googlesamples/android-WearVerifyRemoteApp I ran the app on Wear Emulator (Android 6.0.1). 我在Wear Emulator(Android 6.0.1)上运行了应用程序。 I reached the point where the app is not installed on phone and want to launch the app link on Google Play on the device: 我达到了手机上没有安装应用程序的程度,并希望在设备上启动Google Play上的应用程序链接:

// Create Remote Intent to open Play Store listing of app on remote device.
            Intent intentAndroid =
                    new Intent(Intent.ACTION_VIEW)
                            .addCategory(Intent.CATEGORY_BROWSABLE)
                            .setData(Uri.parse(PLAY_STORE_APP_URI));

            RemoteIntent.startRemoteActivity(
                    getApplicationContext(),
                    intentAndroid,
                    mResultReceiver);

I attached the debugger and, yes, I reached this line, but nothing happens. 我附加了调试器,是的,我到达了这一行,但没有任何反应。 Google Play is not launched on the phone. Google Play未在手机上发布。 I am sure I am connected to the phone as other notifications from the phone (real device) appears on the emulator. 我确信我已连接到手机,因为来自手机(真实设备)的其他通知出现在模拟器上。

Edit: 编辑:

Not clear why but connection from the phone to the emulator is really buggy. 不清楚为什么,但从手机到模拟器的连接确实是错误的。 It's really frustrating and the issue was solved but disconnecting and reconnecting many times. 这真的令人沮丧,问题已经解决,但多次断开连接和重新连接。

AFAIK, you need to have a phone APK and a watch APK in your Android Wear app then you must use the Multi-APK delivery method . AFAIK,您需要在Android Wear应用中拥有手机APK和手表APK,然后您必须使用Multi-APK传送方式 which is, as mentioned, 如上所述,

Multiple APK support is a feature on Google Play that allows you to publish different APKs for your application that are each targeted to different device configurations. 多个APK支持是Google Play上的一项功能,允许您为应用发布不同的APK,每个APK都针对不同的设备配置。

If you haven't done so, try enabling Advanced mode in your application's APK files tab to be able to publish multiple APKs for your app. 如果您还没有这样做,请尝试在应用的APK文件标签中启用高级模式 ,以便能够为您的应用发布多个APK。

For more information, see Packaging and Distributing Wear Apps . 有关更多信息,请参阅打包和分发磨损应用程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM