I'm new to programming on Android Studio and am practicing by making an app that uses both the phone's microphone and the Google Maps API. I want the location on the Google Maps Activity to update after a loud noise is heard on the microphone. However, the microphone code/buttons to turn on the microphone are housed in a separate activity. Is it possible to leave the microphone activity one(have a thread run in the activity) while using the Google Maps activity? Or do I have to combine the activities?
Asked
Active
Viewed 195 times
0
-
1You can use 2 fragments instead of 2 activity. Because your question on title is no. – Harry T. Nov 09 '18 at 03:14
-
1`Service` is what you are looking for – Kartik Nov 09 '18 at 03:19
-
https://stackoverflow.com/questions/11102337/can-you-have-two-activities-running-at-the-same-time ; use thread or fragment or service to run a code (somehow) simultaneous to your activity code. – kamyar haqqani Nov 09 '18 at 07:13