I have already tried this code, but i didn\'t saw photo shared in my account.
File file = new File(\"sdcard/1346249742258.jpg\");
String photoUri = null;
pho
You can share image using below api's. For detailed steps check tutorial
http://androidsrc.net/integrating-google-plus-sign-in-into-your-android-application/
/**
* API to process media post request start activity with MIME type as video
* and image
*/
private void processShareMedia() {
Intent photoPicker = new Intent(Intent.ACTION_PICK);
photoPicker.setType("video/*, image/*");
startActivityForResult(photoPicker, PICK_MEDIA_REQUEST_CODE);
}
/**
* Handle results for your startActivityForResult() calls. Use requestCode
* to differentiate.
*/
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == PICK_MEDIA_REQUEST_CODE) {
// If picking media is success, create share post using
// PlusShare.Builder
if (resultCode == RESULT_OK) {
Uri selectedImage = data.getData();
ContentResolver cr = this.getContentResolver();
String mime = cr.getType(selectedImage);
PlusShare.Builder share = new PlusShare.Builder(this);
share.setText("Hello from AndroidSRC.net");
share.addStream(selectedImage);
share.setType(mime);
startActivityForResult(share.getIntent(),
SHARE_MEDIA_REQUEST_CODE);
}
}
}