Android Emulate Device Without Phone Number - android

I have an android application and I'm able to simulate the network going in and out, however I wish to know if there is a way to simulate an android device without a phone number.
I have a program which can run just through wireless, so the phones don't need service. I'm curious if there is a way to emulate this with the android emulator in eclipse.

I use the Genymotion emulator. This emulator doesn't have a telephony module - for example, switching off wifi switches off all network connectivity. The emulator works great for Eclipse, IntelliJ and Android Studio.
And you also get the benefit of having an insanely fast emulator.

Related

VS2017 not attaching to unity app on android - Shows in list, nothing happens when selected

I am unable to attach VS2017 to my unity android app. Here's my setup.
I have adb connected via wifi.
C:\Users\Diamonds\AppData\Local\Android\sdk\platform-tools>adb devices
List of devices attached
192.168.86.20:5555 device
Unity successfully sends the build to the android phone, and logs show up when the app runs on phone:
I've got the app just running on the phone. Inside VS2017 the phone shows up correctly. When I select it, VS2017 spins for 20 seconds then does nothing. No error in VS2017 or in Unity.
Oddly I do not have the phone connected via USB. I do not know why it shows up there.
I think you can try USB instead of WIFI.
According to Microsoft's documentation
Wifi is versatile but super slow compared to USB because of latency. We saw a lack of proper multicast support for some routers or devices (Nexus series are well known for this).
using USB is a better option.
ref:
https://learn.microsoft.com/zh-cn/visualstudio/cross-platform/troubleshooting-and-known-issues-visual-studio-tools-for-unity?view=vs-2017

Is it good and possible to always test an android app on real device rather than using android emulator

