Share link via Intent from PreferenceScreen

為{幸葍}努か 提交于 2019-12-08 07:50:31

问题


I am using this code to display app on play store:

    <PreferenceScreen android:title="Please rate and comment" >
        <intent
            android:action="android.intent.action.VIEW"
            android:data="https://play.google.com/store/apps/details?id=com.chovanec.square" />
    </PreferenceScreen>

but also I want to share this link. How can I do it? This do not work:

    <PreferenceScreen android:title="Please rate and comment" >
        <intent
            android:action="android.intent.action.SHARE"
            android:data="https://play.google.com/store/apps/details?id=com.chovanec.square" />
    </PreferenceScreen>

回答1:


Try this :

http://mobile.tutsplus.com/tutorials/android/android-sdk-implement-a-share-intent/

You can try to download plugin from github.



来源:https://stackoverflow.com/questions/19700889/share-link-via-intent-from-preferencescreen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!