Android wifi connection - wifi

Hie members! ----am Boniface M - - a beginner in android[University student]..
My question is am planning to develop an android app/middleware that will act as a grid service .i.e an app for grid computing.. the application needs to be installed in 1....n devices. in the connection, one device must act as a server for all others. communication between the devices is via the wifi under the permission of the server device.which is determined by a certain algorithm[no problem here].
The problem is should i use a database that will keep track of all the services a device is running which are accessible to other devices or is there any way that i can directly keep all this information and then retrieve them as i request them from another app installed in another device.
and also how i can share files via wifi like blutooth
Thanks....

You're asking many questions in one and I'm actually unsure what you mean overall. Here's a few links that are sure be of some use...
http://developer.android.com/reference/android/os/Build.html This library is good for finding out information about the device you're running on.
http://developer.android.com/reference/android/location/Criteria.html - Criteria might be useful, lets you know what location based services you have running
Other than that, if you're looking to see if particular things are running check out this question: How to check if a service is running on Android?
If you're looking to keep a central hub of what devices have what available etc. you're going to need a middle man for what you want to do I suspect. If it was me, I'd do HTTP requests to a server, to php scripts I have written which would then read/write from a MySQL database to get information about other devices.
If you want to share files via wifi.. you're going to need an FTP server on the phone. There's an app swiFTP which does this to some degree (phone -> PC) but the concept should be the same. Take a look at it. It's a starting point! http://www.tested.com/news/how-to-transfer-files-wirelessly-to-your-android-phone/53/
Again, I'm unsure EXACTLY what you're looking to do but hopefully all of that is of some help. If it's not leave me a comment and I'll try and assist you further.
hope it helps!

Related

Jail broken iOS: Communication between tweak and application

I have my iOS application (standard application with legitimate configuration). It gets information about phone number from network and shows to user. Application can work with network, has storage and it's very clever :).
Also I have a tweak for InCallService.app that shows additional information about current call. I want this one to be very stupid and simple.
I need an advice how can I make communication between the tweak and the application. I want the application to be started by request from tweak in the background mode, then loads information in background mode store received data and return this data to tweak. Data contains a lot of information and I'm not sure that all this information can be posted inside of URL.
Which technologies should I use? Also if it's possible any links to related subjects would be appreciated.
CPDistributedMessagingCenter is a popular option. It is a wrapper over the existing messaging facilities in the operating system. It provides server-client communication between different processes using simple messages and dictionaries. http://iphonedevwiki.net/index.php/CPDistributedMessagingCenter
RocketBootstrap is another option. It is a library that solves a denied lookup error of IPC services on iOS 7 and above
http://iphonedevwiki.net/index.php/RocketBootstrap

I have a TURN server, but what do I lack ?

