Which is the best solution for nearby connection cross platform in flutter? - flutter

I am developing an application in flutter where people in the vicinity can connect to each other in a single room and exchange messages.
The app should work like this:
A user creates the room (Advertiser)
All other users (Browser) connect to the advertiser.
Once connected, you exchange messages passing through the advertiser.
The perfect package to do this is google connect nearby: https://pub.dev/packages/flutter_nearby_connections
But it only works between android-android and ios-ios, it is not cross platform.
Now I have also thought of a solution that used the package with bluetooth, but I don't think it is possible to make ONLY the Advertiser user show himself to the others, avoiding that during the search everyone is seen and not knowing who to connect to.
If anyone has any advice for the realization of such a cross platform structure, (avoiding databases) it would be of great help!
Thank you!

Well you don’t really get many choices if you’re not all connected to the same network. If you are, use pub.dev/packages/bonsoir for discovery and HttpServer and HttpClient in dart:io for communication.
If you’re not connected to the same network, you will need to use BT LE. No other way to do this (that I know of, I’m sure someone much smarter than me knows a way :P)

Related

Which server setup would be easiest to send a photo/text from an iOS app (swift) to a place where I can download/access them?

I'm using swift — and the app needs to send a photo and matching text (that a user submits) to a server so that I can download the photo/text.
Would an existing FTP server that I have setup for my website be possible for this application? Or would it make more sense to do something with a web portal?
During my research, I'm finding options like Backendless, Alamofire, Gold Racoon, and various others. They seem like overkill for the simple task I'm looking to accomplish. Is there some minimal service out there that can automate my simple need? If not, which of these options would you recommend for my situation?
Ideally the setup would be free, but I'd be willing to spend up to $100 or $10/month if the service fits.
I'm new to app development so I'm feeling overwhelmed with the options and not sure how to begin researching. I hope beginner questions aren't frowned upon here — I would really appreciate any advise on what I should begin learning to achieve my goal of sending a photo+text from an iOS app to a place where I can access them.
If there are other questions I should be asking to achieve this, please let me know.
For your case there are two main routes to consider
1. BYOS (Bring Your Own Server)
With this option, you are responsible for creating and maintenance of your own server.
Now you can use various services such as Digital Ocean and Amazon for this.
On top of this, you would be responsible for creating your own database and maintaining it as well. Plus, you would need to write server side code along with client side code (the app) in order to instantiate communication between the two.
The advantage of this is that you virtually have control of everything but I think it is pretty clear how painful this task is.
2: BAS (Backend As a Service) Highly recommended
With this route, you simply have to write the app and let another service handle the server side of things. One of the most common ones is Firebase. Most folks including startups go down this route.
There are a bunch of other services out there.
Two Cents:
Whatever option or service you decide to use, I would recommend you make sure that:
a. The service has a good track record.
You do not want something that might end up getting shutdown in the next couple months. I know it is hard to predict this but certain initial guesses/probabilities can be made.
b. Make sure its community is vibrant.
The last thing you as a newbie wants is to be stuck and have no one to help you. Research around and see the different questions people ask and whether or not answers exist.

Real time web page

I want to build simple web based app, where users, for example, could push the spacebar button, and then do something further, like answer a question, and while other users at the same time only sees that this question is not available any more for answer. When user submits answer, everyone see it.
All right, here is an example. I have seen TV shows, where four players have one button, if one or two of them know answer, they hit a button, and one lamp turns on and the first is allowed to answer, while other keeps their mouths shut. I want to build the same idea, but in the web.
But problem is that, I don't know where to start, what keywords I should search for help on google and so on. I see, that it might work on HTML5, maybe JavaScript and so on.
I have idea using Ajax, but request it every second to get latest actions made seems rubbish. Also I found one service called Pusher, but it has limited users in one time, which doesn't fit my needs.
I need just ideas. Thanks.
Before you read the rest, a disclaimer: I work for Realtime.co but I do believe I can help here so I'm not trying to "pitch a sale".
You can check out Realtime (www.realtime.co). It's basically a set of tools for developers to use real time technologies on their projects. It uses websockets but does fallback to whatever the user's browser supports (such as long polling, for example).
Behind Realtime you have a one-to-one/one-to-many/many-to-many messaging system that will transport your messages to and from your users.
There's also a plus which is the fact that the Realtime framework is actually cross-platform. This means that you can even have your web users communicate with iPhone users, Android, users, Windows Phone, desktop applications, server applications, etc..
You can learn about the JavaScript API here: http://docs.xrtml.org/getting_started/hello_message.html#javascript.
You only need to register at Realtime.co as a developer and start using the free license.
I really hope that helps.
Okey, I think I will go with node.js.
Writing all this previous post, made me think in right way :)

