Mobile Web App using device bluetooth, is it possible and how? - android

I'm working on a research project for my company. My goal is to make a mobile web app that uses mobile bluetooth to send data to others mobiles that use the same web app.
I did some research and I found that Chrome for iOS and Android supports an API to use device Buetooth with LE profil: https://developers.google.com/web/updates/2015/07/interact-with-ble-devices-on-the-web?hl=en
If I understood well, it's absolutely not suitable to transfer heavy data. The final goal of my project is to implement something like Hadoop for mobiles phones across a web app: Mobiles will share replicated databases and will perform MapReduce operations on datas.
I'm beginner in development and I don't really know how to find solutions. I think the only solution is to make a native or cordova app.
Do you have some advices on how to perform research on such things when, I guess, nobody did it yet ? Do you have any ideas to achieve this goal ?

Related

NativeScript (Telerik) and Serial Port on Android

I need to utilize both a barcode scanner and a USB port on something handheld. I figure a small Android Tablet is my best option.
I've spent some time researching and I cannot find anyone who has implemented a NativeScript App w/ Serial Port communication on Android.
I am concerned this means it is not possible, or prohibited for some reason.
I have the Serial Communication functional right now using Nodejs and the serialport module via NPM.
Does anyone know if this module will work in a NativeScript app?
I am going to attempt to make this work over the weekend, but before I waste a lot of time I figured I would ask in case this is simply not possible -- I've chased simple bugs for days so I could waste a long time on something that's not possible. :)
Thanks for your help!
Anything you can do with a pure Java-only app (or Swift/Object C for iOS) you can do with NativeScript as you can access all the underlining APIs. This is one of (if not the) key differences between NativeScript and other technologies. See the NativeScript docs.
Most probably, you'll want to use some third party code to communicate with the serial device (such as usb-serial-for-android). Here's a great blog post on how to use third party code in your NativeScript app.

Architecture for cross platform messaging app

i am looking to build a mobile messaging app firstly in android and then ios later, and am struggling with the backend architecture and need some advice on what would be best in my circumstance. Basically i am used to just developing apps through a basic web server and using mysql with php, but now i think and want to create something that not only is very reliable and fast but is also scalable and can be used by both the android and ios platforms.
I am thinking about developing it on google cloud platform using either their google app engine or google compute engine depending on what other architectures i use. Also i was going to use google cloud messaging as my main way of handling the messages, however i am now not sure of that as it is only supported by apps that run on android and not ios, also i have heard it can be unreliable in some messages getting lost.
My main problem is that i have heard so many things about different architectures like ejabberd, xmpp, socket i.o and databases like redis that all work well with messaging apps, however i am not sure which to go that will work well together.
Sorry if this seems a bit of a confused situation, but i dont want to start developing something that i am later going to have to change. Thanks for the help
Announced last week: Engage your users across Android, iOS and Chrome via Google Cloud Messaging 3.0:
https://developers.google.com/cloud-messaging/
https://www.youtube.com/watch?v=gJatfdattno
You are asking about many different things.
Storage: can be a mysql database or something like mongo db
Transport protocol: XMPP is a chat protocol with many chat features included but it is not supported in browsers. WebSocket is more low level and more general but works inside the browser
webserver software: you basically need access to the database and be able to transmit XMPP or WebSocket. I'd recommend node.js for this. PHP is more for web pages

Communicating between mobile devices over a local network

