Identify web push notification device from endpoint url - browser

Is there a way to identify the browser based on web-push-notification endpoint url?
I would like to add a list of endpoints to the user settings page, so he could see what devices are connected and remove the ones that he does not need, but all I have is the endpoint (and auth data) in format like this one:
https://fcm.googleapis.com/fcm/send/fIoxgVbEb3Q:APA91bHN_ryToq_Oe6QQa-pO__uKoLjv2LJSI_8YxvqSN2j8UUHUxH8wTnOOHJdBq252baM3bkIXqRBp529GctrxLqF_A_K9R-5pnIL0jFw6f4p7yQq_Lp2AbNyPRyidU3JHwdmuI11p
I would like to convert it to something like:
Chrome on Samsung Galaxy 8
Firefox on Windows 7
Internet Explorer on IPhone 6
Is there any way I could do it, or do I need to collect this data in advance?
I know I can get the browser form domain, but is there any list that contains all of the possibilities?

I think there's no way to do this without collecting information in advance.
The domain will be the same for the same browser on different platforms.

Related

Share via FBSDKShareDialog ignores applink defined on target page

This has been driving me nuts all day:
I have an iOS app with a custom URL scheme defined, and am trying to share a link on FB which points to a page that has this scheme in its applink meta tags, so that tapping it should fire up my app.
Every little piece of it is working just fine. I can enter my URL scheme in safari on the phone and the browser launches my app. I have tested my webpage with the FB debug tool and there are no errors or warnings - it correctly identifies all the meta tags.
If I share the link using FB on the phone or on my laptop, all works fine.
HOWEVER, if I share the exact same link using FBSDKShareDialog, it does not work. It just opens the web page with the meta tags as if it was any regular web page.
Anyone has any idea why these two ways of sharing would be different? They look exactly the same otherwise.
If anyone else runs into this problem, here's the reply from FB:
When you share with mode automatic, the app does a fast app switch over to the FB app to show the native share dialog
The post is cached locally on the device, and it does not know about app links (since only Facebook server side knows about it)
When the user opens the FB, the user sees their cached story (with no app links behavior),
This doesn't manifest with the Web mode since the Facebook app needs
to pull from the server to get the post, in which case it has all the
app links info.
This is unlikely something that we'll fix. However, after a while, the
cache will expire, and Facebook app will re-pull the posts from the
servers, in which case the app link data will be available.
In order to test this, you can share the post on one device, and then
try clicking on the post from another device. The app links should
work at that point.
Which is kind of a lame response IMO - they parse the target page to build the preview, how hard would it be to remember the applink and use it?
There could be two possible issues:
Either the one told by #NJ, i.e. you are just trying to open the link in Facebook app, using the same device from which you posted the link.'
Solution - either open link in other device or cose and re-open your facebook app and do multiple refresh
Or You have some error in your meta tags. There is one important thing though, that Facebook never mentions, i.e. they cache the URL you provide.
So any one used the web link with meta tags the first time in Facebook, Whole meta tags will be cached, and you updated meta tags won't be parsed by facebook.
Solution
To get over with the issue, use below link
Facebook debug tool
Input your meta data included web page URL and
-click on show existing scrape information to find any error
Click on Fetch new scrape information for refreshing your URL on facebook. it will clear the cache for that URL in facebook server.

Display web sites and web apps with Chromecast

Can Chromecast be used to display a web site or web app? All the sample sender/receivers I've seen so far show how to play videos. The docs posted so far are minimal as best, just an API reference with little explanation what any of it does. I just want to send a URL of my choosing and have that page displayed on the TV. There's no user interaction required past that point. Assuming that's possible, does anyone have sample Chrome sender and receiver code for that?
I was able to modify the Github sample Project > googlecast/CastHelloText-chrome
to show a web page.
In the receiver.html file, I replaced the DIV with an IFRAME and styled it for 100% width and height.
Then in the displayText() function I changed innerHTML to src.
The only modification made to the sender chromehellotext.html was to replace YOUR_APPLICATION_ID with the app id created by registering the receiver.
Note that some sites like Google and Yahoo will not display inside an iframe. If you really needed to do that you could skip the iframe and just set window.location.href to the URL. That, of course, will overwrite your receiver code so the only way to change URLs would be to manually disconnect first and reload. I tried using window.open instead but that did not work.
One could imagine writing a Custom Receiver that has an iframe that wraps any website. Your sender would could then send webpages to your receiver, and the onLoad would set the the URL of the iframe. Don't have any code, but it's fairly simple to write.
There is a simple way to do that with the hellotext sample. You can send the html by typing that into the text field.
<iframe src="http://mywebpage.com" style="width:1280px;height:720px"></iframe>
To provide extra info from the current answer, as this post comes up near top on most searches.
Thing to search for is Digital Signage, this is the sort of industry word.
following GreenScreen Chromecast works okay. Greenscreen
host solution is Sign Simple - which looks to be same approach as Greenscreen without you needing to host the receiver web page.
Similar hosted solutions using Raspberry Pi can be found.
Of note: with GreenScreen and the CastHelloText, I could not get 1080p only 720p, some comments mention Video only in 1080p, but Images in 720p, which I take to mean html pages aswell.
Chromecast can indeed be used to display an arbitrary URL.
This can be done from plain old Chrome, using 'url-cast-receiver'. (Usable 'demo' page, GitHub project page.)

Cisco call manager api to conference a device

I'm trying to implement some click to dial functionality as follows:
A user finds a number on a webpage (say employee extension)
Clicking that extension will dial a phone number that I've picked
Upon answering that call, I am immediately "conferenced" into
calling the number I actualy wanted to dial.
I've done something very similar using a Twilio API but want to use our corporate Cisco Call Manager capabilities instead of paying per minute for this functionality.
The WebDialerSOAP doesn't seem to be able to give me this functionality. I think doing a conference would work but can't find anything to do that. Possibly an open source call manager wrapper?
why not a FreeSWITCH server alongside the CUCM? It can set up conferences, and it's one of themost programmable products with as much control over API as you want.
It has also an RTMP module, so you can actually run a Flash-based softphone out of your browser
Use TAPI3 or JTAPI
Connect the code using TSP, and Application user
use CreateCall function to the number from HTML page with implementing the trigger.
use CreateCall to the other phone.
use Finish(FINISH_MODE.FM_ASCONFERENCE) to complete conference.

foursquare and share checkin?

Is it possible to create a checkin by allowing a user to click on button in a html page that takes them to a share location (checkin page)?
I am thinking- something like the twitter share url?
for example-
http://foursquare.com/share/?venue_id=12345
I want this functionality in order to allow users to swipe their nfc phone on a smart tag and it loads a html page with different options
On an Android-based or iOS-based mobile device, you can use special formed URLs in order to start the Foursquare application viewing the desired venue: https://developer.foursquare.com/resources/client
The URL https://m.foursquare.com/venue/#venue_id# (e.g. https://m.foursquare.com/venue/4b477346f964a520723226e3) can either be opened by the installed Android Foursquare App or opened by a normal browser (or other Intent receivers registered for that URL).
You can further use the URL https://foursquare.com/mobile/checkin?vid=#venue_id# to get to the mobile page, where you can just press "check in" or enter a shout. By checking-in via the mobile page (and not the app), you do not get points and are not able to earn Mayorships (see Foursquare support).
But you can, for example, create your own web app that accesses the Foursquare API and performs the check-in for the OAuth'ed users. By using the HTML5 Geolocation feature, you can also send the mobile device's Lat/Lon coordinates to your web app and perform valid check-ins that also count for Mayorships, etc. A good start is Foursquare's developer page: https://developer.foursquare.com/overview/

Accessing Gmail, Calendar and Contacts using Exchange ActiveSync

This maybe very noob and unworthy of stackoverflow.com, but nonetheless here goes:
I'm trying to write a custom application that syncs my Google data (emails, calendar and contacts) to the desktop (I know that there are several tools that let you do that, but curiosity only killed the cat!!).
I know that m.google.com is the sync sever I need to use. I've gone through [MS-ASHTTP].pdf, and got all the protocol information down.
Now, using either the cURL command-line or a tool (in Windows) such as Fiddler (http://www.fiddler2.com/), I'm unable to make valid ActiveSync requests to m.google.com. Moreover the URI /Microsoft-Server-ActiveSync doesn't exist on m.google.com, and searching Google turned up nothing for me. Need help!!!
Connecting to Google using ActiveSync should work (I have an Android app - Corporate Addressbook that does that successfully)
Use the following URL
https://m.google.com/Microsoft-Server-ActiveSync?User=xyz#gmail.com&DeviceId=1234512345&DeviceType=Android&Cmd=xxxxx
Edit the email address and the command you are sending. Also you will need to send the auth string in the header
I have a blog post that should help.

Resources