It seems there is an initiative from Google to directly send the map directions from Chrome to Android device. I was wondering is there a way browser can communicate with directly an Android application, where the Android device is connected to the system by Cable. This will be helpful in some scenarios where the user does not have access to Wifi, and he wants to download the data to the mobile phone.
You use the Android Intent invocation that is available in the Android browser and demonstrated in here.
The problem that you will face is that not every app supports the ability to be opened from the Web Browser. This also relies on the fact that you are on the same machine and doesn't solve your "cabled" issue. You will also have to know how to exactly integrate with these Android apps, and that is not something that they often expose.
For a few reasons there is often no direct access to local files/devices from inside a browser. When cabled, you can forward a tcp port of the android system to local system, using Android Debugging Bridge(adb).
So you can send some commands/data to the device by setting up an application in android who listens to particular tcp port, and forward the port to local system. Then all access to the local port is forwarded to this application. Then with such techniques like jsonp, your browser can communicate with your device.
Related
I have an embedded device that exposes its functionalities via a RESTful Web service. I want to consume those Web services via my android device by connecting my mobile to the embedded device via Wifi? Is it possible to do so?
The possible use cases are transferring the control panel UI of the embedded device to the android and controlling it remotely. The UI is exposed as a REST endpoint.
If the chip you are using supports Wi-Fi Direct, you should search for its code yourself since I don't know about it really, but you can find documentation and examples of wifi direct here, and if it doesn't support it, there are two scenarios, one is that you want to make your android device a server and your chip a client, which leads you to use Nanohttpd in your android code to make a server, and the other one is to bring up a server on your chip and make your android device a client, which leads to using a library like loopj which saves lots of pain. so I guess that was all.
Target:
Sending a file to connected peers. The connected peers should recieve the File without a preinstalled app.
Situation - Question:
I'm writing an app that opens WiFi-direct or a WiFi-Hotspot for other devices. The other devices connect to the device (Main-Device) where the App is installed on. Now the Main-Device should broadcast a file and every device connected to the Main-Device should get a notification, that it could receive a file. But, the other devices should not need an App to receive the file!
Is this possible? Cause all I found till now describes how you can send something from one to an other device if both installed the same app. Using sockets and one device becomes server and the other client.
Reason:
I try to create a game, which just is installed on a Main-Device. Other devices can join the game by connecting over WiFi, then they'll receive a HTML5-file from the Main-Device which they can open in their browser. As soon as they have the HTML5-file they'll be able to interact with the game on the Main-Device.
But I don't want to force everybody who likes to join the game to download the app. Another Point is, if this is possible, I don't need to rewrite the app for other systems. Cause every Smartphone/Tablet has a Browser.
But, the other devices should not need an App to receive the file! Is this possible?
No, it isn't.
I try to create a game, which just is installed on a Main-Device. Other devices can join the game by connecting over WiFi
That, is possible. What you need to do is build a captive portal.
Basically, all DNS names resolve to your server's IP address, and all traffic that would be routed elsewhere is not routed to the internet. How you do this depends on your network setup. There is a lot of software available. I've used Untangle before with decent results: https://www.untangle.com/store/captive-portal.html
I'm trying to record browser activities of my Android mobile in Jmeter as explained here. I'm done with all the above settings, but Jmeter is unable to record the traffic.
Is it like, mobile and laptop should be connected to same internet source (wi-fi) or is it like laptop should be made as a hotspot and the we need to connect mobile to the hotspot?
Also, please let me know if anyone has done any other settings than the one mentioned above?
Yes, Mobile device and laptop need to be on the same network in order to have the mobile device use the laptop as an HTTP proxy. You should also turn off cell data (plane mode on an iPhone) to make sure you're not trying to connect via the cell data.
Most of the native android applications fail to connect once the proxy is set , Same goes for few sites as well, The solution is to either manually add API's to the jmetre and test or most probably the connections setting in the application configs needs to be changed in order for jmetre to record the script , This basically seems to be SSL issue and is to secure the apps from accessing data on proxy.For more detail blaze metre documentation shall help
https://guide.blazemeter.com/hc/en-us/articles/360000285357-Recording-Using-Android-Devices-Recording-Using-Android-Devices
So I am developing an APP and I need to connect multiple android and multiple Iphone to send text data without any internet connection or service provider data network.
So one of the phone will have to act as a server to relay information between them. But the app will have to decide which phone will be the server and if a phone that is the server leaves the conversation then another phone will pickup as the server this will all be done with some smart programming but before I get there.
I know Android WiFi direct can do a one to many connection setup which makes it easy to connect android phone and accomplish the task between android phone only. But the problems comes when I need to connect Iphone with the android phones. Since the Iphone must be able to act as a server as well.
I would like to know a few things:
Can I connect Android and Iphone via WiFi Direct?
Can I connect Android and Iphone using Multipeer connectivity feature on Iphone?
Is there anyway to create a soft access point using Iphone? I know android can do this via WiFi direct feature.
If non of these can work can you suggest something.
From the discussion here it doesn't look possible
I wonder though if both OS allow enough control over the WiFi transceiver if you couldn't just write an app that could what you are asking and just bypassing the built in software architecture all together. I would think Bluetooth would be too weak except in extremely dense device saturation environments, but just for proof of concept that could be another route to take. My guess though is that you just wouldn't get that level of control over any of the radios inside a phone through the current OS.
I have a Flash client application, written in ActionScript, which uses the XMLSocket class to talk to the server device via TCP/IP, on port 5750. So for example, I can run the Flash client in a browser and connect to a server which is on the Internet.
Since recent versions of Android support Flash, I would expect this to work when we install the Flash client on an Android device. However, the connection attempt just hangs. I don't currently have any diagnostics on the client side, just the running Flash application. So we have no logs or standard error messages.
The server device is basically a black box, but it does seem clear that the server never gets the request from the client. This suggests that the client was unable to open the socket.
A basic Web search suggests that not much is known about this situation. Any thoughts about what's going wrong here?
For example, maybe XMLSocket just doesn't work in Android? Or Android blocks port 5750? Or Flash Player has some kind of sandbox or firewall limitations built in?
We've tried a couple of different Android devices running Android 2.2-2.3 and Android Flash Player 10-11. The client is written in ActionScript 2.
This is probably a security settings problem.
I suppose your Flash client running on the Android device is not in the same domain as the server. Adobe's AS2 reference tells it all:
The XMLSocket.connect() method can connect only to computers in the same domain where the SWF file resides. This restriction does not apply to SWF files running off a local disk. (This restriction is identical to the security rules for loadVariables(), XML.sendAndLoad(), and XML.load().) To connect to a server daemon running in a domain other than the one where the SWF resides, you can create a security policy file on the server that allows access from specific domains.
Setting up a server to communicate with the XMLSocket object can be challenging. If your application does not require real-time interactivity, use the loadVariables() function, or Flash HTTP-based XML server connectivity (XML.load(), XML.sendAndLoad(), XML.send()), instead of the XMLSocket class. To use the methods of the XMLSocket class, you must first use the constructor, new XMLSocket, to create an XMLSocket object.
There are a couple of other related problems to your question, worth taking a look:
XMLSocket working in firefox but not IE
Flash client XMLSocket not connecting to server