I'm a complete newbie with regards to developing for Android, and for starters I'm trying to develop a simple card game that can be played multiplayer over a local network. I'm having trouble finding a starting point for how I would go about this, I can find plenty of things for communicating across the internet but not having much luck seeing how you communicate directly between two devices over a LAN.
It's a major part of my plan for this app that it be multi-platform and that iOS devices and Android devices can play against each other, so I'm looking for a method that supports this. I know it's possible as I can see there are other apps that have this functionality.
I don't need a detailed implementation (although the more help the better!) but if anyone could just point me in the right direction for how to go about something like this, I'd be really grateful.
I think u need a connection peer to peer, android implements Wifi Direct
Look android dev site. http://developer.android.com/guide/topics/connectivity/wifip2p.html
For a card game I recommend using client-server.
Electrotank is a good server that provides a framework that helps you create a game of this type, with rooms, chat, friends list and connect to Android and iOS. U can write server plugins in Java.
http://www.electrotank.com/es5.html.
Another good server solution is SmartFox.
Or you can create a turn-based game, creating a database to save data and a counter on each client, where you will limit the time for each move, from this time you send data to the server and your opponent query this data the server.
I was working on the exact same thing. You'll want to use sockets to open up connections between multiple instances the same app.
I created an example app that demonstrates how to do this which I link to and explain in great detail here: http://brendaninnis.ca/connect-nearby-devices-part-2.html
I have an example for both Android and iOS that communicate with each other.

Peer to Peer communication between iOS and Android devices

So I am a relatively new iOS developer but thanks to Stackoverflow, i managed to get peer to peer data communication for my app working without the need of a server using gamekit/GKSessions.
Basically, one iOS device acts as a server and others just connect to it to receive app specific data.
Now, the app is currently being ported on Android and I was wondering if there is a way that I can make an Android device connect to the iOS app and behave the same way as ios app does.
Android developers suggested alljoyn to be an optimum solution for android but that doesn't seem to be available yet for iOS.
Please suggest if you have any ideas on this front.
If there is a solution that involves rework on iOS side as well then I am open to it!
In case, you or others tackling the same question in Jan 2013 needs an answer,
AllJoyn is now ready for iOS too, amongst other platforms.
https://www.alljoyn.org/docs-and-downloads
Venkat i suggest you to read and get some detailed information regarding P2P. This is a Good source, because you might get stuck if both devices are behind multiple Nat. but if your willing to go forward there is always a way. My suggestion would be an Relay, but you need to have a server, but the relay behaves like P2P. Look at the source above to get ideas.
I didn't have time to wait for alljoyn to be launched for iOS and sensing no other feasible solution that would fit on my timeline, I implemented a relay server in between to achieve this.
For others though, iOS binding is now available for alljoyn (www.alljoyn.org).
I haven't tried it yet but the android version of my app works with alljoyn and it works perfectly so I assume it will do the same for iOS as well.
One limitation to be considered using alljoyn is that it cannot communicate between devices that are behind different subnets.
I think there is a limit of max peer to multiple peer connectivity (max 8 peers) derived by IOS and Android, there is no connectivity tested using alljoyn between IOS and Android devices

