0

is it possible to link from one android app to another installed app? I'm creating a set of apps which all to some extent will utilize the same content. In the "web world" this would be handled easy by separating this content to a separate html (or similar), and all the other sites/apps would link to this one. Unfortunately, the apps must all work offline, so linking to a web server is not an option. If all the "shared content" should be duplicated into each an every app, it would take up a lot of space, and be a nightmare to update.

Any input deeply appreciated.

Affen2
  • 11
  • 2

1 Answers1

0

If your requirement is to share data from one app to another, then what you are looking for is ContentProvider . You can create custom ContentProvider and retrieve the data from the other app. The developer guide is available [here]

Also refer this question to understand how it's implemented:

Hope it helps.

Community
  • 1
  • 1
OBX
  • 6,044
  • 7
  • 33
  • 77
  • Thank you for your input, superman. I've looked at the ContentProvider, and it sure does work within android studio. However, my apps are basically just a webviewer with a lot of html content, and I need to link from the html in one app to the html content in another installed app. Something like a href="com.example.webviewer1/page3.html". Is this in any way possible? – Affen2 Jan 13 '17 at 11:16
  • if the apps are connected to the web all time , why not create a web backend api, and do the processing from the backend , and pass the corresponding data to each app as json or xml – OBX Jan 13 '17 at 11:21
  • The tablets/apps are to be used in an offline environment. Keeping stuff online (or at least the shared content) would make things much, much easier, but it's unfortunately not an option in this case. – Affen2 Jan 13 '17 at 11:24
  • Then use content provider itself, create a back-end , pass data from server as json, then store those in respective databases of each app, and share the necessary data using content provider, where content provider would act as a safe bridge – OBX Jan 13 '17 at 11:27