I am building a WebRTC videoconferencing service for iOS and Web. We have so far used tokBox, they deliver the whole package (client API (ios and web) + TURN server. Their solution also takes care of generating tokens and session ID etc. But we want to have our own setup, and a partner has given us a TURN server. But, what do we miss to be able to have a webRTC video conference between iOS and a web client? What service will let us just plug in the TURN server address/credentials and have it work both from a web and iOS client? Are these suitable packages: EasyRTC, SkyLink, AppRTC ? We don't need a lot of features, just 1-1 videocall with no bugs. Which one is best?
at minima you will need a signaling server.
apprtc is a complete application, it is not suitable for what you have.
tokbox is a PaaS, so you could replace it with another PaaS (skylink, forge, ...)
easyrtc gives you the code of a signaling server, but not the infrastructure (load balancing, ...), you can use it if you re ok to host it.
you might want to go for peerJS (open source, both hosted and DIY options) if you really want to do it yourself. Otherwise, just changing PaaS is not making a lot of sense. You have to think about everything you're gonna lose as well (recording, archiving, media server, ...).
If your use case is well defined, you can ping me offline, and i'll point you to additional resources.
You can look to Kurento media server.
You can use the service provided by anyconnect SDK. They provide the leading Peer to Peer connectivity between any two nodes whether browser, desktop or mobile platforms. They also provide STUN,TURN and Signaling (SIP,XMPP) server support. Using their SDK will let you just plug in your server credentials and transfer any type of data.

how do i access my cisco router details from ios mobile

Is it possible to access my Cisco router details like Name,Model,IP Address,Connection status etc from my iOS mobile.
I'm even ready to write small mobile app in iOS to get all router details.
Since I have just started learning in iOS, don't know if any library already exists for above task.
If my router does not work or gets hang.. I even want to try for restart of router using my mobile.
If example code exist, it will be very useful.
Like Cisco already has andriod and iOS app for same above function but dont want to use this app and want to write my own app with limited features only.
(http://www.addictivetips.com/mobile/cisco-connect-express-manage-router-settings-remotely-android-ios/)
Thanks,
Accessing network gear is best done by using SNMP. Cisco has extremely rich management/monitoring capabilities via SNMP and all of their MIBs are publicly available here.
Almost all Cisco gear supports the SNMPv2-SMI MIB (the 1.3.6.1.2.1 OID) so querying things like sysName, sysLocation, sysContact, sysDescription, sysUpTime should be very easy. This MIB even supports tables for listing all the interfaces and IP addresses and has a whole lot of other things that might be of interest to you.
If you have SNMP write access on the device then you can even make config changes and perform management functions like rebooting or bringing an interface up/down.
There are a few SNMP libraries for ObjectiveC and I think Net-SNMP is the most popular (It's not .net even though the title suggests that).
If you are new to SNMP then I suggest starting simple by querying easy objects like 1.3.6.1.2.1.1.5 (sysName) and 1.3.6.1.2.1.1.6 (sysLocation) before trying to jump into tables like 1.3.6.1.2.1.2.2 (ifTable)
Remember, you don't have to stick with the standard MIBs you can download all of the custom ones that are particular to your device which will give you incredible amounts of flexibility.
You could use a screen-scraping technique to telnet or ssh to the Cisco device and parse the "show version" output. This will give you some of the information you need. For others, like IP addresses, you can use "show ip interface brief", "show cdp neighbors" etc. as you need.
Keep security in mind: make sure that telnet/ssh credentials are adequately protected in your app's settings, and try to restrict your commands to those that do not need privileged access on the Cisco device.
Be aware that Cisco devices have a small pool of available VTYs, and every telnet/ssh access from your app will use up one VTY. So if you have for example 30 guys wanting to use the access the device simultaneously from their apps, some of those instances are not going to get access to the device.
If this is a concern, SNMP is a better and more scalable option as suggested by previous answer. Make sure that you (a) have a read-only community string configured on the device, and (b) use only the ro community string from the app.

Network Debugging iOS Application

Is there a library or plugin out there that will allow me to capture all network requests made by my iOS application (in DEBUG mode only of course) and store the requests in a file?
I am aware of Pony Debugger, but it only let's you view the network requests in Chrome Developer Tools Dashboard. I want an actual file I can process at a later time.
I find myself using Charles http://www.charlesproxy.com/ fairly often. You can use it to proxy in the simulator or you can set turn the proxy on and then proxy your iOS device over it. It's also nice to simulate network problems like latency and slower speeds (you can use network link conditioner as well but it's a pain to keep going back to the settings app). They have a free trial so you can decide if it's right for you.
If your using AFNetworking there is a library, AFHTTPRequestOperationLogger that will allow you to easily print all requests and responses to the console. I know it's not a file but with a little work you could pull the logs off your device for later inspection.
Lastly if those options don't suite your fancy you can roll your own solution with NSURLProtocol. It probably wouldn't be much work and there is a ton of information out there on it. NSHipster did a writeup a couple of years ago http://nshipster.com/nsurlprotocol/.

iPhone/iPad as a server

I want to create an app where clients connect to a server and communicate with each other via images and texts. I already have a server as backend, but is there any way that an iPhone becomes the server? I know that there is CocoaHTTPServer, but all of the examples are just a server displaying a webpage. Do you know how I can use it to fit my needs ?
There is no way to just take all you stuff that now runs on an apache directly to the iPone
You find a couple of tutorials and solutions in the internet.
Maybe this thread can help you: iOS devices as web server
Concerning CocoaHTTPServer
Maybe have a look at the SimpleFileUploadServer

Resources