How to try an app on a tablet - android

I am doing some applications using Android + Eclipse to run on tablets. I have had too much trouble with the tablet emulator, so I would like to try my code (apps) on a real tablet. How can I do this? I have a Samsung Galaxy Tab 3. Do I need to install the adt-bundle on it?
I'd appreciate any input.

http://developer.android.com/tools/device.html
You just need a usb cable to connect your device to your pc.Go to the above link for more info

check this it may help you Run on a Real Device
Here is a copy paste, but check the link it's really good and well explained :
If you have a real Android-powered device, here's how you can install and run your app:
1-Plug in your device to your development machine with a USB cable. If you're developing on Windows, you might need to install the appropriate USB driver for your device. For help installing drivers, see the OEM USB Drivers document.
2-Enable USB debugging on your device.
On most devices running Android 3.2 or older, you can find the option under Settings > Applications > Development.
On Android 4.0 and newer, it's in Settings > Developer options.
Note: On Android 4.2 and newer, Developer options is hidden by default.
To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.
To run the app from Eclipse:
1-Open one of your project's files and click Run from the toolbar.
2-In the Run as window that appears, select Android Application and click OK.
Eclipse installs the app on your connected device and starts it.
Or to run your app from a command line:
1-Change directories to the root of your Android project and execute:
ant debug
2- Make sure the Android SDK platform-tools/ directory is included in your PATH environment variable, then execute:
adb install bin/MyFirstApp-debug.apk
3-On your device, locate MyFirstActivity and open it.

Related

android studio doesn't see USB connected device

Just to be clear, the device isn't locked or anything and it works perfectly for my friend who has the same android studio version. The problem isn't with detecting the usb device (by the computer), I can access the device's content just perfectly so it connects correctly to my computer but not to android studio.
When I try to run an application, the usb device doesn't show amongst the options.
Can someone please help me with this issue, knowing that my android studio is updated.
UPDATE:
the devices I used are: Samsung J2 and J3
Have you installed Universal USB Driver, if no then you will not see any device to connect. you can also install individual company device driver.
just try Universal USB Driver to connect all devices
Download from here Universal USB Driver
Open the Device Manager window from the control panel in your computer. In the Others/Unknown Devices tab you would see an unknown android device. Right click on it and update the driver and re-run android studio.
Make sure usb debugging is on in your device.
In Android Studio
Tools->Android->Enable ADB Integration
Enable ADB Integration
Then run app
Hope it will solve the problem
Enable your ADB in your Android
-> First go to Settings->Developer Options
-> Then On or Enable your ADB Mode
Just a Restart of Android Studio worked for me.
In my case it happened because of non-interaction in Android_Studio for long.
Else, Check with Run -> Edit Configurations -> Target.
I have the same problem and I use Samsung too.
I fixed it by installing the device driver from Samsung which you can download from Samsung's website
Note
You need to enable ADB mode(Like the second comment)
You need to set Target in Android Studio to > Open Select Deployment Target Dialog
to set Target : Run > Edit
Configurations > Targets > Open Select Deployment Target Dialog

How can I debug Visual Studio - Xamarin.Forms project on Android device?

I want to attach the Android device to Windows 8.1 trough USB
instead of using the built in emulator.
How can I do this?
Note : The device can be connected trough USB (USB drivers are installed),
and its in devaloper mode.
You first need to enable Developer Mode:
Android 4.2 and higher
Starting in Android 4.2 and higher, the Developer options is hidden by default. To make it available, go to Settings > About phone, and tap the Build number item seven times to reveal the Developer Options tab:
Xamarin's doc: Set Up Device for Development
Then you need USB drivers for your phone if you already do not have them installed, check Sony's support site.
Once your device is connected to your machine via the USB cable, debugging is just like debugging via an emulator.
Start debugging your application by pressing Cmd-Enter in Xamarin Studio on OS X or F5 in Visual Studio. When you do so, you may be prompted to choose the device to debug with.
Xamarin's doc: Debug on Device
Check that your device is showing up for Android's adb:
1) Find where Visual Studio/Xamarin (or you) installed the Android SDK:
(Click 'Tools' in the toolbar at the top, then click 'Options')
2) Copy the the path for Android SDK Location
3) Paste that into your shell (cmd or powershell) proceeded by cd (we need to change to that directory.
4) CD into the platform-tools subdirectory
5) Run adb devices
This should display something like:
List of devices attached
XXX12345 device
If all that is returned:
List of devices attached
Then the device is not been recognized and will not be available for Xamarin (or any of the Google Android tools) to deploy.
Note: Also check to ensure that your phone is in Mass Storage mode, as some default to MTP mode and that will not work as an adb device
Note: If it’s NOT appearing in the list make sure that drivers are properly installed and you’ve enabled “USB Debugging" on the phone
You need to enable USB debugging in Developer Options in your phone, plug your phone and it should be detected by Visual Studio.
You may also need to download and install USB Drivers from Sony Drivers page

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 test my application in my android device

I have build my first application for Android Phone in Eclipse.
I want to test my app in my real device. I have not made apk till now.
Can anyone please provide me the step by step guideline on how to load my app from eclipse to my device and run it.
You need to enable USB debugging on the phone itself (by starting the Settings application and selecting Applications > Development > USB Debugging), install the Android USB device driver if you haven’t already (Windows only), and then plug the phone into your computer using the USB cable that came with the phone.
Close the emulator window if it’s already open. As long as the phone is plugged in, Eclipse will load and run applications on the phone instead. You need to right-click the project and select Run As > Android Application.
or
In eclipse you go to run->build or if you have build automatically turned on you can go into the projects file structure and just copy the .apk file out of the bin folder. You can put this on the devices SD card and install it from there. No need to do the export unsigned apk thing.
Go through this link
http://developer.android.com/tools/device.html
An must for device debugging is Mobile usb drivers and You should go to SDK manager->extras->usb pluggin download that pacakge....
This may help http://developer.android.com/guide/developing/device.html.
If you're on Windows you will need to install the USB driver. Then, on your Devices tab (Window->Show View->Other->Android->Devices) you should see a new row appear when you connect your device to your workstation with a USB cable (although LG handsets are problematic in my experience)
If you're on Windows you will need to install the USB driver. Then, on your Devices tab (Window->Show View->Other->Android->Devices) you should see a new row appear when you connect your device to your workstation with a USB cable (although LG handsets are problematic in my experience).

Can I make IntelliJ debug my android applications via the device instead of the emulator?

I've been searching all evening, and I can't find a way to have IntelliJ deploy my android application to my device via USB debugging. I can't see any options to specify the target other than a virtual device.
I have device drivers installed, and all updates available to IntelliJ X and the SDK.
Is it even possible? Or only for eclipse?
Yes it is possible - just specify in the Run/Debug configuration no virtual device to use and IJ will prompt you where to run the app. If the devices is connected, it will be listed and you can just select it.
This works very well here on OS X.
On windows you may need to install the driver.
Download through the SDK manager Extras-> Google USB driver.
Then go to your SDK\Extras\Google\USB_driver\ folder,
right-click on android_winusb.inf and choose Install.

Categories

Resources