you have several options - from simple to more advanced
- Sharing simple data
- Content provider
- AIDL - Base on your comments, i think this option would meet your requirements. you will need to have bi-directional communication.
- Use 'android:sharedUserId' and sign both your apps with the same private key and same alias - would be more secure approach
The name of a Linux user ID that will be shared with other apps. By default, Android assigns each app its own unique user ID. However, if this attribute is set to the same value for two or more apps, they will all share the same ID — provided that their certificate sets are identical. Apps with the same user ID can access each other's data and, if desired, run in the same process.
- socket connection - I wouldn't recommend it
you should also consider security risks.