How to Stop Pokemon Go (or other apps) From Stealing Audio Focus Fly Selfie 1...

 
 
 
How to Stop Pokemon Go (or other apps) From Stealing Audio Focus Fly Selfie 1...

 
xda-developers
Aug 7, 2017 4:09 AM • by Mishaal Rahman
How to Stop Pokemon Go (or other apps) From Stealing Audio Focus

Despite dwindling in popularity, Pokemon Go still has a ton of fans playing the game every day. Although most of the game's issues have been related to cheating, there are other, more minor ones that annoy existing users. One such issue is related to audio focus in Android. Users who like to listen to music or podcasts when playing Pokemon Go find that audio playback immediately halts when they launch the game. This requires users to manually restart playback on their favorite media app such as Google Play Music, Spotify, or PocketCasts. Today, I'm going to show you how to stop Pokemon Go (or any other app) from stealing permanent audio focus – without root.

What happens when Pokemon Go launches is that it requests audio focus from the system, meaning any existing media playback over the same volume stream will be ducked. The issue here is that Android's audio focus relies on an honor system among applications. Android does not pick and choose which applications should be prioritized to hold focus, instead it relies on applications requesting and releasing focus as needed. Thus, because Pokemon Go requests audio focus when it launches, other applications can't stop it from taking over the media volume.

Some applications such as Poweramp or Podcast Addict have experimental settings to hold on to audio focus to prevent other apps from stealing it away, but obviously many media applications out there do not. Some users have come up with their own way to retain audio focus through the use of Tasker profiles, which is something I likely would have tried if there wasn't a better way – but thankfully there is. It involves the use of a hidden ADB command to access the command line interface for Android's permission management system known as appops. With a single command, you can stop Pokemon Go (or any other app) from taking audio focus ever again!

The method we are using here is aimed at stock, unrooted users who are not running any sort of custom ROM. Custom ROM users, such as those on LineageOS, may have access to a more powerful permission control method that lets them bypass the need for this command.


Stop Pokemon Go from Taking Audio Focus – Tutorial

  1. Download then install USB drivers for your device – most likely only necessary if on Windows.
  2. Download the ADB binary for your OS and extract the file to any folder on your PC.
  3. On your phone, open Settings then find the "About Phone" option.
  4. Scroll down to find the "Build Number" value and tap on it 7 times, enabling Developer Mode.
  5. Back to the main menu in Settings, enter Developer Options.
  6. Enable USB Debugging Mode here, as shown below.
  7. Plug your phone into your PC and on your phone change the USB mode from "charge only" mode to "file transfer (MTP)" mode.
  8. Back to the PC, navigate to where you extracted the ADB binary.
  9. Open a Command Prompt in this ADB directory. On Windows, the easiest method to do this is to press Shift+Right-click. In the context menu, choose the "open command window here" option. Mac or Linux users, open a Terminal.
  10. Enter the following command: adb devices
  11. This will start the ADB daemon. If this is your first time running ADB, you will see a prompt asking you to authorize a connection. Allow it.
  12. Re-run the command from step 10 and you'll see the serial number of your device in the output. If so, move on to the next step. If not, re-install your drivers.
  13. (Optional): if you want to restrict an app other than Pokemon Go from having audio focus, then install the App Inspector app and find the package listed under the app's name.
  14. Send the following command: adb shell
  15. Then execute this command: cmd appops set <package> TAKE_AUDIO_FOCUS ignore

    Example: Command used for Pokemon Go

  16. As long as you don't get an error message in the window, it should have worked. Congratulations! Now Pokemon Go won't stop Google Play Music, Spotify, PocketCasts, or any other app from playing on top of it!

Explanation

As mentioned at the beginning, we are using the command line to interface with appops, which is Android's user-facing system for handling app permissions. By default, there are only a handful of permissions that users can toggle by default through the Settings UI. Certain custom ROMs (such as LineageOS with its Privacy Guard) expose more permissions you can restrict, but for unrooted users the only way to handle these permissions is through the command line.

Anyways, the particular permission we are restricting is android.permission.TAKE_AUDIO_FOCUS which any application that requests it in their AndroidManifest.xml file is granted automatically upon installation. Thanks to the above appops command, we can take away this permission from Pokemon Go, meaning it can no longer request audio focus and thus can no longer stop other music or podcast apps on your phone from playing.

Although the tutorial above is aimed at Pokemon Go users, technically you can do the same thing for any other app also. Just modify the name of the package in step #15 with whatever other app you want. Just be careful you don't go around restricting this permission all willy nilly, because Google intentionally hid this permission from being restricted so users wouldn't mess things up.

See other great tutorials like this in our tutorials category. Stay up to date on the latest news with the XDA Labs application.




Android Advices
Aug 5, 2017 6:48 PM • by Karunakar Donthamshetti
Fly Selfie 1 Smartphone with 13MP Camera & 3,000mAh Battery Launched for 8,990 rubles

FLY Mobiles is one more mobile manufacturer and has recently introduced the Fly 5S smartphone in Russia for a price tag of 4,990 rubles which is now available price at 4,690 rubles which means it has been dropped 300 rubles. Now, the company has come up with another device in Russia called as Fly Selfie 1 and the name suggests that it is a selfie centric smartphone. It is available in Red and Black color options and comes with affordable specifications at a competitive price that is 8,990 rubles.

Talk about hardware specifications, the main highlight of the phone is the camera that offers 13MP primary camera with autofocus and LED flash and has the same resolution on the front-facing camera with fixed focus and front LED flash, which you can shoot beautiful selfies even in the dark light conditions. Also, the camera can record videos in 720p at 30 frames per second. The Selfie 1 smartphone is packed with an Android 7.0 with is Nougat laid on top of it.

It rocks a 5.2-inch IPS full lamination screen with an HD (1280 x 720 pixels) resolution and supports a capacitive screen up to 5 point multi-touch fingers. It comes with a Panda glass screen material which protects the screen from scratches and smudges. The Selfie 1 phone is supercharged with a 1.25Ghz MT6737 quad-core processor which is accompanied by a Mali T720 graphics and 2GB of RAM, which would give flawless experience. It is equipped with a fingerprint sensor which is placed at rear side for unlocking smartphone.

There is a 16GB of flash memory with a support of microSD card slot up to 32GB. It is kept powered by a 3,000mAh capacity battery which delivers a talk time up to 11 hours and a standby time up to 300 hours. This phone also gives a video playback up to 6 hours, audio playback up to 60 hours, operating time on the internet up to 5 hours and running time over the Wi-Fi up to 6 hours. Connectivity options include Dual SIM, 4G LTE, Bluetooth, 3.5mm audio jack Micro -USB and GPS /A-GPS navigation support.




 
 

This email has been sent by Froze ONE (isnanmm0@gmail.com). It is the potion result of 'Tech: Topic watch' from the dashboard 'Personal Dashboard', tab 'Tech > Android'. Turn off or edit this potion

 

© Netvibes 2005-2017 | Terms of service | Privacy Policy

 
 

Subscribe to receive free email updates:

0 Response to "How to Stop Pokemon Go (or other apps) From Stealing Audio Focus Fly Selfie 1..."

Post a Comment