Warning(Window already focused, ignoring focus gain).Starting Facebook App from external Activity

前端 未结 1 1927
予麋鹿
予麋鹿 2021-01-15 15:06

Starting External FaceBook activity to share data causes a warning

WARN/InputManagerService(52): Window already focused, ignoring focus gain of: com.android.         


        
相关标签:
1条回答
  • 2021-01-15 16:08

    I resolved my problem by using this piece of code.

        Intent sendShareIntent = new Intent(Intent.ACTION_SEND);
    sendShareIntent.setClassName("com.facebook.katana", "com.facebook.katana.ShareLinkActivity");
        sendShareIntent.setType("text/*");
        sendShareIntent.putExtra(android.content.Intent.EXTRA_TEXT, "http://www.google.com/");
    startActivity(sendShareIntent);
    

    This started my Share facebook activity.

    For twitter the package is "com.twitter.android" and class is "com.twitter.android.PostActivity"

    0 讨论(0)
提交回复
热议问题