I am trying to learn android on a dell device having 4gb ram and intel pentium chipset. I am trying to run hello world app on a emulator but it actually take much time(more than 5 minutes) to start the process and at the end give error message "Error while waiting for device: Timed out after 300seconds waiting for emulator to come online". As far as testing on device is considered i find it fast and easy.
So my question is that possible to always test an app on real device and skipping the testing on an emulator.
Also suggest me some tips to make my android studio run faster.
.
Its always better to test on a real device. Its very fast especially when debugging. If your emulator is taking long to load imagine a situation where you are trying to debug and want to check the app's behaviour after each change in code. Just install the usb drivers and sdk tool that your device's api version is running on
Sure it is!
First of all, enable the developer mode in your device (if it's not enabled already). Info for doing this here.
Then just plug your device via USB and it will appear when you run your project in Android Studio.
NOTE: The first time you attempt to run the project, your phone will ask for permissions, make sure you allow it!
It will be good if we are testing the application in real device rather than emulator if you have the device. But we can't buy different density, different dimension, different android version devices for testing so for that purpose we need to use emulator.
To improve the speed of android emulator install HAXM in your system, it will speed up the emulators.

Connect USB Device to Bluestack

I have drone( DJI Phantom 3), and in order to fly it correctly DJI provides an App for IOS and Android("DJI Go"). The thing is that I have a Kolina k100 android phone(a cheap chineese one), and I can install the app perfectly, and it runs quite well with an only exception. When I put the Drone on video-recording mode, I loose the live-video and I can not see what my drone sees. Obviously DJI has told me that he doesn't support my chinese phone so they do nothing. So I was thinking that maybe is a problem of how powerful my phone is.
So I wanted to check if the App works well in my laptop so I downloaded the app in Bluestacks, but I realised that to make the app work I have to connect the drone's RC controller by USB (as I do with my phone). But when I connect the controller to the laptop, Windows recognizes it. But Bluestack doesn't care so the app doesnt work. How can I make Bluestack recognize the USB connection of the controller?
Thanks in advance, any help will be appreciated.

Will loading my app from Eclipse to my Android phone instead of AVD will speed things up? Because AVD is slow as hell

AVD takes forever to load my app. So I was wondering if using my android cellphone would speed things up a bit.
Very simply said, it absolutely will.
Enable USB debugging on your device.
Install phone drivers and connect your phone to your PC. When running your application choose your phone from the list and run.
Read more about all steps on Using Hardware Devices, Android developer site

how to run wifi peer to peer application in android emulator..?

I am trying to develop an wifi peer to peer application in android(4.+).
The problem here is how to test it.
I tried to run that application in android emulator. there was no option to configure wifi in the settings menu, i also tired to enable wifi using the dev tools application form the emulator but it didn't work, And through all my googling over 3 days and i found that Android emulator is not supported the Wifi.
So i opted for androidx86 4.0eeepc using virtual box and tired to add devices both wifi and bluetooth (my app uses both bluetooth and wifi) but only bluetooth device got added and it did not work. But my virtual box detected the wifi and bluetooth devices. I just couldnt get them work with the virtual machine.
I tried everything like manually adding the addresses using terminal emulator app in androidx86 and used netcfg through the android commandline but neither of them worked.
Please suggest and guide me on the correct path to run these kind of applications that use wifi and bluetooth in android.
Thanks in advance.
First, be sure you enabled WiFi Direct in the Android settings for the two virtualbox instances:
Settings --> Wireless & Networks --> More... --> Wi-Fi direct
It has been stated as working once that hurdle was overcome, and I'm sure many have experienced the same...just be sure to enable wifi direct
I would have tried exactly what you've already tried by naturally moving from the emulator to the androidx86 project. Although unreliable, I'd recommend looking at and finagling this, if you haven't yet seen it: Android: Simulate WiFi in the emulator? and How to disable/enable network, switch to Wifi in Android emulator? most likely wouldn't have full out success but may be enough to let you know that it works or would work.
As far as testing WiFi-Direct/WiFiP2P without you yourself having a device/s, I would recommend:
Trying out some of the fiddling as mentioned above. And read through tons of logs.
You could always crowd source it to friends, or release an apk on a forum for a small group of testers.
Of course, both of those options are not ideal, seamless, or fast. So, I'd definitely hope you get VirtualBox VMs of AndroidX86 4.0 running as it should once you check that setting and pair up the WiFi APs :-)
A near future solution:
This might be something to look into in near future.
Real devices are hosted by Samsung and screens are streamed to your PC.
http://developer.samsung.com/remoteTestLab.do
According to an email responded by samsung, which I sent to them earlier.
They only have 2 devices (Galaxy Nexus) running on Android v4.0 at the moment.
Unfortunately they are not physically close to each other. (One in Korea, One in Poland)
But they are planning to upgrade existing Galaxy S2 to v4.0.
Because recently Samsung have released v4.0 upgrade for S2.
Once they done that, there will be plenty of v4.0 phones.
And you can ask them which 2 phones are physically close so you can test Wifi Direct.
--------------------------- EDIT ---------------------------------
There are plenty of ICS devices there now, which you can test P2P.
Check with them which 2 are physically near to each other.
Per the docs:
Each instance of the emulator runs behind a virtual router/firewall
service that isolates it from your development machine's network
interfaces and settings and from the internet.
You have to use Network Redirection, as described in the Developer Docs. In essence, you forward specific ports using ADB. Therefore you cannot test certain things like broadcast messages.
I have tried doing what you are trying to do, and-- while I won't say it is impossible (anything is possible in computing with enough time, money, and persistence)-- I wasted a lot of time on it. You cannot treat the Android emulator as a normal network peer-to-peer device. As far as I have been able to find, it is a fork of QEMU, and that is just how the QEMU emulator is implemented.
QEMU itself does support TUN/TAP bridging, but I was never able to get it working with the Android emulator. If you want to go that route, you may want to investigate running Android in the QEMU emulator, rather than in the SDK's emulator (I see you are already trying a similar approach with VirtualBox).
Unfortunately the best way to test a peer-to-peer networking program in Android is with physical devices at this time-- unless your app can suffice with the port forwarding method.
See Also: Issue 26:Emulated Androids should be able to communicate via TCP, and Google
(Repeating here my answer elsewhere.)
In theory, linux (the kernel underlying android) has mac80211_hwsim driver, which simulates WiFi. It can be used to set up several WiFi devices (an acces point, and another WiFi device, and so on), which would make up a WiFi network.
It's useful for testing WiFi programs under linux. Possibly, even under user-mode linux or other isolated virtual "boxes" with linux.
In theory, this driver could be used for tests in the android systems where you don't have a real WiFi device (or don't want to use it), and also in some kind of android emulators. Perhaps, one can manage to use this driver in android-x86, or--for testing--in android-x86 run in VirtualBox.

Categories

Resources