I am new in Android development so forgive me. My problem is that I have implemented ActivityTransitionAPI and it consists of an Activity and an IntentService. In the activity I also get location data from gps and in the service I have the values of event.getTransitionType() and event.getActivityType() which determine the type of activity transition.
My goal is: when a specific Activitytype and transition is detected send location data to firebase. So I either want to send location data from activity to service and then to the firebase stuff in the service OR send the 2 integers of event.getTransitionType() and event.getActivityType() from service to activity and do the firebase stuff in the activity.
How could I make it happen?
You Can use the binding mechanism between specific activity and service, according to your both schenario you will be able to send using this where you want
Please refer the below link for detail
https://developer.android.com/guide/components/bound-services