ExoPlayer does not work in background / sleep mode on a Galaxy S8 / Note8 (Android 9) - background

I have built a simple APK to play (looping) a sound (loop.ogg, 22 sec) from the assets. But if two of my devices (Samsung Galaxy S8, Note8, running Android 9) go to background (pressing the Home button) or I turn the screen of (standby, sleep mode), the sound begins to stutter after about 50-60 sec. This does not happen on my Xiaomi Redmi Note 5 (Android 9), OnePlus 6 (Android 10).
Can anyone provide an APK that plays this loop.ogg (or any other sound file) via ExoPlayer without this issue.
I only want to know if it is basically possible to play a sound with ExoPlayer in standby (after screen is off) mode on each device.
sound file (loop.ogg, 141 KB): https://drive.google.com/file/d/18yYJz1PaA-PkHIqnYiQBXn1knqoqIPFJ/view?usp=sharing
ExoPlayer test APK (6 MB): https://drive.google.com/file/d/1Y356HYdWpt1q53-IuLMO8hhoMkfkCw-b/view?usp=sharing
See also here: https://community.kodular.io/t/exoplayer-about-10-or-15-minutes-the-application-closes-when-the-screen-turns-off/51653/5?u=bodymindpower

Related

iOS Simulator "Inner" Resolution

I saw the resolution questions:
iOS simulator for iPhone 5- 1136 x 640 resolution
I have done
react-native run-ios --simulator 'iPad Pro (9.7 inch)'
I even went to "Hardware" menu and selected the device again.
My app launches in dimensions of tablet, however the contents within are not rightly sized, it is hugely zoomed. I fixed this accidentally before but I cannot figure it out now. Here is a screenshot of my situation:
It seems like you are running a zoomed in iPhone app (which is possible to do on iPad, so the simulator does what it's supposed to do). You need to set the app from iPhone to Universal in Xcode to tell it that your app is targeted for iPad as well.

How to choose which iPhone model simulator to run my react native app?

I am working on react native app, and I do testing on iOS Simulator.
However, it always runs on iPhone 6, and i don't know how I can switch to other iPhone models like iPhone 6 Plus or 5.
I can start a different device manually by going to Simulator -> Hardware -> Device -> iOS -> iPhone 6 Plus.
But the app is installed only on iPhone 6, and it always starts iPhone 6 when I run react-native run ios.
How can I change it so that I can run the app on different iOS Simulator devices?
react-native run-ios --simulator="iPhone 6s Plus"
As far as I can tell there is currently no way to specify the OS.
you could open your project in Xcode on mac and choose build target, then build.

app runs fine on iphone 5 but apparently not on iphone 5S

I just submitted my app to the app store last week and it got rejected yesterday. The reviewers apparently test on iphone 5S with iOS 7.0.4. They say the app does not load past the intro screen.
I have tested the app on iphone 5 and ipod touch 5th generation, both running the same operating system. On both it works perfectly fine.
Any ideas what could be the problem? It's a bit of an issue that I cannot test myself as the app uses the camera in the first screen and that's why immediately crashes when running in the simulator... but if I uncomment the camera setup it works in 64bit simulator...
edit:
I am using C4 for most of my interface elements. So camera init looks like this
cam = [C4Camera cameraWithFrame:CGRectMake(0,0, self.canvas.width, self.canvas.height)];
cam.cameraPosition = CAMERABACK;
[self.canvas addCamera:cam];
[cam initCapture];

Xcode 5 fails to launch app with error: failed to launch '/path/to/.app' -- Busy

I am using XCode 5, with an iPhone 5s as the dev device. Every other time I run the app I get a pop that says "Could not launch [app name] \n busy". My iPhone 5s then appears to crash and the only way it will respond is if I hold the home and lock button until it resets.
The application is a single view application, the only thing I have done is added the Parse.framework from here and used
[Parse setApplicationID:appID clientKey:clientKey];
[PFAnalytics trackAppOpenedWithLaunchOptions:launchOptions];
In applicationDidFinishLaunchingWithOptions, along with some UI that isn't hooked up to anything.
I'm not sure if this has to do with Parse or possibly the App settings.
So to be clear, the behavior is:
Fresh reset > Build and Run application on iPhone 5s > application runs fine > Build and Run application on iPhone 5s > application appears to launch but screen remains black and iPhone is no longer responsive except the screen will turn off when the lock button is pressed (but not back on) > Build and Run application on iPhone 5s > XCode says "could not launch app - busy" > hard reset iPhone
When I run this on the 64-bit simulator it works fine.
Edit 1:
I have tested with multiple applications now that we know work on multiple other devices (iPhone 5, iPhone 4, iPhone 4s) and the simulators. I don't have another iPhone 5s so it is hard to compare exactly but everything crashes my 5s..
My device was completely stuck with black screen. "To fix you have to hard reboot, holding the power and home button until the phone reboots - doesn't lose any of the data you have on your phone (a concern the first time I did it)." as stated here:
http://blog.paulhadfield.net/2014/01/iphone-hangs-when-running-from-xcode.html
For iPhone7 there is a different approach:
Press and hold down the power button located on the right side of
the iPhone 7.
While holding down the power button, press and hold
down the Volume Down button on the left side of the iPhone 7.
http://www.hongkiat.com/blog/force-reset-iphone7-7plus/
You were using your phone when you ran the app. Make sure you don't use your phone after you press build and run, otherwise it will be "busy"
Which Xcode version do you use? Same issue with Xcode 5.0.1 + iPhone 5S (iOS 7.0.4). It crashed my iPhone 5S even by the simple application created by Xcode's default project template.
It seems this issue has been fixed in Xcode 5.0.2. Xcode 5.0.2 works fine for me by now.
I've got the same problem for several times. It seems that this problem always happens when iCloud or other background App is running & the App I was debug is already in running mode.
My suggestion is: Avoid any background App running when debug and Make sure the App debugging is fully killed before restart a debug.
It is obvious a bug in iOS 7 + Xcode 5.
I had the same issue and upgrading to Xcode 5.0.2 resolved it.

Ad Hoc distribution UI Slow

I ran my code on simulator, Iphone 5 with xcode connected just fine.
When I deployed to an Iphone 4s device, the scrolling is lagging, clicking is lagging by a seconds.
These are my steps to deploy.
1. Create provision profile on apple developer site which include my iphone 4s device.
2. Import into XCode organizer - Provision.
3. Set Code Signing to Distribution.
4. Distribute it through email.
5. Double click on IPA to install the App on device.
Any reason that caused slowness?