I want to make sure an external app on the phone (say Spotify) is open in the background without me having to manually open it and make it appear in the foreground (using intents or links).
I'm making an app that uses the Spotify API with React Native.
I read in another thread that you can not implement a Web Playback for React Native so I'm stuck with using the API.
My problem is that in order to use the phone as a playback device you need the Spotify app running in the background. Now I have a solution, use Linking and make the app open in the foreground. But that way I make the users leave my app, and somehow I have to tell them to come back which sounds like a terrible design. I also tried nesting the links into each other (first being Spotify the second being my app), it worked a few times but it is pretty unreliable.
So my question would be if there's any way to call an external app and open it WITHOUT having it take foreground over my app.
I'm pretty new with React Native so I'm still learning, but I would appreciate your guidance on this issue
Related
I'm developing my first AAOS (and even Android) app, so bear with me if there are any noob errors.
So my intention is to develop an app for a music streaming service that has a public API and uses oauth2 for authentication.
My first idea was to just use a WebView, but Google prohibited using WebViews for oauth2 some time ago. Rightfully so as I understand the reason correctly, as my app could interfere/spy on the login credentials.
So I'm trying to use a CustomTabsIntent. Unfortunately, this does not work. When calling customTabsIntent.launchUrl(this, Uri.parse(url)) the "link viewer" app is opened, which only displays the Link as a QR code. So, it looks like the default app to open a link is this "link viewer" (at least in the Volvo Emulator I use for testing)
Here's a link to the actual Activity https://github.com/jasonwurzel/Deezomatic/blob/master/automotive/src/main/java/com/auto/deezomatic/activities/DeezomaticMainActivity.kt
Please don't look at the state of the code/project, I wanted to get the most annoying hurdle out of the way before starting to really develop ;-)
I am learning react native and to do so, I am building my first app.
However as great as it is, It seems like react native has some limitations.
What I want my app to do is to start running the background as soon as the devise boots up (like the WhatsApp or the alarm app).
And I also want notification like WhatsApp new message notification (overlaying the screen).
I did it with android studio and wanted to do it with react native. So far I did not find any package / library that can do that, is this the limit of react native or is there a package that can do that? Because right now I am thinking of going back to native with android studio.
In android you must ask for necessary permissions in manifest. Also in the phone, you must set battery optimization. In Ios this is the hard one. I cannot do it. Your app must be music app or maps app. Thats all i know.
I have been playing around with PhoneGap for a little while, and getting it set up to work correctly with Google Drive API is proving to be far more difficult than setting up a website which does the same.
I am wondering if it would be more to my advantage to cease trying to make the full app work with phonegap, and instead use phonegap to access a hosted site.
Note that I do not wish to open the site in the default browser. The goal would be to make it appear to be an application (no borders, url, back button, etc), but have the web server handle everything behind the scenes.
I know PhoneGap has an In-App-Browser available. Is this something that is possible with it? Or does it only function for more limited use?
Thanks
You can definitely use a WebView for your app, which display the webpage but give you the ability to control the layout around it. Running a WebView instead of native code may cost some performance but it's doable.
I am developing a lock application as an academic project. I need to detect the launch of an app so that i can launch my lockscreen on top of it and restrict opening the app till the user put correct pin. I have read a few posts and this one has a few answers that look promising.
Android, Detect when other apps are launched
Is this the right way to do it? Or is there a better way around? I have also heard about the Application class. But don't know how to implement it.
EDIT: My app supports API16 to API22.
I am creating an app that i would like to have apps running within it like let's say an iframe on a website. Is this possible? For example i will open my app and it will show the Gallery of the phone but while running my app, and not just by opening the gallery app which will make my app minimized. I want it exactly like an iframe, is this possible?
you can not run another app within your own application. You can do any of the following two
start the other app by sending intent message
or create the other app's features similarly in your own app.
According to your question if your need is to create a gallery then why aren't you creating a own gallery in your app? that will be more easier and flexible
You can not run another app's Activities within your app in an iframe style for security reasons, sorry.
Yes, I believe that is is possible for Apps to run cross platform if there exist a common data framework that creates a uniform standard for how data is stored and referenced. So the data can exist in the cloud but referenced via each app independently of the mobile phone platform.