Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing facebook.katana aka facebook app from the code
    primarykey
    data
    text
    <p>i´m trying to achieve a solution where the app ask if facebook.katana aka facebook app is installed in your android phone, if it is installed, check if the user is logged, and if it's logged send a picture with a text (better if it is to a folder), if the user is not logged go to the facebook.katana.LoginActivity and log him, after that make the procedure.</p> <p>I have this working with a Web View, but i'm interested on how to do it using the app if possible, what i got so far is the uncompiled facebook.katana in this URL where i'm testing the activities:</p> <p><a href="http://xt720.ru/miui-trans/apk-decompiled/Facebook/smali/com/facebook/katana/" rel="nofollow">http://xt720.ru/miui-trans/apk-decompiled/Facebook/smali/com/facebook/katana/</a></p> <p>I also know that an image can be attached to that app, since can start the facebook app using this:</p> <pre><code>final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); emailIntent.putExtra(Intent.EXTRA_STREAM,imageUri); emailIntent.setType("image/png"); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Whatever"); startActivity(Intent.createChooser(emailIntent, "Send email using")); </code></pre> <p>This method would be great for an email, but as it says it creates a chooser, but i don't want to let that option open. So i tried something like:</p> <pre><code>Intent intent = new Intent("android.intent.category.LAUNCHER"); intent.setClassName("com.facebook.katana", "com.facebook.katana.LoginActivity"); startActivity(intent); </code></pre> <p>Also you can use the ShareLinkActivity to add an extra to your intent like this:</p> <p>intent.putExtra(Intent.EXTRA_TEXT, "http://www.google.com/");</p> <p>The problem is that i don't see how to attach the image to the katana, neither, how to add it to a folder, or how to add it through an application, of course this is much easier via facebook API for android, but like i said that's already done, i want to make it with the facebook App, i have tried, attaching the Bundle to the app as a parcelable, with the usual way it is done in the API, but not luck, this is the snippet:</p> <pre><code>Bundle params = new Bundle(); params.putByteArray("picture", bitmapdata); params.putString("title", url); params.putString("message","Wathever message"); </code></pre> <p>and try to send the params, also tried sending only the image, but not luck, maybe i'm not using the right class (see the uncopiled facebook.katana URL) or i´m attaching in a bad way the info, it should work somehow, cause it works for ACTION_SEND, so, anybody knows how to solve any of this problems:</p> <ol> <li>Attach an image to the facebook.katana</li> <li>Attach an image to the facebook.katana in a folder</li> <li>Attach an image to the facebook.katana as an external app</li> <li>Request the log status of the user to the facebook.katana (i think this would be automatically)</li> <li>Attach the picture, title, message params to the facebook.katana.</li> <li>Publish as the app that opens the facebook.katana (i.e. publishin with the WebView will show "published from X app"</li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload