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
Related
First things first, I am writing this question after researching quite a bit.
Broader View of the issue
In this day and age, we require a more reliable way to perform peer-to-peer communication, preferably using technologies like NFC.
I mean we are in the year 2018 and I cannot believe that there isn't reliable means to communicate peer-peer between and ios and an android. I am talking about offline, close proximity/range communication, which can open up a new world of possibilities for mobile apps. Many of the apps we use to communicate with other devices require one or more of internet, login, credentials/authentication, etc. I am making this effort because most of the readers/users/developers do not actually know what has changed in 2018, so if anythings changed, I would love to hear it!
Hindrances
IOS has very weak NFC support, functionality-wise..?
IOS doesn't support Android Beam.
Not enough members are bothered to fix this or are helpless.
IOS doesn't support non-ios Bluetooth connection? (Doubt it/Tried but failed)
What I need
Efficient cross platform solution for communication between two different mobile devices preferably offline.
A way to send and receive money other than Apple Pay/GPay/Samsung Pay/iMessage/AndroidMessages, such as over NFC/Bluetooth preferably offline mutually, but connected to internet independently.
A way to automatically send data when two devices (different platforms and within ios) are in close proximity, without the need to login or register or any other steps. At least a way to trigger something upon nearing one device from the other, like NFC basically.
What I have
Working android application that uses android Beam to send and receive ndef messages, which is easy to do, between two android devices. So we can make the payment happen here in this case.
Questions arise when we try to proceed with android -> ios or vice versa.
I have read a lot of related questions where the answer is outright NO. However, am not taking time to write this question to be told it's not possible. I want the crowd here on stack overflow to help me find a way to workaround this situation. I know it is a lot to ask, but I feel this invention or discovery will help man app developers stuck in this same zone. This question should be answerable by someone who is ideally in the Fintech domain, and is an IOS developer or mobile developer, with working knowledge of card emulation, secure element, ios 11+ or ios 12 development, NFC, NFC tags, etc.
Questions/Ideas:
Can we use the secure element and NFC Tag with ios 12 or ios 11+ libraries to simulate this required functionality?
Does any third-party library get close to having the ios/iphone act like a NFC writer?
Can we simulate NFC writer for ios?
Can I simulate a tag on android device, have the iphone read it(do not want the apple pay popup somehow) and then follow through the next workflow via the internet? For example, if I had a sender and receiver (payments), since android supports a lot more than ios, can I simulate something on android so that either the apple pay thinks am a terminal of sorts and pays me electronically (securely of course), or at the least can I read apple pay credentials of sorts and simulate a terminal and accept a payment from ios on android?
Something on these lines, I know its not very clear, though I am trying to be clear and simple.
Suggested by others and why it is not a great solution:
WebRTC - Needs internet
alljoyn - Need only 2 device not 2+ and no need for server or client setup.
Relay Server not quite sure is offline or works
android-ios-peer-to-peer-architecture question talks a lot about it as well!
developing-mobile-p2p-payment-apps question, which seems to be relevant has NO answer.
why-android-ios11-cannot-communicate-via-nfc question talks about React Native. I for one have looked at PhoneGap and Nativescript which just have the same level of support for ios. In short, it won't work.
Any I left out, in short no solution.
Comments:
//Due to the fact that there is no solution, I feel even more motivated to post this question. I feel we should come together as one and fight for this right. I mean usually seemingly impossible questions are answered here, so I figured you guys could take this as a challenge. The challenge would be to find a legal loophole, an ethical approach, nothing unethical of sorts. So let me know if we can arrive at any positive conclusion! Thank you for being patient.
//I have read the rules and "do not ask" section, so I would just request moderators to check if there *can* be any answer before you flag it or take it down, by which I mean we just need one correct answer, and it can come from anyone or anywhere.
I am pleased to reveal that there has been demand for this and Google has released Nearby API as early as 2016. This is the way to move forward. This is a device independent API.
Please checkout Monzo Bank's Nearby Pay
Google and others claim it works with Ios as well.
It has been around since 2-3 years, which means there should be good support and documentation, though I might be wrong.
I hope this answer paves the way for others in my position! Good Luck!
I'm thinking of creating a chat app which is similar like firechat. which needs no internet for communication and depends only on BT or WIFI to communicate and also have an advantage of platform independent.
I've seen many sites referring some sites like open garden for firechat and alljoyn framework. I really don't understand what this things are for. Its really hard to find a solution for this.
I tried alljoyn initially, but the last update was about 3 years ago. the sample apps crashes in devices.
So any one who worked in this kinda project or or sharing some knowledge will be more helpful!
Thanks in advance!
The official website is outdated, use git repo (git clone https://git.allseenalliance.org/gerrit/core/alljoyn.git), a chat is one of the samples.
Also there is a well-known chat sample in AllJoyn Core, which discovers other peers and connect them. It works on Android App too.
Here you can download the AllJoyn Android Chat sample https://cgit.allseenalliance.org/core/alljoyn.git/tree/alljoyn_java/samples/android/chat
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 ?
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.
So I am developing a little game in which the users will try to answer the same question in real time. I thought the best way for the users communication is p2p. After 3 days searching, I found that there 3 possible solutions.
1. XMPP. Recommended by a lot people. Unfortunately not many people in China use GTalk.
2. Jxta. Seems dead and complex.
3. SIP. It requires the user to have a SIP account.
p2p seems to be really hard on cell phones.
My question:
Is p2p really the best solution to my problem?
If it is, what is the best way to achieve p2p connection on cell phones?
Many thanks!
If the only issue with XMPP is that your users don't use Google Talk you should set up a server and rely on in-band registration.
Look at these Q&A to learn what it is and how you can get it in android
An XMPP server is easy to setup, use OpenFire. I've done this before, you have to install a java virtual machine on a server and then install OpenFIre.
To create a client application, you can based your work on the ASMACK library which is very complete.
For me, it worked but my server cann't handle OpenFire. I just have a dedicated server with 512 RAM and 20 Go SSD to a VPN connection.