2

When I choose picture/pictures from gallery of my android phone and click on share button, a list of apps appear. Here, those selected photos can be shared. I want my ionic2 application to appear in that list so that photos can be shared in my app.

//07-03-2017 updating this question

As per latest update to this question.

Now my application appears in that list. but i am not been able to post pics , as i click the app icon , it takes me to the main page of the application and not the the desired page!

Devansh sadhotra
  • 1,495
  • 1
  • 18
  • 41

1 Answers1

2

You need to update your Android manifest as well as handle the received intent in your Activity. Please see the official guide: https://developer.android.com/training/sharing/receive.html#update-manifest

Piotr Zawadzki
  • 1,678
  • 1
  • 18
  • 24
  • 1
    i am using Ionic framework, so there is no concept for intents. – Devansh sadhotra Feb 22 '17 at 07:22
  • 1
    My bad, I am not really familiar with ionic, but I came across this http://stackoverflow.com/questions/32856046/sending-url-to-ionic-android-app-via-webintents-from-another-app it's not exactly your case but it might be a starting point? – Piotr Zawadzki Feb 22 '17 at 07:47
  • thanks a lot for the reference , but i am afraid it won't work , as i am working with Ionic 2 and the link mentions about ionic 1.1 – Devansh sadhotra Feb 22 '17 at 07:53
  • I agree to @PiotrZawadzki. You might not find a 1-on-1 solution to your question, but he's pointing you in the right direction. Note there is also a WebIntent plugin for Ionic 2. https://ionicframework.com/docs/v2/native/webintent/ – JoeriShoeby Feb 22 '17 at 16:15
  • @JoeriShoeby yeah !after digging more into it , i found this https://github.com/napolitano/cordova-plugin-intent and then my app was visible in share options . i have updated the question accordingly – Devansh sadhotra Apr 23 '17 at 12:18