Is there any way to create a connection to a virtual private network using the BlackBerry APIs?
My understanding is that to connect to a VPN on BlackBerry you need to use bes, create a vpn profile, and so on. I am looking for a pure app-driven alternative.
Is it possible to do this by using something from the BBOS 5.0 packages or something else?
Here is the answer in case someone needs it:
There is no API which allows you to create/configure VPN profile. AFAIK if you are in the BES infrastructure it is possible profiles to be created on the server side from administrator and then pushed to clients via Blackberry Push Services. I haven't tried it though!
However you can also configure a VPN profile on your blackberry device and set it to a wi-fi connection. Then the Wi-Fi connection automatically goes into VPN as well as all the data you transfer in your app(make sure not to forget to add ;interface=wifi when you call Connector#open())
Related
I am working on an application where I need to establish a server on a Windows/Linux/Mac machine which will need to communicate to an Android/iOS device over an existing WiFi network.
I am just in the research phase for now, and though I can find answers for communicating between PC-Android, PC-iOS, Mac-iOS etcetera, I cannot find an answer using which I can do all of it.
The mobile application will be different for both the platforms, of-course, but the server application should ideally be the same, and should be cross-platform.
I should also mention that the server and the clients(mobile-apps) will maintain a 1:n relation, meaning that several Android/iOS devices will be communicating with the server at once.
I need advice on which language/library shall I use for the server which would let the it communicate to both the mobile platforms.
Advice on the libraries I should use for the mobile platforms will also be helpful, though it's not important until I complete the server.
I am just looking for links to helpful resources, though I will be very grateful if you share some code.
I shall also mention, I know Python/Java/C++ which I can use for the server, but you are open to suggest another language which may make the work easier.
EDIT: What I forgot to mention is that, this will be a local server, that is, it needs to communicate with these devices on a LAN (devices on the same wifi network).
If you Know Java for the server side you cab create an application that hosts a RestFull API running on a tomcat server that you call with a local address (such as http://ip_adress:port/appname)
Tomcat can run on Windows, Linux or Mac.
If you need more informations just ask
I'm developing an Android application and want it to connect to an OpenVPN Server.
Since Android 4.0 there is a VPNService class. This class however needs to intercept all the network packets(and require special permissions) because it is apperently running on the Internet Protocol. However as far as I understand, OpenVPN is running on-top of TCP or UDP(my server is configured to use UDP). I only need to tunnel the traffic from my own application through the VPN tunnel.
Shouldn't it theoretically be possible to avoid this(because I don't need to intercept all the traffic, but only the UDP-OpenVPN packets targeting my application)?
Do you know of a library for Android that fulfills my needs?
If not, would it be possible to implement the OpenVPN protocol in Android on-top of UDP without the need of the VPNService class?
I found the follwing project: ics-openvpn. However it also uses the VPNService class and intercepts all the packages.
Sure, you can theoretically do UDP/OpenVPN in userspace/inside your app. But you would need to implement the whole TCP/IP inside your app since you need to emulate the whole VPN stack.
For a one app VPN like solution you are probably much better of using a SOCKS/HTTP proxy etc. library.
You need to use VpnService for creating an application of OpenVPN which takes ovpn file as input for configuration on client side like OpenVPN Connect. So any person can change configuration according to their need. Also, you have to configure the server for OpenVPN. Take server of AWS EC2 or any other. While in configuring VPN on server side follow this link.
I am very new to jxfs things. I have a requirement to call jxfs server which is in cloud server from the jxfs client which is in ATM environment.. How can i call?.. I need to call this one through the Jxfs RMI concept. It would be appreciated one if any example code is available. If atleast you are having code for calling from jxfs server to jxfs client, please post it.
Thanks in advance guys.
One of the interesting things about J/XFS and remote device access (based on RMI) is that it is just matter of configuration.
You need to configure a J/XFS repository in order to handle a remote device (basically set 'remoteAccess' to true).
Then accessing these devices from the programming point of view is just the same as they were local devices.
Architecture is explained here: ftp://ftp.cencenelec.eu/CWA/CEN/WS-J-XFS/cwa14923/cwa14923-01-2004-May.pdf
Details, when programming may differ depending on the J/XFS implementation you are using.
Trying to answer your question below:
Whenever you want to access a device remotely in J/XFS, RMI is used. You need to make the following setup:
On a server (should be accessible) you need to start a JxfsServer. The JxfsServer will use a Read.repository
whith all the ATM's and devices configured on them as workstations, with the right IP addresses.
On the ATM, you need to install:
J/XFS libs
J/XFS device services for the devices on the ATM
Setup the DSstarter:
Will use the SpecificDeviceManagerRMI connecting to the JxfsServer you started before.
On your server (cloud) wherever you are going to use the J/XFS client you can get the remote controls by performing
the J/XFS initialization as follows:
jxfsDM_ = JxfsDeviceManager.getReference();
jxfsDM_.initialize("com.jxfs.forum.communication.rmi.SpecificDeviceManagerRMI,<atmWorkstation>,AppTest,2006;<jxfsserverhostname>,");
Then you can get the remote device controls with getDevice(...), and start using them as if they were local devices.
Please, note that handling RMI ports can be tricky, specially in a secured environment as ATM network. Make sure all the ports you need are open.
I want to connect my android application to an applet which is running on my pc on Google chrome on Wi-fi.. where my phone works as a wi-fi hotspot and pc as the connected device. I want the connection to work uniquely as I want commands to be passed from my application to the specific applet, on the execution of which my applet does specific tasks. Please tell me the APIs which I can look in both Java and Android or the technology I have to use to make it work..
You need to use any program, such as wamp server, to make your computer to be a localserver. It will install PHP 5, MySQL and Apache. In other hand, you will also need a little bit of knowledge in Php language to create you own web services.
Another thing you need to be aware is that to handle you connection between server and device (and by this I mean which IP you are going to use) you will have a little headache; but first things first..break your problem in little parts thus will be easier to solve them.
I recommend this tutorial.
I think the simple way to connect these two softwares is using UDP.
It is fast, it is easy to program but it is generally unreliable according to TCP. But it is already local network. I dont think that is a case you need to take care in your local wifi network.
So take a look at this tutorial http://tutorials.jenkov.com/java-networking/udp-datagram-sockets.html
There are other ways like https://www.alljoyn.org/. It has more functinality but more complicated.
You must install Server on your PC(Apache httpd or apache tomcat or other based on your interest). A server listens to request from clients. When your mobile is connected to your pc(doesn't matter wire or wireless), you can make a request to an url(say, localhost:8080/welcome) from your app.
Create an applet and connect it with your web application(in the server) using java.net.URL and java.net.URLConnection.
On performing some operation on the client, call the url of the server application and forward the response to the applet.
I have a native application written in C++. I would like to write an Android application that would be able to comunicate with my native application when user is in connected to the same WiFi network as my PC.
How this things are done. I mean what technologies are used behind it. Maybe you have some samples?
You could use a peer-to-peer library, like AllJoyn from Qualcomm. The idea is that both your PC and the Android device will use TCP/IP to communicate with each other. You still need a protocol above that however that will handle discovery, session establishment and exchange of data.