DEV Community

Jan Dvorak
Jan Dvorak

Posted on

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 ❤️.

Top comments (0)