Do I need to know web application development to make mobile apps? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
So I am looking to learn both web application development and mobile app development, and I was wondering is there is an overlap between the two. More specifically, is the knowledge of developing web apps essential or even helpful when building mobile apps?
I was under the impression that one had to know basic web app development first (at least server side programming) before being able to develop mobile apps that use the internet (since I assumed a mobile app is just a different client side that would ultimately have to talk to a web application on a server somewhere). However, Googling this brings up discussions about mobile web apps vs. native mobile apps, and this has me confused (for example is Shazaam a native or a web app?).
Please help me understand.
A native app is an app that execute on your mobile.
A web app is an app that open a webPage inside your mobile app and act like a classic web browser.
You don't have to know web dev to do mobile dev, but it can help, programming is the same for every platform, you just have to know new language every time you change, but principles are the same.
Knowledge of developing web application isn't necessary for developing mobile application. But, It will help you a lot. You can also build mobile app with HTML5,CSS & JavaScript.
It depends.
You can develop mobile apps which do not need any web components at all.
I see at least two big issues which make web development extremely useful for mobile apps
You could develop non native mobile app based on web technology. Using jQuery mobile or GWT (or other framework) will support platform independence for you apps. The back-draw is this application could not use all features of the mobile device (e.g. camera), and they will in general have less performance and battery/power efficiency.
I find it very natural to use cloud techniques in combination with mobile. You could use the web to save and share data. And this allows you to build application driven by mobile AND desktop (desktop is much more efficient when it comes to data input)
I would recommend to look at web technology, too.
Sooner or later, your mobile application would need to talk to a a server to do something useful - the phone is the thin-client (relatively speaking). So yes, usually, you would use a server side language (like PHP or RoR) to build some kind of API for your mobile application to talk to and be useful.
For example, since you bought up Shazaam (which is a native application): Shazaam would record a few seconds of music using and then uploads to a web service that does all the heavy lifting of sampling the recorded music and looking it up on a (what I would imagine) giant DB of music for the 'signature' of that music and sending the identified song back to the phone so it can be presented to the user. Somewhere along the way, there is server side code that does this.
I've worked at companies when mobile app development as just starting to take off (2008-09) where there were guys who only coded Java for Android/Blackberry or Objective-C for iOS and didn't know jack about what happens in the backend. For that, they talked the server-side guys who wrote JSP or python to build the APIs their native code would talk to.
There are servics Parse that would allow you do build a "backend" for your mobile application without needing worry about getting your own server or writing server side code. Useful for certain classes of applications.
I hope that all makes sense. There is definitely an overlap between web development (as in server side) and mobile development (native code on the mobile). Learn both, specialize in one if you have to.
You can start learning Mobile App Development without any prior knowledge of Web/Enterprise Application Development.
But, it would definitely make your job easier if you do have that knowledge. You need to know the basics of RESTServices (cause this is mainly how you would interact with a Server from the Mobile App), know how HTTP POST, GET, DELETE,etc work. Also experience with MySQL or SQL whill help your for using SQLite(which is basically your DB on mobile apps). Also if you have some knoledge about ORMs such as Hibernate, may also help you in your mobile app, if you have a large model, and a large data structure that you cache on your device, and it would allow you to use ORMLite(on Android for example).
Definitely all this things will help you a lot, and any other experience regarding programming standards/ design patterns/ Java/ Objective-C will make your work easier, and your developed products more reliable/stable.
Good luck.
A web app is a website (sometimes but not always aimed at a mobile device) using a different set to technologies/languages (php/perl/.net/xhtml/ccs etc) than native app development (obj c, c++, java).
Yes it's useful to have some knowledge of both, but if I was you I would concentrate on one path (one thing at once) either server/back-end/web-app/web-site building or mobile development. I worked over 10 years in a web software development environment before deciding to move to mobile app development. Now I do no web coding, I use existing web-services or work with someone else who does the web-services side of things.
It also depends what types of apps you want to build. If you want to write games for mobile devices then you don't need to learn any web stuff. Use Apple' Game Center for the leader boards etc.
Even if you want to write mobile apps that communicate with web services, I suggest writing a few apps that consume existing web-services first, so you can concentrate on building something that works without trying to learn more than one programming language at once. There are plenty of web-sites out there with web-services you can use to create your own apps.
There are options out there for writing apps using web technologies (phoneGap, titanium etc.) but I would avoid them personally.
Well, basic knowledge on web applications is very useful. After all, as you said, a mobile app is just another type of client. Knowing the principles of web communications is essential. The server side of an application is quite the same. As far as the client side is concerned, transferring your code from java to android is quite easy...!
I think it is upto how you want to build you mobile app. If your app can do something locally, then there is no need to know web programming. But if your app wants to communicate with server, or wants to use web stuff (such as rendering the HTML5 and javascript), then you'd better know web programming. Both native and web app can do the thing, but different pros and cons. There are also platforms that helps you develop the mobile app using html and js then turn it to native code such as titanium.
IMHO, the processing of mobile app should be done on server if possible. In that way, the app can do more and is more efficient. Therefore, knowing web app development will be a big plus.

Categories

Resources