<p>This is rendered in the mobile device.</p>
<p>This is rendered in the web browser.</p>
I use “meteor run android-device” and I can access it at localhost:3000 in a web browser as normal, and it shows me Web - This is rendered in the web browser", but on my Android device, it shows exactly the same ie: “Web - This is rendered in the web browser” instead of “Cordova - This is rendered in the mobile device”
What am I doing wrong?
My Android device is a Samsung Phablet SM-T705Y (tablet phone)
Could it be registering as having a larger screen than a phone? Its a 7" phablet, not an iPhone etc.
It gives the same “Web - This is rendered in the web browser” when running on my Samsung Galaxy Tab SM-T530
It is best to have all templates, and JS files for templates (helpers etc…) within a folder called ‘client’ so that you don’t need the conditional code to check if its the client.
Also means the server won’t have that code packaged and skipped over constantly.
Thanks for that tip Chris. This was just a proof of concept not a working app - just to get a feel for it all, but yes you’re right.
How’s Sydney? Have you ever been to a Meteor Meetup there?