简体   繁体   English

带有Android Q的DirectShare API

[英]DirectShare API with Android Q

I'm trying the new "push" model for the direct share targets of Android Q. I'm using ShortcutMaangerCompat from Android X package as explained here . 我试图为Android Q的直接份额目标我使用ShortcutMaangerCompat从Android的X包中解释了新的“推”模式在这里 I removed the old direct share service too. 我也删除了旧的直接共享服务。 I tested my app on previous versions to check if backward compatible, it seems ok. 我在以前的版本上测试了我的应用程序,以检查是否向后兼容,这似乎还可以。 On Android Q emulator I always get the "direct share not available". 在Android Q模拟器上,我始终会获得“不可用的直接共享”。 See image. 见图片。 Is it a bug? 是虫子吗? Emulator problem? 模拟器问题? Just me? 只有我? I don't understand if I did something wrong with my app since I can't see any direct share targets on android Q. 我不知道我的应用程序是否做错了,因为我在android Q上看不到任何直接共享目标。

在此处输入图片说明

This is indeed Android Q Emulator issue . 这确实是Android Q模拟器问题 I ran the same sample app in Pixel Phone with Android 10, it works just fine showing the Contacts correctly in the place of where it showed "Direct Share not available" in Emulator. 我在装有Android 10的Pixel Phone中运行了相同的示例应用程序,它可以正常显示联系人,而在模拟器中显示“直接共享不可用”的位置可以正常显示。

https://github.com/googlesamples/android-SharingShortcuts https://github.com/googlesamples/android-SharingShortcuts

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

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