android-sharing


Result code for sharing intent for instagram android


Result code always gives 0 if i successfully shared an image with instagram via intent. Please help. Thanks in advance.
I have tried a lot.
This is my code :
File imageFileToShare = new File(filePath);
Uri uri = Uri.fromFile(imageFileToShare);
Intent shareInstagramIntent = new Intent(Intent.ACTION_SEND);
shareInstagramIntent.setPackage("com.instagram.android");
shareInstagramIntent.putExtra(Intent.EXTRA_STREAM, uri);
shareInstagramIntent.setType("image/*");
shareInstagramIntent.putExtra(Intent.EXTRA_TEXT, text);
startActivityForResult(shareInstagramIntent, INSTAGRAM);
This is my onActivityResult :
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case INSTAGRAM:
logI("Request e: " + resultCode);
if (resultCode == thisActivity.RESULT_OK) {
Utilities.showAlert(thisActivity, "Image shared with instagram successfully");
new PostPointsTask("instagram").execute("");
} else {
Utilities.showAlert(thisActivity, "Image shared with instagram was cancelled");
}
}
}
There is no callback from instagram for share intent ,better use instagram sdk to share your message.

Related Links

How to send product details(image & text) as url by a click on Android Share icon
Result code for sharing intent for instagram android

Categories

HOME
spring-data
magento2
plesk
yahoo-weather-api
opencv-python
redmine
concurrency
scroll
ant
portable-class-library
web2py
biztalk-2010
hyperledger
impala
haxe
onvif
scheduler
heuristics
rangy
grocery-crud
rpmbuild
spam
software-packaging
clipboard
xenapp
winsock
xcrun
seafile-server
quickcheck
payeezy
creation
char-pointer
amazon-kms
dreamfactory
textmate2
testlink
cargo
installanywhere
forms-authentication
identify
eclipse-gmf
text-decorations
grails3.2.0
access-denied
google-prediction
oracle-bmcs
wysihtml5
ilrepack
comm
winston
patternlab.io
apache-modules
bigdecimal
java-2d
msg
livecycle
zynq
gnucash
codecharge
uibinder
facebook-ios-sdk
jeasyui
jeditable
management-studio-express
ruby-on-rails-4.1
apple
uitest
relational-model
kefir.js
tree-structure
kotlin-android-extensions
prism-4
r.java-file
thoughtworks-go
producer
qt5.4
xhprof
lmax
oracle-adf-mobile
maven-central
.htpasswd
bittorrent-sync
flipboard
usb-flash-drive
django-settings
jquery-lazyload
jbox2d
proc-open
simplecov
email-verification
tridion-2011
audiotoolbox
chronometer
getopt-long
getopts
pyjamas
suphp
formal-semantics
ccl
uninstaller
.net-services
remote-working
parentid

Resources

Encrypt Message