Wifi on Android SDK - android-2.2-froyo

I have installed the Android SDK and I noticed that the WiFi button is not enabled in the emulator. I want to know, whether this functionality available on Emulator or not, and why. I have been looking for a convincing answer for a long period.

There is no WiFi chip inside emulator, so the button cannot be pressed.
Emulator already has a network connection routed through your host PC, so WiFi is not really needed.

Related

Can we detect ibeacons through android phones without explicitly turning on the bluetooth or location?

How can we detect ibeacons from a android phone without explicitly switching on the bluetooth or location...?
I want to design an app which detects for the beacon even when the bluetooth is off...please suggest the answer
Sorry, this is not possible. Bluetooth must be turned on to detect t beacons as it requires using the Bluetooth radio to do a scan.
With BLUETOOTH_ADMIN permission (required for scanning anyway), it is possible to detect if bluetooth is off, then turn it on long enough to do a scan, then turn it back off again. The user will see the Bluetooth icon when this happens, and the user will be told at install time that the app requires this permission.

How to run DayDream Controller from Unity Editor?

I am developing a DayDream app and working with a Pixel XL and real DayDream Controller (on a MacBook Pro). I would really like to be able to test with the DayDream Controller when running the app from Unity Editor. Currently, I am forced to make a build for every little change and its killing me (slow).
I believe that I can do this by connecting my Pixel XL via USB cable to my Mac and then using adb to configure it. But, all attempts have failed so far.
I don't know about real Daydream Controller, but you can try using your phone as DayDream Controller Emulator.
As it said here, you should download emulator APK from here, install it and run on phone connected to WiFi.
In your Unity project find GvrControllerMain and change Emulator Connection Mode to Wi-Fi. Also find Assets/GoogleVR/Scripts/Controller/Internal/Emulator/EmulatorConfig.cs and change line to IP address displayed on daydream controller emulator app on phone.
// IP address of the phone, when connected to the PC via WiFi.
public static readonly string WIFI_SERVER_IP = "192.168.0.78";//"192.168.43.1";
Click "Play" in Unity, it should work.
In addition to diesersamat's answer, I would like to add two things:
You could run the controller emulator via USB by choosing "USB" from the Emulator Connection property of the GvrController script that is attached to the GvrControllerMain component. For the USB connection to be made, you have to make sure that %AndroidSDKHome%/platform-tools is added to your PATH variable.
You could use the real controller via Emulator: Open the Controller Emulator app --> open the Emulator's overflow menu --> select Switch to Real Controller. For this to work, the phone that runs the emulator has to be Daydream ready. I usually use the same phone that I use for Daydream VR as a controller emulator.
At Google I/O 2017, the Daydream team announced instant-preview which supports a "headless" controller-only mode.
The repo is on github: https://github.com/googlevr/gvr-instant-preview
The moment in the Daydream keynote where it is mentioned is here: https://youtu.be/tto90e-DfeM?t=26m45s
I had the same problem trying to get the emulator to work. The solution for me was to set up the player settings to android and click the VR supported tab with the daydream SDK selected in the VR SDKs dropdown BEFORE importing any daydream/google VR packages.
Took a lot of trial and error for me to figure that out. Hope that helps.

Using USB device on PC in Android Studio Emulator

I am developing an app that A dongle (USB) device must connect to Android OS supported device(mobile phones, tablets...) via OTG (On-The-Go) cable. The problem starts here. I need to do debug while the dongle is connected to the Mobile phone. Unfortunately, such situation makes connecting mobile phone to PC and debugging method impossible. ( Mobile phone has 1 socket but I need 2, one for connecting the dongle to mobile phone and other for connecting mobile phone to pc for debugging)
Is there a way such that the Android Studio Emulator can access to USB device on the PC?
EDIT I have found an alternative way like connecting the mobile phone to PC via Bluetooth which is explained here.
EDIT 2: A better and clear way : Installing Genymotion and Virtual Box.
Another option (I use daily) is
adb connect phone_ip
The phone should be connected to wifi (the host also).
Lots of sources for that on the net (here is one)
mordy.

Android Wear can't connect my device via bluetooth

I enabled debugging over bluetooth on my Moto 360
and enabled Android Wear app on my Nexus4.
Status displays target : disconnected
Forwarding the port from my computer shows the status host will be changed to connected, but the target status remains disconnected.
I toggled debug via the bluetooth switch which had no effect.
My phone is a Nexus 4. Is there a problem with my phone or the Moto 360?
I eventually managed to get it working. The issue seems to be related to having paired your device with an emulator first. Take a look at this post to see how I fixed it: http://melix.github.io/blog/2014/10/android-moto360.html
open the applications settings, search for the Android Wear application, then force stop it
clear its data and cache
Search for Google Play Services
Click on Manage space. Delete all data.
reboot your phone
reset your Moto 360
Pair watch with phone
Following the instructions from android.com https://developer.android.com/training/wearables/apps/bt-debugging.html to setup debugging and it should work now.
Done.
I tried it on a Sony z1.
It succeeded without any problems.
So, maybe it's not supported perfectly in Nexus 4.
If you have the same problem, I suggest using another device.
I fixed without factory reset with these steps
-Force stop android wear application and clear cache
-Disconnect emulator on android wear app
-Forget emulator on android wear app
-Connect your real device via bluetooth
-Open debugging over bluetooth
Make sure that debugging options are also active in android wear device
Run this commands in command window:
adb forward tcp:4444 localabstract:/adb-hub
adb connect localhost:4444

How do I debug my .net CF app on my physical device?

I am pretty new to WinMo development. I managed to write my first app, debug it via the emulators but I failed to run the debug session on my physical phone.
I connected my phone to the development PC via ActiveSync, but that alone did not make my phone show up on the list among the selectable emulators. Is there anything I need to do before this would work?
Alternative: I want to program with the G-sensor and the bluetooth capabilites of the phone. Is there a way to play with them via emulators? How on earth do you shake an emulator? :)
After you hooked up and confirmed that ActiveSync is working, you should be able to select the "Mobile Device" form the target list. It is not listed by name, it simply is the only entry not ending in emulator.

Resources