I'm working on an app that has a mobile component and a web component. The web component is going to be used by a certain group of people, while the mobile app is used by everyday people. When the script is run from the mobile device I want the web app to update using ajax. Kind of like Facebook mobile, if you post a comment on mobile to your friend, and that friend is on their laptop, they will still get the notification in real time. How is that possible. The script works, but the users on the web app won't see it unless they refresh.
I suggest setting up a NodeJS server, and have active users connect to that. You can then push notifications to that server, which in turn sends it out to the clients. It won't matter if the client is on desktop, mobile web or even in a native app. SocketIO greatly simplifies this for web-based applications. See http://socket.io/. It also has fallbacks in case the users browser does not support web-sockets.
There are of course other options, but for web this is the easiest in my opinion.
Related
I'm working on a project which is a mobile application developed with Ionic. The project is split into two parts: a mobile front-end and a back-end. The back-end is performing all the calls to external services and applying business rules, while the front-end only calls my back-end.
One of the services I'm using is a IAM service using Oauth2 protocol. I've implemented the authorization code flow to integrate this service. Until now, I was always using the command ionic serve to run my front-end in a web browser, and everything is going well.
But now, for testing purposes, I need to run my front-end in an android emulator. In order for my front-end to contact my back-end, I'm using the IP 10.0.2.2 (which is the alias of the loopback of my machine where my back-end is running).
The problem is with the redirect of the authentication service. It is not something that I have control on, and it can take weeks or months for the service provider to update my client configuration. When I want to authenticate myself through the app running on emulator, it opens a InAppBrowser to perform the authentication. When I successfully authenticated myself against the service, the redirect URI is http://127.0.0.1:8080/xxxx, and this response is sent to that InAppBrowser.
My question is:
Is there a way to replace the base URL of that response (without changing the client configuration), so that I can send the call response to my back-end ?
NOTE: I've been trying to find a solution online, but I can't find anything on that topic. I suspect that in that matter, I probably lack some vocabulary in order to find what I'm looking for.
Is there a way to
The following idea is in our heads and we did not find out how to realize it.
We have a responsive web application that is based on a domino server using xpages. The service authenticates using SAML against our adfs 2.0 service.
We want to use native mobile apps to improve the mobile web app it two disciplines:
1. use notifications to alert users about tasks and events
2. Store the password in a secure way on the device so it won't be asked every time you use the app.
The web app stays on that domino server and is used as is.
I thought this should be possible using only bluemix services.
But how?
We do not want to develop native apps by ourselves so apache Cordova came in our minds. That or a similar solution should enable us to provide native mobile apps with in app stored passwords (or tokens or even touchID logon) and mobile notifications.
Which is the best bluemix practice?
Bernd,
you have a rather large set of technology moving parts here :-). Let me pick them into pieces:
Domino: you need something outside of Bluemix for storing the NSF, like a Softlayer Domino server. That will be key to the solution.
mobile app: Cordova is right, but look one step further and have a look at Ionic. It uses Cordova under the hood. You can add it to your app as is, or use IBM Mobile first foundation
Push notifications: there's a service for it in Bluemix
Authentication: there's a service for it
What I would do:
on the Domino server holding the NSFs deploy a OSGi plugin you write extending Domino Access Services that reads/writes the data you are interested in JSON. Use the OpenNTF Domino Api (ODA) to make your life easier
configure the server to only talk to Bluemix. I would use VPN technology for that - Bluemix has a service for that
Now the fun part: configure Domino to accept the WAS headers for user identity. Securing Domino in the step before is ESSENTIAL since hitting it direct would now allow to spoof identity. This is why ONLY your Bluemix VPN shall hit it
Now build your app layer in Bluemix using Liberty or Node.js (I would use Node.js since passport, a Node module, has the most authentication options) that handles auth using the Bluemix services and sets the header when talking to Domino
Make sure you use a web worker in your mobile app to take the network out of the user experience
That's roughly it. Hope it helps
How can one find out which or what an app is using as a back-end server?
Assume you are making an app and you are using Parse.com as your back-end server. You made an app and go published it to the appstore. Later, what are the odds for some one else to find out what did you use as a back-end server? Can she/he find out that you used Parse.com ?
What are the odds for an iOS app and Android playmarket app ?
Simply see what networks calls are being made by the app. No need to decompile or anything like that. Simply log network calls on your home network. Your Wifi router might do this or you could setup a proxy server that logs all requests.
I'm very new to facebook development. I'm trying to link a user to liking my facebook page and then detecting the successful like. I've seen a lot of web code for this, but what would be the best approach to do this from a mobile app? Hopefully something I can easily port between all mobile app platforms.
Thanks
Only the Javascript SDK lets you subscribe to a Like event directly in the app.
There's two methods you could use:
Use the Realtime Updates API to subscribe to the user.likes object, which will fire a callback at your server when the 'likes' changes.
You can then check this periodically in your app.
The obvious con is that you need to have a server backend component to your app.
Continually request the user.likes object through the Graph API in your app.
This isn't particularly great either because you have to keep making requests to Facebooks servers, which usually take up to 2 seconds to reply.
You might easily end up hitting the daily request limit if you have a lot of users all continually making requests.
--
Now - you say you're writing mobile apps for all platforms; if by chance you're doing this as mobile web (i.e. Phonegap or similar) then you're in luck, you can do this through a Phonegap plugin.
What is the easiest way to implement a simple app which does two things:
receive push notifications (new messages in user's inbox),
open a page on my website in a webview or web browser.
It would be best if the solution was portable among iOS, Android and possibly other mobile systems like Windows Phone and BlackBerry 10, but I'm happy with separate solutions, if it's the only way to do it.
I suggest that, checking out Parse apis for this task.
There are solutions like http://xtify.com/ or http://urbanairship.com/products/push-notifications/ that provide an all in one package across platforms but I don't know the quality of service or which one would be right for you, some research on your part will be necessary if you choose this path.
Or you could implement it yourself but it will require your own server. The server would notify both Androids C2DM And Apple Push Service at the same time. You will have to implement the client side on each.
For iPhone here's a good tutorial for setting it up http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12
For Android http://www.vogella.com/articles/AndroidCloudToDeviceMessaging/article.html
You register your app with both services then sends the push keys to your server. With the keys the server can then notify both platforms respective push services to send a notification .
I can't really help with the server setup stuff as its not my area of expertise but this is how we implement push notifications for the apps my company makes.
I'd recommend a Phonegap (Cordova) app and UrbanAirship for the notifications. You can get a free account with that. It's relatively easy to implement too.
As for the browser, I'm not sure exactly what you want it for. Could you elaborate and I'll post a response.