Developer settings on device for waitForDebugger? - android

I've read here and here that there is a device setting to support equivalent behavior to inserting android.os.Debug.waitForDebugger() in your application.
Apparently, there is a pre-deployed tool on the emulator called dev tools that provides this option. It's there in the application menu.
Can I install dev tools on a real device?

You can pull the DevTools application from an emulator and push it to a real device.

The dev tools is something that exists in the emulator, but not in real devices.
AFAIK it can't be installed either.

Related

How to develop android apps with xamarin without hyper v and emulator

I am using windows 10 home and visual studio 2017. I want to develop android apps with xamarin. Hyper-V feature is not available on windows 10 home and I can not afford pro version, So emulator is not installing without hyper-v.
What should I do to develop android app?
Have anybody idea to deploy android app without using emulator and hyper-v?
Thank you in advance!
It's possible to develop Xamarin app without using the emulators. But in that case you'll need to have an Android device to deploy your app on.
Setup Android SDK Manager on your system. Although Xamarin includes a
SDK Manager, you can download it from the following link. Android SDK Manager download
Setup the ADB (Android Debug Bridge) on your system (install Google USB Drivers)
Connect your Android device to the system after you enable USB Debugging(Developer options) on it. Once the device is connected it will give you a prompt to enable debugging. Tap yes and you'll see the option to build to your device as shown in image.
You can try to use any avaliable on windows android emulator. I like to use Bluestack (https://www.bluestacks.com), the steps for use it below:
Install Bluestacks emulator
Launch emulator and wait for load finished
It's your wellcome screen, your application and apps from store will be here
Go to settings > Preferences and check "Enable android debug bridge (ADB)" + "Enable Android input debugging"
One time Setup finished
"Open android adb command promt" and type
adb connect 127.0.0.1:5555
If you have done everything good you will be connected to emulator and ready to debug your application
Good luck!
UPDATE:
As of visual studio 2019, non-hyper v emulation has been stopped.
Old Answer
I am very positive that at the time of VS installation the Visual studio emulators for Android are readily available for download and use, there you can find a good amount of android emulators also it provides you with Android SDK which again can be used to create Android emulators without using Hyper-V
The below link contains all you need to know about Visual studio emulators including on how to install :
https://msdn.microsoft.com/en-us/library/mt228279.aspx
Hope this Answers your question.
Goodluck!

Is it possible to test apps from Intel Xdk using the android emulator?

I wonder whether it is possible to test a Cordova project made with Intel Xdk on an Android emulator rather than a device on USB or the Intel embedded emulator.
Yes. You will have to install and run the APK file you build onto the Android Emulator. Although, I would recommend you build without Crosswalk (meaning, uncheck the "optimize with Crosswalk" build settings option) if you are going to run your app on the Android emulator.
However, it's usually a lot faster to just install it directly onto a real Android device and use remote CDT over USB to debug the app. See this doc page for help setting up remote CDT on your system.
Of course, there are some system-level debugging things you can do on the Android emulator that can be difficult or impossible to do on a real device, depends on your device.

Android Studio doesn't show my device in the "Device Chooser" dialog. I don't want to use the emulator

I searched for the answer before asking. They weren't satisfactory.
Environment and what I did so far:
My device is Xiaomi Redmi 2. I have enabled USB Debugging in my device.
My phone uses a Cyanogen mode with 5.1.1 installed ( Lollipop ) and not 4.4 ( Kit-Kat )
It is also connected as a media device as asked in an answer
I'm running android studio on Windows 8.1.
I don't want to change my OS if that's possible.
Minimum level it is set to be API Level 15 so all the devices with ICS will be supported.
Questions:
Do I need to install a driver and if yes, what driver do I need to install to make it work?
If I need it how do I use it?
Where do I get it from?
I have to mention that I am using this site for the first time so I might not know the best way to search.
Any tips on that?
It may just be that the MTP mode isn't supported. Try changing your usb connection to PTP in your device's usb connection settings.
Taken from the Android Studio User Guide.
If you are developing on Windows and would like to connect a device to test your applications, then you need to install the appropriate USB driver.
Find the appropriate driver for your device from the OEM drivers table.
Once you've downloaded your USB driver, follow the instructions to install or upgrade the driver, and whether you're installing for the first time or upgrading an existing driver.
Update your android studio and your android project :
Android Studio > SDK Manager (top right of the ide) > Launch Standalone SDK Manager > uncheck the 'installed' checkbox > make sure you have all the recommended updates, tools and apis installed to your development machine.
Update your android project manifest file (AndroidManifest.xml) on about line 20 usually to match the target SDK version you want to build for :
You have to install ADB USB driver manually
Try the below link
http://visualgdb.com/KB/usbdebug-manual/

Android device not recognized by android studio

I have 2 android devices. One is samsung tablet and the other one is general mobile discovery phone. Android studio recognizes samsung tablet when i choose debug mode and I successfully run my simple applications on the tablet. However the studio doesnt recognize my phone. Im using Win7 and my pc recognizes the phone to copy files from/to. Can you suggest any solution?
Sure that you have installed in your TOOLS:
This is similar to an answer I submitted before.
Android error No, minSdk(API 19) > deviceSdk(API 1)
There are a few things to check.
if you go to the terminal window in Android Studio and cd to the path where your sdk platform tools are installed (something like C:\Android\SDK\platform-tools ) and run the following command
adb devices
Do you have a device listed? If not then you don't have the device setup properly, or the correct drivers.
On the phone make sure that you have developer options enabled (go to settings->about phone and click on the Build Number 7 times or so)
Once you have enabled that go into the develop options under settings and make sure USB debugging is enabled.
If you are using Mac or Windows then try PdaNet, this tool works with most devices and really useful if you are using devices by regional or country based manufacturers.
Maybe your PC not install the driver for the mobile device. Try download UniversalAdbDriverSetup6.msi from http://hexamob.com/news/download-android-usb-drivers-for-onda/

How to stop Android Application under Eclipse in Mac OS X?

I have run android application on my Device. I want to stop this running application using DDMS.
On windows, I can see threads which are running on Android Device. like following image
But on Mac OS X, I am missing such option, How can I get these ?
I see that it's not the same device (4.1.2 vs 4.3) . Did you enable your device as debuggable?
It's in the developer's options and then check USB Debug option.
EDIT: See here how the security of USB debugging was improved since Android 4.2.2
I think when you will select a device then after only it will enable that option. From your screenshots it is clearly seen that you have selected a device in Windows Platform while in Mac you haven't select it.

Categories

Resources