Emulator Control disabled with real android device - android

I'm trying to test a GPS-enabled application and want to test it on the real device (not the emulator). I want to spoof the application by sending fake GPS coordinates to it.
I've read that you can do this with DDMS, but this does not work because the "Emulator Control" to send the GPS signal is greyed out (disabled). I tried:
Selecting the right device.
Running DDMS both in eclipse and outside from the command-line
I have enabled the Settings on my Android device so it allows USB debugging and GPS spoofing.

Like I said in my comment, I have the same issue. The best workaround I've found so far is Motorola Dev Forums, which requires a bit of code to spoof locations on an actual device. However, like the OP pointed out to the ignorant Moto rep, the android docs do promise the ability to fake locations from the DDMS. I'll try coding the TestProvider tomorrow, and post updates here if I have any luck. Would appreciate it if you could do the same.

using mock location you do this. I have found some solution from this link may be this will help you check out this link
http://community.developer.motorola.com/t5/Android-App-Development-for/How-to-Send-Mock-Locations-with-DDMS-to-DROID-2-real-device/td-p/13720

Related

How to sniff Bluetooth htc packages using androids feature

I'd like to monitor my bluetooth traffic on my andorid device.
I have tried this stuff:
Sniffing/logging your own Android Bluetooth traffic
But sady, i still cant find the saved file. The only File I can find is in the /sdcard/Android/data/ folder. But this file is empty and old.
I turned bt off to switch the tracking functionality on and turned it on again when started. Same when i was finished.
Oh, and its said that the phone doesnt need to be rooted. I've found an app which does the same but needs the phone to be rooted... so maybe i also need to root it to make the androids built in feature work?
And I tried this on an s10 and s7.
I hope someone can help me out here.
Have a nice day and thanks for reading :)

Debugger not attaching to UnityPlayer on Android Device

I have a game built on Unity running in an android device. In theory it should be possible to step through the unity code by attaching to AndroidPlayer at runtime.
Well I followed the rules on how to do this.
1) Created development build with script debugging enabled.
2) run the app with script debugging on wifi that has the player.
Initially it worked. Then perhaps a change or two in my network, and I no longer see AndroidPlayer as an option in MonoIDE to attach to. Its vanished and for several days now I am not able to debug. Not only that but i really don't know where to check this. I yanked out the ethernet cable so device and Mac are both on same wifi running on single subnet. Nothing seems to help. But what really dissappoints me is there is really nothing to check in Unity when this type of thing happens. It just try to attach to proess. Hope AndroidPlayer process is there and if its not. Tough luck.
PS: I should add I am on Unity Pro 4.2.04f. It worked fine, then who knows what and it stopped finding the AndroidPlayer. What a mess!
PS: Things I have tried. Pinging to ip address, and telneting to port (successfully to ip:5555)
Note: This is not the Android Debugger I am talking about but a player that needs to be running in the app, and visible to MonoIDE in order to debug.
What I am really trying to understand is what are my options when I cannot see AndroidPlayer as an process to attach to?How does one debug this problem? Are there things in the logg if AndroidPlayer is sucessfully running? How could monodebug not see it? How do I know it it is or is not running on the devices.
Thanks
Have you looked at the IP address of the Android device and attempted to ping it? I find that, here in the UK, our BT provided "home hub" will often, randomly, stop routing traffic between devices on the same network.
I find that if I can't debug (and I believe Unity 4.2 still used wifi debugging) then I usually can't print either and it's because the router has stopped routing traffic.
A quick reboot of the router usually fixes it.
PS Just read about the ping being successful. Have you downloaded and run "wireshark" to see what network traffic is happening? At least that will show you what is happening on the network layer.
Other thought, any sort of firewall running on the debugging machine?
Try to:
1) Disable antivirus
2) Disable firewall
3) Deinstall Xamarin (in case when you use VS for debugging)
That did help me when I had the same problem

multi-touch support for Android emulator, programmatically

From latest SDK, multi-touch is supported via tethered phone. I'm wondering whether it is supported programmatically. In other words, can we test multi-touch triggered functionalities using automated test suites?
No it's not. but from sdk-r20 you can use multitouch in emulator with a real phone connected to computer. check this out.
I'm working on this same problem. First I'm tested to make sure all tethered signals are going through (I had to modify the SDkController app to even get the connection). Now I'm trying to figure out why, when I click the side of the screen or anywhere, it only shows up on the top right (while the debugger from the emulator is giving the correct thing). The error is explained here.
I did however figure out how to do it wirelessly and through the terminal. If that is what you're asking the procedure is pretty much the same. You need to root your device or do the adb port command (with USB connected) before un-connecting your device, and it'll work wirelessly.

Sending SMS to real test device (not emulator) via DDMS or emulator instance

What is working:-
I'm developing my Android applications with Eclipse. I can start two emulator instances and quite happily send SMS messages between them and do whatever I need to. I prefer to do my testing with a real device though so I have my Android device connected and working away happily and I can run and test my applications.
What is Not working:-
My problem is sending an SMS to the real device through the DDMS or an emulator instance.. I can't find a way to achieve this. When I have the real device selected in the DDMS the emulator control is inactive. I've been hunting around for the last hour trying various searches and I've come up empty handed so if someone can help by letting me know if it is is possible to spoof an SMS to a real test device that would be great. If it is possible can you point me in the right direction of some reading material?
My current workaround:-
I can bite the bullet and just test on two emulators or I can borrow a phone from "She who must be obeyed" and send real messages but too long without a phone makes her grumpy and I try to live by the "Happy wife, happy life" philosophy..
Thanks for reading and I hope someone can help!
Paul
After some more time looking around I've come to the same conclusion as Yury, I don't think this can be done using the DDMS or an emulator instance.
However I have found this little nugget on the marketplace which seems to serve my needs well enough: SMS Emulator
It just sends a broadcast intent with the origin address and message body you set. Just thought I should post it here in case it helps anyone else.
UPDATE:
This emulator works only for devices below android 4.2

Eclipse won't recognize G-tablet

I am trying to view a sample app on a real device (a ViewSonic G-tablet), but the device won't display in the "Choose a running Android device" area. The virtual devices show, but no real devices show (there is only one plugged in, the G-tablet). Some other information...
I am using a Mac with Eclipse SDK 3.7.1 w/Android
App is noted as debuggable in manifest file (android:debuggable="true")
G-Tablet is set to allow debugging
Device selection is set to manual in SDK
I CAN view files on G-Tablet using Finder
I have reviewed Android developer docs
I have searched a lot online for a fix, without success
Please also note...
There is NO option on G-tablet to allow "unknown sources". However, I have downloaded apps outside the customary channels (e.g. Firefox from the Firefox site) and it works fine.
I do NOT want to do anything to the G-tablet to void the warranty.
I have already checked for/installed updates using the Android SDK Manager.
The fixes I was able to find on StackOverflow related to this problem did not work for me. I am thinking the problem may be device specific. One fix discussed getting a driver for the device, but I couldn't find one.
Can anyone please help me figure out how to get the SDK to recognize my device? I'd appreciate any insight on this.
Can you export the app as an .apk and run that on your G-tablet?
also is the android:minSdkVersion set to a value lower than your G-tablet's version?
Found the answer after trying a zillion things. All that needed to be done to fix the problem was turn to OFF 'USB debugging' and then turn it right back on. I found the idea on this page... http://www.mobileread.mobi/forums/showthread.php?t=156247 . Hope that might save someone else hours of time.

Categories

Resources