i heard that wol(wake on lan) will only work for desktop systems. is there any implementation in java for wol, so that it works for laptops?(wol is the mechanism of turning on the remote system by sending 'magic packet' to the system).and is there any implementation in java for android phones? i found a simple wol apps in android market, i tried to extract the functionality of these apps, by practically testing them. but no app is working for both desktop and laptop systems.i configured my windows pc, so that it allows magic packet to wake on the pc.but i dont know where its going wrong.
WOL is a BIOS setting that you will need to turn on on the individual machines (I think it is turned off by default). I don't think there is any reason that laptops cannot accept WOL packets.
Here is a simple implmentation of WOL for Java: http://www.jibble.org/wake-on-lan/
It should be easy to port it over to work on Android.
However, you have to note that WOL will only work within a LAN and that the target machines have to be in a specific power setting in order to allow them to turn on.
You have to be more specific. If your laptop is connected over WiFi then there are big chances that it won't work. If your laptop is connected over an Ethernet cable then most probably it will work. You just have to enable WOL from the BIOS, or on some devices it can be also done from the network interface properties.
I'm using WolOn Android app to wake a laptop connected over cable and it works flawlessly both on Windows and Ubuntu.
Related
I have a program that is in C++ on a computer. I also have a Android app (Android version > 4.0). Both are communicating via TCP socket. The C++ program is the Server Socket, and the android app is the Client Socket.
Now, this works well if I tell my Android app what is the port and IP of the C++ server. I would like to be able to discover my C++ program from the Android device. After some research, I found that I could broadcast a message on the network from the C++ program that contains the IP and Port of the computer. Then my android program will listen to the broadcasting address until it listens to the server's broadcasting message.
I don't know how to do that in C++... Is is a good idea? If yes how can I do that? If not, what would be the better idea?
Thanks!
Getting client-server stuff working reliably can be quite challenging; there always seems to be one more edge-case that needs to be resolved. Rather than rebuilding the wheel, I recommend just using an existing library where someone else has already worked out all the kinks. I haven't used it yet, but the AllJoyn open-source project looks very promising.
I have a question about the p2p functionality of Android OS (4.x and higher). I have a PC program that makes use of the Boost C++ library that can function as a server or as a client. Now i have a Android app that has a server using Java sockets. This program need a accesspoint to connect to each other.
I'm looking for a way to connect the Android server and the PC client program without a accesspoint. After looking around i found out that Android has a p2p library.
Android P2P
As a read it you can only connect two Android devices with each other, my question is if it is possible to use this library to connect the Android device to the PC using wifi p2p? Or if there is a other possiblity? All suggestions are welcome!
Roy, have a look at this: http://en.wikipedia.org/wiki/Wi-Fi_Direct
WiFi P2P is now called WiFi Direct, and it is indeed possible to connect two devices as long as one of the devices supports it. So Android device in P2P mode and a PC without any special configuraiton should work fine. However, the PC can (probably) only connect to one access point at a time, from its perspective the Android device is the access point, it would have to disconnect from its usual access point to connect to the Android device.
Also check out SoftAP.
I need my computer program to be able to send and receive SMS messages. The software has to run independent of the Internet so using a web based SMS gateway is not the solution.
The software should be running from a linux or a Windows machine. Windows is more important for my usecase. My program is in Java but I guess there may be solutions independent of the programming language.
I am considering one of the following options.
Kannel http://www.kannel.org/ Although supported for Linux I guess I could find a way to compile it in windows like done here: http://www.ddj.co.za/kannel-for-windows
The other one seems a more lightweight option http://smsj.sourceforge.net/
Which of these or something else that you have in mind could be a better way of sending SMS via computer without an internet connection?
I am considering using these libraries so I don't have to program all the AT Commands.
Also how do I connect my phone to the computer? For example will it be fine if I just connect my phone with a USB cable when using kannel.
Update:
I need to use simple GSM phones and not depend on IOS or Android specific features.
Perhaps not want you needed or wanted, but maybe useful for others: When I had my iPhone jailbroken there was an Cydia app I used to send SMS from my computer through my phone, BiteSMS.
You had to ssh in and then something similar to:
/Applications/biteSMS.app/biteSMS -send -carrier 077xxxxxx “The message goes here”
Obviously you replace 077xxx with the number you want to send to.
It looks like it is fairly similar process with Android, check out this question on doing this through Android. Again this requires a ssh connection to the phone. Also have a google on 'Sending sms from commandline' there are other resources available.
As for other methods, I can't see any viable options without attaching a phone to your computer and accessing the OS and ssh seems the easiest way to do this.
Try smslib.org + some GSM modem.
i am developing an APP in Android which share screen to all android mobile phone connected in a session.
i want to know that android provides any sdk which provides same service like desktop to dektop access as in team View ?
or any Idea, which SDK i have to used?
Thank you.
Smartphones can't directly connect to each others since they are running in different networks. The common way to solve this is an additional server component. All phones need to connect to the server and send their data. The server is pushing this data to other connected clients, probably by using push notifications. In Android Push Notifications are known as C2DM.
Android developers blog:
http://android-developers.blogspot.com/2010/05/android-cloud-to-device-messaging.html
Here's another tutorial on the topic:
http://www.zylinc.com/blog-reader/items/c2dm-a-simple-introduction-using-a-java-server.html
I like 2X RDP a lot. It works very well on phone and tablet and connects to the regular Windows RDP server, so don’t have to install anything else on the server machine.
On iPhone if I create custom service for example "_test._tcp.local." in Bonjour I can seek/broadcast this service through WiFi or/and Bluetooth.
It is possible on Android ?
I know that there is jmDNS but from what I understand it works only through WiFi/Network,
not Bluetooth.
Thanks
EDIT by Seva Alekseyev, who offered the bounty: I'm not after workarounds (like Zeroconf sans Bluetooth or Bluetooth sans Zeroconf). I'm after the real thing.
Not on bluetooth, because Android currently doesn't support TCP/IP over bluetooth, and Android's native NSD support (network service discovery) works over IP.
It DOES, however, work over Wi-Fi. Also, Android supports service discovery over Wi-Fi Direct, which gives you greater range and battery efficiency than bluetooth. For a guide on how to integrate service discovery into a wi-fi direct enabled application, check out the Android Training lesson.
Portions of this answer are duplicated from our Dear Android video response to this question
You can use BluetoothSocket and BluetoothServerSocket to create TCP like sockets over Bluetooth.
Here is a sample of android dnssd :
https://github.com/twitwi/AndroidDnssdDemo
You may need to modify the jmdns library such that it creates bluetooth sockets if bluetooth is ON, otherwise creates simple sockets. Encapsulate the socket communication in a different class that creates socket conditionally.
There's a couple of reasons why this is not possible currently. The one most related to your question is that - as you probably experienced - jmDNS requires a TCP/IP link to publish or browse services (it requires an IP address to bind to). As the other answers & comments state, you'd need an established PANU link for that, which Android currently doesn't provide.
The other reasons it will not work are:
Apple uses a couple of mechanisms to assure iOS devices will only talk to other iOS devices. So even if you'd get Android into talking Bonjour-over-Bluetooth, it would only work Android-to-Android.
Apple certified devices in the MFi program have a special crypto chip which is supplied by Apple. I'm not sure if this applies to Bonjour-over-Bluetooth connections as well, but I'd assume it does.
You could instead look into using Bluetooth 4 LE - at least there's an Apple API for that starting in iOS 5 providing a Slave profile, and extended to support a Master profile in iOS 6.