Share Image and text in twitter via intent in browser android -


I want to share the image and text as follows:

  intended intent = new intent (Int. ACTION_VIEW); Uri U = Uri.Pars (URL); I.setData (U); StartActivity;  

Please find the code below

  Uri Path = Uri. From ("android.resource: //" + this.getPackageName () + "/ Drawable /" + "image_name"); Intent shareIntent = new intent (); ShareIntent.setAction (Intent.ACTION_SEND); ShareIntent.putExtra (Intent.EXTRA_TEXT, "test"); ShareIntent.putExtra (Intent.EXTRA_STREAM, Path); ShareIntent.setType ("image / *"); ShareIntent.addFlags (Intent.FLAG_GRANT_READ_URI_PERMISSION); Initial activity (Intent.createChooser (share intent, "sharing"));  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -