DEV Community

Jan Dvorak
Jan Dvorak

Posted on

4

Meteor.js blast from the past: mobile package examples

A quick blast from the past! In the early days of Meteor, three packages specifically for mobile development (understand Cordova) were released. Two of those mdg:camera and mdg:geolocation had also quick examples attached to them which I have updated and released this year (added to the Meteor example list recently).

There really isn't much to these examples (just straight ahead to show the function of the package), but like with most things in Meteor the great thing is that even though these packages are targeted for mobile is also fully usable in the browser. Due to how Meteor (and these packages are build) they detect if they run in browser (in which case they use the web API) or Cordova/Mobile (in which case they use Cordova API and packages). So with the same code you can have the same functionality in browser and on mobile.

Simple photo

First for the camera package, as the name suggest it requests permission to the camera and then takes a photo and displays it on the page.

Simple location

Again, focus on geolocation. Requests access to your location services and displays the received coordinates and shows them on a map. Originally the example used Google Maps, but the services to display Google map have since been hidden behind paywall, so I went with Open Street Map via free version from GeoApify. But if you look into the source code of the example you will find the code for Google Maps ready for you.

I wanted to highlight these two packages as they didn't receive much attention for few years (just refreshed them earlier this year - just needed some Cordova updates) and if you are doing anything with photo or need to get user's location they are a super easy to add and use in your Meteor application.

Do you use or have you used these packages? Any other older packages that you would like to see me cover?


If you like my work, please support me on GitHub Sponsors ❤️.

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

Sentry mobile image

Improving mobile performance, from slow screens to app start time

Based on our experience working with thousands of mobile developer teams, we developed a mobile monitoring maturity curve.

Read more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay