How can i do a push notification service with a webservice on Ionic? - json

Ok, i need some help…
I’m finishing an app but i need some kind of service who looks in my backend and when my JSON changes (this JSON contain some valors who changes if the user get notifications) send to that user a pushmessage to the terminal even the app is off. Something like an ajax call every ‘x’ seconds but doing it in mobile.
I’ve past a few days searching but i’m completly lost and i need some kind of tutorial, example or something.
I’ve searched in the forum but i doesn’t find anything.
Thanks anyway

you can achieve what you want using Events that will be triggered when something changes in your backend (if you're using a modern framework like Laravel you can do it easily)
Inside the event it will see that a change is made and then send a push notification to that device with whatever service you used (acm, pusher,...etc)

Related

How can I create a program or bookmarklet that can scrape facebook-chat messages for spam links?

There is a Facebook app which has enabled the depricated facebook-chat feature where users can chat whilst playing their game. Unfortunately there has been a dirge of spammers and scammers posting in this chatroom, which we would wish to automatically detect and send emails or some other alerts to us so that we can more immediately block/ban these users.
Is this possible somehow? What we've tried was to create a python scraping application but it wasn't immediately obvious how to log into facebook and get HTML of an app through a python call.
I've since been introduced to bookmarklets as a concept. Perhaps this could solve the issue? There could be some type of javascript code in a bookmarklet, and all one would need to do is load up the game, open the facebook-chat, and then click the bookmarklet, and leave the computer running 24-7. The javascript would parse the DOM for suspected scam links and send email reminders when found.
This is just me brainstorming possible ideas. I'm really not sure how to approach this automation problem, and I am not finding anything useful online either.

Tail like logging window for my web app?

I am developing an app using Phalcon and would like to create a popup logging window that displays any logging type information when I am logged in (such as DB calls and exceptions).
Alot of my app is driven by Ajax calls. Is it going to be possible to have a window that I can popup on my main app that uses a tail like method of displaying this information?
How would I go about this? I'm not entirely sure that what I want is possible with the Ajax calls as they are done in a different request. I can't find anything on the internet as to how I would go about this so any help would be great.
Well, you didn't said that explicitly, but I imagine that you want this just for development purposes. If so, you can log useful info to a method that checks if it should send that log to the browser based on some criteria (e.g. logged in user is you, the app is in a dev enviroment, etc) and then use Phalcon's FirePHP log adapter to send to log the information to the browser.
You'll just need to have some FirePHP extension in your Firefox or Chrome to be able to see the information under your JavaScript console. And yes, it works well with Ajax calls too.
Let me know if you need further explanations on this...
I think you are looking for a debug toolkit.. There are lot of toolkit available on packagist.org and phalconist.com. I personally like this phalcon-debug-widget toolkit that you may try.

Prefill webpage from Lotus Notes client application

Looking to prefill a webpage (a form in a wordpress site) from a lotus notes application. My investigations to date show that using the query strings behind the urlname should work - however I am missing something here.
www.url.com/register?fname="bob"&sname="smith" etc...
I thought this could be done, but am not sure where the starting point would be?
Ideal solution - webservice from the owner of url.com to allow us to populate and get a response once done. They are not keen to do this as it does not save them any time, just our business.
I am looking to understand how to prepopulate the webpage so that the user just has to submit the form at url.com.
You could go mega-sneaky and use the Selenium WebDriver to launch a browser session on your client. It has full control over the browser and can sniff out the fields you need to populate. I wrote some simple code for starters - but the samples on the original web site might be more comprehensive.

Calling a Google Drive SDK from Google App Script application

i have been going around in circles here and have totally confused myself. I need some help.
I am (trying to) writing an application for a client that in concept is simple. he want a google write document with a button. the google drive account has several folders, each shared with several people. when he drops a new file in one of the folders, he wants to be able to open this write file, this file is the template for his email. he clicks the button, the system calls the changes service in the Google Drive SDK https://developers.google.com/drive/manage-changes, gets the list of files that have been added since the last time it was checked, then pull the list of people that the file has been shared with, and use the write file as a template to send that list of people an email saying their file is ready.
SO, easy enough, right?
I started by looking at the built in functions in the Google App Script API. I found this method, https://developers.google.com/apps-script/class_docslist#find in the DocsList class. problem is the description for the query simply says "the query string". So at first i tried the Drive SDK query parameters, which are
var files = DocsList.find("modifiedDate > 2012-12-20T12:00:00-08:00.");
it didn't work. that leads me to believe it is a simple full text search on the content. Thats not good enough.
That lead me into trying to call a Drive SDK method from within an App Script application. Great, we need an OLap 2 authentication. easy enough. found the objects in the script reference and hit my wall.
Client ID and Client Secret.
you see, when i create what this really is, a service account, the olap control in apps script doesn't know how to handle the encrypted json and pass it back and forth. Then when i tried to create and use an installed applications key, i get authentication errors because the controls again, don't know what to do with the workflow. and finally, when i try to create a web app key, i can't because i don't have the site host name or redirect URI. And i can't use the application key ability because since im working with files OLap 2 is required.
i used the anonymous olap for a while, but hit the limit of anonymous calls per day in the effort of trying to figure out the code a bit, thats not going to work because the guy is going to be pushing this button constantly thru the day.
i have been pounding my head on the desk over this for 5 hours now. i need some help here, can anyone give me a direction to go?
PS, yes, i know i can use the database controls and load the entire list of files into memory and compare it to the list of files in the database. problem being, we are talking tens of thousands of files. bad idea.
I wouldn't use DocsList anymore - DriveApp is supposed to be a more reliable replacement. Some of the commands have changed, so instead of find, use searchFiles. This should work more effectively (they even use a query like yours as an example).

How to Initiate a Vonage call using a Hyperlink

I'm just finishing a web page for our sales guy to quickly go through a list of contacts.
Is it possible to initiate a call from our Vonage line via a Hyperlink?
They offer an application called "Click-2-Call" but I hope it's possible to initiate it using only a Hyperlink.
This would probably require an addon to support a custom protocol that allows your Vonage system to function in this way.
I imagine that something like
Call 123-456-7890
Where the "phone" protocol would be recognized as a phone number that could be called by some default voip program. Then, setting Vonage to handle that protocol would allow this to work.
But, I don't believe that this is currently the case.
Yeah, this is speculation but I know skype has a browser plugin that looks at each web page and find the phone numbers and makes them clickable. It probably just sends some info to the skype client on the machine to make the call.
I haven't seen click-2-call before.
This would be interesting to implement in an app with a PBX system as well :)
Please let us know if you find some good info!
Maybe you could use a packet sniffer like Ethereal to see what gets sent where when you use click-2-call. It'd be pretty cool to create an outlook extension to dial my Vonage line, I don't like click-2-call very much.