Guides on how to make a m.domain website (adaptive) - mobile

I have been trying to find guides on how to make an adaptive (I think that's what it's called) website like m.domain.com. However, all I can find on google are design blogs showing the pros and cons of responsive vs adaptive.
I'm guessing you have to use JavaScript to detect the device or browser of the client, and redirect to a mobile site.
I'f any of you guys know the piece of code i will need to detect and redirect (if that's what you have to do) or a guide to building a mobile site like this, it would be much appreciated!
Thanks in advance!

I found the answer myself.
Using:
<script>
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)){
if(document.URL !="http://emilostervig.dk")
{
window.location ="http://google.dk";
}
}
</script>
You can redirect to a different site if the user in on a mobile device.

Related

What is the best option to create share button? (react)

I saw a lot of option in order to create share interaction with users:
Web share API: https://www.w3.org/TR/web-share/#sharedata-dictionary
It seems compatible with Progressive-Web-App, but it's not well supported by firefox (https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share#browser_compatibility)
Simple Sharer: https://reactjsexample.com/a-javascript-framework-to-share-url-to-social-media-sites-like-facebook-twitter-reddit-whastapp/
If I understood well, it doesn't work for mobile, am I right?
react-share: https://reactjsexample.com/social-media-share-buttons-and-share-counts-for-react/
Seems to work on every browser, but I don't know if it's PWA-friendly. Seems to be the best option, but I'm not sure... The last update was 1 year ago (https://www.npmjs.com/package/react-share) so maybe it will not be maintained through times...
What do you use for your app? What do you recommand?
Do you know better alternatives?
My need for the App is to share URL through social media or mail/text or ??? etc. No file in theory. And I'd like to have adapted preview on social media when the user share something.
I have used react-share personally and it was unable to open some of the apps in mobile like whatsapp, etc.
The workaround is deep-links.
if user is using a smartphone or a tablet (we can easily get this using navigator.userAgent) then you can use the app based deep-links otherwise the traditional way in which you can redirect user to a new web page.
Some of the examples:
Whatsapp: https://faq.whatsapp.com/563219570998715/?locale=en_US
Instagram: Answer is already given here
NOTE: deep-link works if the user has installed the application on desktop as well (never tried for macOS but for windows and ubuntu it works)
After edit:
You can use emailto: in href while writing <a .../>.
example:
Share this link
For more reference about mailto please visit this MDN doc: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href

Migrate link from mobile web browser to mobile app

I want that my online website link that is opened in my mobile browser checks whether my mobile app is installed or not and then opens it in my mobile app.
I want my functionality as I have shown in this
image
I am using AngularJS,Express,NodeJS in my application.I tried node deeplink
but it does not work for me.Please provide me with the appropriate solution.
This functionality is known as Mobile Deep Linking. The easiest way to get started is with a deep linking service like Branch.io (full disclosure: I'm on the Branch team), Yozio, or Firebase Dynamic Links. They all do exactly what you're describing.
this could Help you perhaps:
Check this

Is this possible to get inpage analytics in Piwik

Recently, I have started to use Piwik. My question, is this possible to get inpage analytic of my website page? I mean, how do I know how users interact with your web pages?
Yes. Please check page overlay feature: http://piwik.org/docs/page-overlay/

Sharing text with twitter

I am using sharekit SDK for twitter and facebook sharing. It seemed to be working fine, so we delivered the product. Now, we found a problem like There was a problem to accessing Twitter while the Facebook sharing works fine.
I have searched and found this link
and
Twitter Integration issue using sharekit in ios?
I set the callback to my app's website. Now I am redirecting to the website after login to the twitter through app. I don't know how to pass an oauth_callback value to oauth/request_token.
Does anyone know how to solve this issue?
https://github.com/ShareKit/ShareKit/pull/692/files Try this link.I hope it will help you

Wordpress mobile integration?

I have an existing website that works with my custom theme. Unfortunately, it does not appear too well when I access it from my smart phone.
Can someone suggest a good plugin that will help with the user experience from a smart phone?
http://www.bravenewcode.com/store/plugins/wptouch-pro/
Let me know if you like it...

Resources