How can I isolate caller audio with sip or voip?

I have a scenario that i'd like to implement, and don't know where to begin.
I'd like to have 3 participants on a phone call: A, B and C.
A and C should be able to talk to and hear each other.
B should be able to hear A, but not C. B doesn't need to speak to anyone
Is there a way that I can implement this with SIP servers, freeswitch, asterisk or online services such as twilio/tropo?
Is there a name for such a scenario in telephony where you isolate the voices of one or more callers?
Thanks
It is known as call barge and is used in monitoring call center agents.
You can do it using the asterisk ChanSpy command:
http://www.voip-info.org/wiki/view/Asterisk+cmd+ChanSpy
in FreeSWITCH, eavesdropping works for the whole conversation. But as it's an open-source tool, you can probably modify sources for your needs.
You can develop a conferencing application using Call Control XML (CCXML). When you bring a caller on the conference you use the "join" element. When you "join" the caller you can specify in the "duplex" tag whether it is full or half. If it is half then the caller can only hear what is going on and cannot speak.
A great platform for trying this out for free is Voxeo's Prophecy. They have an excellent implementation of CCXML (their CTO is the Editor in Chief for this W3C standard) and you can try this hosted platform for free. You only pay when you put it into production. It supports SIP, Skype, and regular telephone lines. You can even use their Phono plugin to create a phone in a web browser that users could use to join the conference. They also have an on-premise solution that is easy to install on a laptop or server and they give you two ports for free. Additional ports are reasonably priced. There are a lot of examples on developing CCXML conferencing applications in their documentation.
try ivrworx,
you can firstly create freeswitch conference.
Thean make scripts which will call the conference but C will send SDP with rcvonly attribute

Phone App + Online Database?

Idea: Create an database that I can integrate with an iPhone app.
As I have never worked very in-depth with online databases, I need advice on what methods are best for creating a database. The database would need to contain a list of usernames and passwords to login.
P.S. - I have my own website server.
The easiest thing would be to just use MySQL probably. Then you would define web services that expose basic access to the entities in the database. Best to do those with REST. That might be more than you are up for.
The problem with lesser solutions is that you can't have users just connecting directly to a db from the mobile app. So you have to have something talking to the db.
The other option would be to try to implement the whole thing using Game Center, since that has support for players and scores, etc. Not sure if that would be sufficient. I have looked at it but not in a lot of depth and there are changes coming in iOS 5.
In my opinion there is no need to bother with the iPhone app, just make a mobile version of the website. At the end of the day, you'll have to write the website infrastructure anyway, and with a website there is no need to worry about distribution. You'll even be able to support those using other devices.
If you are still looking for ideas, I learned a lot of what I know of web-based databases from a book called Head First PHP & MySQL (ISBN 978-0-596-00630-3). I already knew SQL and C++ (C++ is similar in many ways to PHP), but you really don't need it with book. It will teach you the very basics of both languages and how to tie them together. It will also give you a good frame of reference to Google solutions or ask informed questions.

Developing client app for proprietary server

I was thinking about developing an app that enables the user to remotely check the progress of a longrunning task. The server application running the task is an existing commercial tool and comes with a proprietary client to connect to the server to manage it. However, the client is available only for windows computers and not for mobile devices, hence my desire to fill the gap.
The communication between client and server is neither encrypted nor password protected in any way.
What would be the best way to analyze or reverse engineer such a proprietary protocol?
Are there any legal implications (I know this is not the place to ask legal stuff, but if you happen to know how to reverse engineer stuff you maybe know whether it is legal or not, too)?
I'm a fan of http://www.wireshark.org/ for protocol analysis. Free, powerful, extensible, cross-platform.
As regards legal stuff: It depends on jurisdiction - and each country's courts seem to enjoy not coming up with consistent precedents. The general rule is reverse-engineering is okay for 'interoperability'. You'd really have to ask a lawyer for more info, though.
Personally if something is running on my machine and I want it to behave in a different way, I have no ethical issues forcing it to. That's just me, though.
I can fully imagine a virus writer ringing me up and making some kind of legal threats that I breached his EULA...