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
hpoo
magento2
matrix
dotnetnuke
barcode-scanner
d3.js
redmine
dry
loopbackjs
slider
apk
cdi
xades4j
fireloop
colors
vimeo
business-intelligence
sslhandshakeexception
supervisord
phonegap-build
nest-api
varnish-vcl
parceler
clr
dashdb
sharedpreferences
chronicle-queue
ratio
jpa-2.1
openbravo
tortoisehg
npoi
microprocessors
om-next
advanced-filter
bean-validation
ms-solver-foundation
code-rally
aurelia-cli
android-n
linq.js
spring-restcontroller
dagger
flume-twitter
karabiner
winston
htmlspecialchars
android-mediarecorder
polymaps
msxml
annotatorjs
gapi
boost-compute
bigdecimal
thread-exceptions
xmlbeans
logical
livereload
nsrunloop
conan
fragmentstatepageradapter
eclemma
android-syncadapter
strpos
sharepoint-apps
accessibilityservice
jsr363
management-studio-express
astropy
cache-manifest
erlog
password-recovery
datagridcomboboxcolumn
flurry-analytics
category-theory
webautomation
maven-central
property-injection
jomsocial
discovery
jquery-transit
microformats
sly-scroller
days
examine
icenium
jquery-dialog
zotonic
navigationcontroller
office-automation
rtd
libxslt
ninject-interception
reliability
raw-data
spring-modules
data-retrieval
activex-exe

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App