Home > database >  Share data between two flutter apps in same mobile
Share data between two flutter apps in same mobile

Time:05-31

I want to share data between two flutter apps without share package that share data between apps when user select installed application, I want to send data to one app and fetch that data from the second application. How can I achieve this in flutter?

CodePudding user response:

If the apps are on the same device, then I would recommend an Sqlite databse.

If you do not want to do that, the use an HTTPS API.

  • you can use a server to store the data and allow the aps to read & write it
  • or, you can simply have the apps sent HTTPS requests to each other on localhost at a port of your choice, BUT, that only works it the apps are on the same deveice. If they are on separate deveices then you must have a server

I cannot see any other option.

CodePudding user response:

I achieved required functionality by using Content Providers of android and call them natively in flutter using method channels. Now its working fine as I want to achieve.

you can learn more about Content Providers by visiting this link.

Note: I only want to achieve this for android not iOS.

  • Related