How to boot to the background in Monaca (even if you force it...)

Asked 2 years ago, Updated 2 years ago, 71 views

I'm working on something like a music player for iOS on Monaca.

Play music after starting the app,
After that, when I move to another app, the music fades out and disappears.
Anyway, I want to keep playing music in the background.

http://docs.monaca.mobi/3.5/ja/faq/application/ #can-i-develop-applications-that-run-in-the-background

As shown in this URL, there is a description that development support is not provided in the background, so I have given up a lot.

http://docs.monaca.mobi/cur/ja/reference/phonegap_34/ja/events/events/

When I read this, I felt like I could do it with Android.

David Cordova < p > original plug-ins and at the establishment, customized < / > If it's ' Monarchie c There is no background to start the process for apps? < / >

Thank you for your cooperation.

monaca cordova

2022-09-30 20:47

2 Answers

I'm doing the same thing...
I only use the music playback part as an iOS plug-in and write it in Swift or Objective-c.

It works fine, but
You must join the top plan to use your own plug-in on Monaca, so
I brought the data that Monaca created locally and edited the rest with Xcode.(It's too much trouble for me)


2022-09-30 20:47

*Additional information

You don't have to create your own plug-in. Enable background playback on XCode projects
Cordova's Media plug-in seems to be able to play background.

·All you have to do is check Capabilities → Background Modes → Audio and Airplay in the Xcode project settings.

If you want to make it a little more elaborate, such as handling operations from the control center, you have to write your own plug-in.

Either way, I can't do it on Monaca, so why don't you create a cordova project locally and transfer Monaca data to it?


2022-09-30 20:47

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.