Our requirement is to send an email to user which will be having our site link. Since site can be opened in mobile as well, when user clicks the link from the email it should be redirected to mobile application site if the device is mobile or else desktop site.
Currently we are Using C# to send email. Since Javascript is not supported in HTML body of email, We are looking for some other approach. Can anyone please suggest, how to detect the device and redirect to the link from email appropriately.
Thanks.
You don't need anything in the email - Instead use media queries in your website to adjust the result to the screen size. You can either have a responsive site, or use javascript on your main site to reroute them to the mobile version of your website if needed.
There is no real way to do this in email. Technically you could put media queries in your email to show or hide one link or another, but media queries are not 100% supported in email, so you are better off using them on your website.
Related
At my company we have an internet-facing SharePoint 2010 site. We will be creating a subsite that will serve as a mobile site (different design, smaller subset of information). When a user hits our homepage from a mobile device, I would like them to be redirected to a page where they can select a link to either view the mobile site, or the full desktop site.
Correct me if I'm wrong, but I believe standard SharePoint mobile detection needs to be enabled for this. I think I can redirect the mobile users to my "choice" page pretty easily with an HttpModule, so that they don't hit the default SP mobile page. But the problem I'm having is that if they choose to go to the full desktop site, if I try to redirect them there in the module, they're just going back to the default SP mobile page.
My question is, is it possible to achieve this in SharePoint? It seems to me that the default mobile detection would be difficult to override the way I want it to happen. Do mobile users only have access to the mobile subsite in this scenario? If anyone needs more information from me, just let me know, I'll provide whatever I can.
(Also, I know it would be better to do a responsive layout, but that decision is out of my hands)
We created an "ismobile" cookie for the session after the redirect. This allows us to ignore the redirect if the user has this cookie. In means that they have already been redirected once this session so don't do it again if they hit the desktop page.
We started using this so that the "Show full website" link didn't just bounce the user back to the mobile page
I want to make an email signature with some links of my social networks, and when a iOS user has the app installed (e.g. Facebook) it should open there and not in a Browser.
For example:
If iOS & App installed: "fb://profile/user", else: "http://facebook.com/user"
Is this possible?
Thank you!
For this to work, you would need conditional content in your email and the email client of your user would need to understand it. ... which does not exist.
However, instead of the links to your social networks, place a link to your own site (e.g. http://yourVeryOwnDomain.com/social). At this page you can display the individual links to your social networks, and - because now you can detect the kind of accessing browser - you can adjust the links to your needs ...
When my app posts an image on the wall on Facebook, there is also a link posted that leads to the facebook app.
If the post is seen on a desktop, I want the link to redirect them to the flash based facebook app.
If the post is seen on IOS, I want them instead to see the download link of the same app on the App Store.
Is that possible? Any suggestions?
Trying to change the Facebook link that would either redirect to one page or the other isn't a good practice (and that even wouldn't be possible). Just let the user click on the same link wherever he is using Facebook.
So, once the user on your web page, just catch the user agent which will give you information about his browser and device or computer. Depending on this, you'll know whether he is on a desktop or mobile phone. You'll then be able to redirect the user with the appropriate URL redirection. I let you search on this side with some help:
How do I determine whether it's a mobile device with PHP?
Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the user-agent string combined with specific HTTP headers to detect the mobile environment.
For example: what is your User Agent?
Detect Mobile Browsers | Open source mobile phone detection
"know if mobile browser" on Google
Wondering if anyone has actually managed to get the "share" functionality working in an email newsletter.
Currently being asked by a client to "share" a certain part of a newsletter directly to a persons wall.
However, the HTML will be generated by 1 program, and then a copy and paste into the email blaster to be sent.
Essentially, wondering can it be done? Are there any examples?
The like button plugin will work for a web page, not content in an email.
The share is being deprecated.
The send button plugin is used to share a URL (which is not content of an email).
I would suggest that the html of the email being blasted also be hosted on a web page. Then have that like (https://developers.facebook.com/docs/reference/plugins/like/) button's (that is being send via email) set it's href property to that of the hosted web page. That should work well.
Happy coding!
I'm trying to glue information from a web page to an iPhone app that said web page suggests to download. I control both the web page and the downloadable app.
Scenario is like this:
User visits my web page, on which I recognize the user (he may have logged in, and I store his info in a cookie). I then present a link to him to an app in the App Store that he should download for "enhanced experience" of this web service of mine.
Now, when the user launches the downloaded app on his iPhone, I like to re-identify the user who previously visited said web page.
All would be easy if an iPhone app could read Safari's cookies. But it can't.
A somewhat lame solution could be that the web server stores the visitor's IP address and uses that to recognize him once he launches the iPhone app. But that's not reliable.
Another one would be to give the user a token (code) that he needs to remember and then re-enter in the app. Still quite awkward, I think.
Any better suggestions?
Simply put, you can't do this.
One thing you could consider is a custom URL scheme to launch the app. You could send the user an email that uses this custom link. However there's a couple of problems with this:
the user may not have the account that they used to register for your site set up on their iPhone. This might seem unlikely, but say the user signed up for your site 5 years ago with their Hotmail account and they have since switched to Gmail.
it's unlikely that the email would fit into their workflow. They would probably download the app and just launch it by touching the icon instead of clicking a link in a received email.
You could also put the custom URL as a link on your web page, but again, this won't fit into the workflow because they have to go to the App Store app to do the download.
Consider this - if you've got some sort of website that has an authentication step, it's probably a fair bet to say that the user is the type of person who already has an application such as Facebook installed on their iPhone. They are already used to the paradigm of having to enter their credentials into an application despite the fact that they may have already done it in Safari.
If you could read the unique iPhone device ID from javascript on your web page, you could look for that again when the application connected...
But I cannot find any means of reading this from Javascript in Mobile Safari, I thought I'd post in case there is a way now to give you another option to consider.
OK, we found a somewhat working solution: The html code can create a cookie. Later, when the app runs, it can't directly read that cookie, of course (due to the sandboxing of iPhone apps). However, it can connect to the server, then open a http URL pointing to the server and including a unique token that it has gotten from the server beforehand. This leads to launching Safari, accessing the server. The server can now read the aforementioned cookie and finally establish the connection with the help of the token.
Just stumbled over this question and I'm curious if you thought about using a UIWebView.
Where the question is - does UIWebView share cookies with safari?
If it does the rest should be easy.
UIWebView's DON'T share cookies with Safari. So unfortunately that is not an option.