I'm working on a special version of my App which should run in Bluestacks. It's a windows/mac application which allows to run Android apps on the computer.
I would like to implement special behaviour when the app runs in Bluestacks. Nothing complicated, maybe showing a dialog or disabling some buttons.
But for that purpose I need to know whether the app is running on a Bluestacks device. I checked the device model (Build.MODEL
) and manufacturer (Build.MANUFACTURER
), but I get that the device is a Samsung GT i900.
Does someone know an unambiguous way to know whether an app is running on Bluestacks?
I know it´s rather a quite localized question, but it would be fine if I get some ideas about where to look at, or what to try.
There are a few ways to see what apps are running in the background and consuming your Android's resources. Go to Settings > System > Developer Options. If you don't see Developer Options, scroll down and select About phone, then look for Build number and tap it seven times. Tap Running Services.
The 'System apps' icon is available under the 'My games' section at the end of the list of apps installed on your BlueStacks. Clicking on the 'System apps' icon opens a set of tools, as shown below.
Click on the "X" button on the top right corner of the app that you wish to close. Alternatively, you can also click on "Clear all" to close all of the previously opened apps. 1.
Restart BlueStacks and launch the app again. Clear the app cache: Open the "System apps" folder from the home screen of BlueStacks. Navigate to Settings > Apps. Locate the app from the "All apps" list and click on it.
Try this:
/**
* Returns true if device is Android port to x86
*/
public static boolean isx86Port()
{
String kernelVersion = System.getProperty("os.version");
if(kernelVersion != null && kernelVersion.contains("x86")) // for BlueStacks returns "2.6.38-android-x86+"
return true;
return false;
}
try below code:File test = new File("/data/Bluestacks.prop");
boolean isRunningInBluestacks = test.exists();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With