The following link might help in completing the desired workflow.
Create an offline map—ArcGIS Runtime SDK for Android | ArcGIS for Developers
There is also a complete sample available here:
developer-support/runtime-android/create-and-sync-offline-geodatabase at master · Esri/developer-support · GitHub
can u plz tell me how connect to postgresql database
Considering you have already created your geodatabase,
For connecting to your database from Desktop and Server
Connect to PostgreSQL from ArcGIS—Help | ArcGIS for Desktop
Also see, registering your database with ArcGIS Server
Register a PostgreSQL database with ArcGIS Server—Documentation (10.3 and 10.3.1) | ArcGIS for Server
Retrieving data ...