How to get sound playing while screen is locked or Google Maps on Web App

Hey guys -

I’m fairly new to Thunkable but have looked though all the community docs for an answer but not seen anything that helps.

I’m building an app which needs two things:

  1. Maps with Polylines and Markers
  2. To be able to play Audio in the background when the phone screen is locked

Having done some testing, it seems like:

  1. As a Native app I can use Maps/Polylines/Markers BUT audio will stop when the app screen is locked
    OR
  2. As a Web app I can play audio (and have it continue to play when the phone screen is locked) BUT the maps component won’t work.

Does anybody have any workarounds that would help me achieve the sound/audio AND the maps?

Many thanks!

1 Like

You can use the native app but start the audio using this block which is in the Control drawer and supplying the URL of your audio file.
image

This will make you reap the benefit of both situations.

The drawback of this is that the audio will run in a browser and need to be closed separately.

1 Like

Thanks muneer - that could work!

But no known ways to achieve what I’m looking to do without pushing the user out into a new browser to play the audio?

1 Like

Yes, you can design your app as a web app but instead of using the map component use the Google map API.

See this intro video

Thanks Muneer -

Sorry if this is a stupid questions - but how would I do that?

My understanding is that webviews aren’t supported by Thunkable Web Apps and without writing custom javascript (which I understand also isn’t supported) I don’t think it’s possible to draw Polylines on maps?

1 Like

Seeing is believing

See this sample project to play audio. It is a List View of number of audio files and when selected it is played using a Web Viewer. Easy and basic.
https://x.thunkable.com/projectPage/60250d9ec0d1251227b520dc

I made a web app link

Here is the images from my phone.



If you look at the table of unsupported components in Web Apps you will see that the Web Viewer is supported but the BACK button is not supported.
image

1 Like

Thaanks for taking the time to put this together muneer. Very kind and very helpful!

1 Like