Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于Shortcuts的问题 #11

Closed
woofww opened this issue Apr 2, 2017 · 10 comments
Closed

关于Shortcuts的问题 #11

woofww opened this issue Apr 2, 2017 · 10 comments

Comments

@woofww
Copy link

woofww commented Apr 2, 2017

您好,我注意到您的这款应用是支持Android Shortcuts那个功能的,在Nova Launcher下工作完全正常。然后我在开发过程中也想加入这个功能,但是按照官方文档做的时候,在Nova Launcher上一直无法实现该功能,想请教您一下这个功能在实现过程中还有需要值得注意的么?

@TonnyL
Copy link
Owner

TonnyL commented Apr 2, 2017

你好,这个坑我也遇到过,在官方的pixel launcher上表现正常,但是到了Nova launcher上,有的shortcut就不能正常显示了。后来我发现貌似是因为intent 和 categories等需要配置完全。可以参考这个:

 <intent
            android:action="com.marktony.zhihudaily.homepage"
            android:targetPackage="com.marktony.zhihudaily"
            android:targetClass="com.marktony.zhihudaily.homepage.MainActivity" />

        <categories android:name="android.shortcut.conversation" />

可以参考我的文章: 老司机带你吃牛轧糖--适配Android 7.1 Nougat新特性

希望对你有所帮助,如果有任何问题,请不要犹豫,直接在issue里面说明,我们一起解决。

@woofww

@woofww
Copy link
Author

woofww commented Apr 2, 2017

不知道是什么原因,写Shortcut测试Demo的时候显示完全没问题,但是用同样的方法集成到项目中就是说啥也显示不出来,手头还没有7.0的机器,真是不知道怎么回事了

@TonnyL
Copy link
Owner

TonnyL commented Apr 2, 2017

Manifest注册了吗?

可以的话可以给我发个Apk,我现在手头有7.1的设备

@woofww
Copy link
Author

woofww commented Apr 2, 2017

感谢感谢,也找朋友借了一台设备,虽然7.0设备上 Shortcut 可以显示,但是又开始报 App isn't installed 应该可能这个问题。我再去 Google 研究研究

@woofww
Copy link
Author

woofww commented Apr 2, 2017

7.0及以上工作没问题了,就是这Nova一直不成,真是诡异

@TonnyL
Copy link
Owner

TonnyL commented Apr 3, 2017

貌似nova和pixel launcher解析的方式不同😂

@woofww
Copy link
Author

woofww commented Apr 3, 2017

好吧,我最近再研究研究,也非常感谢哈,以后有问题还会多多交流

@TonnyL
Copy link
Owner

TonnyL commented Apr 3, 2017

ok,请问还有别的问题吗?没有的话我就把这个issue关掉 了。

@woofww
Copy link
Author

woofww commented Apr 3, 2017

没有了,请关闭吧

@TonnyL
Copy link
Owner

TonnyL commented Apr 3, 2017

ok,有什么问题的话,不要犹豫,开一个issue,我们一起讨论。😉

@TonnyL TonnyL closed this as completed Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants