Content Resolver to Share Data Across App

Andrea
3 min readMay 24, 2023

This is the real case from my project where App A generate unique code and App B need to use the same code as well. There are 2 solutions that I can think of for this problem :

  1. Both app will generate same unique code programatically. However from Settings.Secure.ANDROID_ID, Firebase ID, to UUID, none from these options can fit into the case.
  2. App A generate unique code and pass the data to App B through ContentProvider

The first step is to create the ContentProvider class inside App A. The class will be…

--

--