I need to connect my android app written in Kotlin with Rpi, and be able to open an ssh connection to it, give some commands, open some files, download/upload files and acces the camera on the Rpi through the App. I already set up the Rpi side, so I have all the required information to initiate an ssh connection (IP Address, username, password, port). Could anyone help me out where to start and/or how to do it, or point me to the right direction ( library, dependency, etc..) ? I only found SSH libraries for JAVA ( like JSch, Chilkat ) and I wouldn't want to mix up the languages.
I tried to search for an SSH solution for android Kotlin, so I could start somewhere, but haven't found it so far.
Any help yould be appreciated
Thanks in advance
Related
I am not sure this is the right place to ask, but I will give it a shot. First of all, please note I'm not an android developer, but a php programmer. That being said, I want to create a simple application with following functionality: connect to a server via ssh then send a list of instructions(of course, I need the response too).
I found appery.io, that helped me so far to create the interface, but I am not sure how to initiate a SSH connection. Any ideas?
Thank you!
Appery.io is a development environment. The app that you build simply runs in the browser, or the device (hybrid). Having said that, you can connect to any service/resource that's exposed via REST API when building an app in Appery.io
I have been searching around for a way to connect my Openshift application to my android application. The Mongo library requires a url but I can't seem to get it to work. Can someone help point me in the right direction to find my Openshift MongoDB url.
This is the only url I could find but it doesn't appear to work:
appname-company.rhcloud.com
Thanks for your time!
MongoDB connection parameters are available as environment variables on OpenShift servers. For example
OPENSHIFT_MONGODB_DB_URL
But your database isn't publicly accessible by default. You'll need at least port forwarding.
did u try this command
rhc port-forward -a <your-app-name>
You will get the ip for your mongodb
I am trying to write a http proxy server that would run on the device itself. In fact, need to find a way to capture the outbound http traffic generated by the device.
The code I have so far is compiling OK, it is based on the code found here: http://www.jtmelton.com/2007/11/27/a-simple-multi-threaded-java-http-proxy-server/
The problem is that the http request to the actual server would block and never return .
Is there a better way to write such a service without rooting the device?
You should check SandroProxy.
Can caputre traffic on non rooted device if os proxy settings are used, or with iptables rules on rooted one.
Traffic is stored it in local sqlite database. Captured data can be also examined by chrome devtools. To capture traffic in your app you should check source code for plugins. It has all the code for iptables redirections and proper settings.
Check out the wiki link on google source code HowToInterceptTrafficOnMyOwn
http://code.google.com/p/sandrop/wiki/HowToInterceptTrafficOnMyOwn
btw: send by sandroproxy support :)
I've been using a piece of software called proxydroid to use my device as a proxy server, and its the only one I've found which doesn't require root. I'm not sure if it will be any help to you, but its an open source project and the code can be found here:
https://github.com/madeye/proxydroid
I have noticed that the application will freeze after a while, or if a large number of request are sent at once, but I've not had chance to find out why this is happening.
Forget about setting proxy, use Facebook Stetho library (http://facebook.github.io/stetho/) to review all http requests and responses from emulator/device
I have to code in android for making an application which makes a call to an hadoop cluster node. I have an ip adress for the same i can login via putty on my windows machine.
I dont know how to make a call to that server from my android app?
And, how to run a executable jar file deployed on the hadoop node.
Any guidance or a sample code piece will be a big help.
Thanks in advance
Manu Misra
I suggest you want to login via SSH and execute a command on a server?
The better way would be to write a small 'server app', that provides an interface via http to start the processing. (You might have a look at Sinatra)
If you prefer ssh, you should have a look at ssh java libraries.
I have written a Https webservice, so it is encrypted with SSL.
For testing i would like to acces that webservice over wifi.
edit Example: My webservice is running on a VM number 111, i want to acces it over wifi so the adress would be https://VM111/Webservice/service.svc. I can acces it from any laptop in the wifi network but not from the Android Phone, that is my problem.
Is there a way to acces the localhost of the VM, from the Android phone, and has anyone dealt with this before?
My gues is that is has something to do with domains because every other device is in the Active directory.
If there are any questions about my question i am glad to answer them,
You can get a public URL for your server running on a specific port on localhost.
At my work place I could access the local server by using the local IP address of my machine in the app, as most of the other answers suggest. But at home I wasn't able to do that for some reason. After trying many answers and spending many hours, I came across https://ngrok.com. It is pretty straight forward. Just download it from within the folder do:
ngrok portnumber
( from command prompt in windows)
./ngrok portnumber
(from terminal in linux)
This will give you a public URL for your local server running on that port number on localhost. You can include in your app and debug it using that URL.
You can securely expose a local web server to the internet and capture all traffic for detailed inspection. You can share the URL with your colleague developer also who might be working remotely and can debug the App/Server interaction.
Hope this saves someone's time someday.
I found a quick solution to this problem.
try this link, it should help you guys fix the problem.
http://www.mobitechie.com/android-2/how-to-access-localhost-on-android-over-wifi/
I only changed 1 thing, where the tutorial states you change '127.0.0.1' to 'All',
change it to the ip address your server is running on instead.
after that you should be able to connect to your localhost.
I was also looking for something similar
from desktop type ipconfig you will get desktopIP now put that in android browser you should get your localhost