Building an Ionic 4 Firebase Location Tracker with Capacitor & Google Maps

  Рет қаралды 27,133

Simon Grimm

Simon Grimm

Күн бұрын

In this tutorial we build an Ionic 4 app with Capacitor instead of Cordova plus Firebase for showing a track on Google Maps! Learn to build mobile apps with Ionic in my Ionic Academy: ionicacademy.com/
The training platform for everything Ionic. 40+ Ionic Courses, Ionic tutorials and private community to help you learn Ionic fast.
#############################
Want to read instead of watch? Here's the full Ionic tutorial: devdactic.com/...
Want more tutorials? Here you go! devdactic.com/
Just getting started? Take my 7 Day Ionic Crash Course: ionicacademy.c...
#############################
You can also find me...
on / simongrimm_
on / schlimmson
on / devdactic
#############################

Пікірлер: 96
@GautamMer
@GautamMer 5 жыл бұрын
Firebase is my favourite topic and your tutorials are best 🔥🔥
@hobbyturystaSEO
@hobbyturystaSEO 4 жыл бұрын
nice.tutorial() => { sound: perfect, VideoQ: hd, teacher: positive; style: stylish };
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Thanks! 😃
@anroswell
@anroswell 5 жыл бұрын
Thank you Simmon, what about Background geolocation in capacitor???
@akagichan2453
@akagichan2453 4 жыл бұрын
I really enjoy this video, eventhough i got some trouble in the beginning... Thank Simon (y)
@doronsayar1587
@doronsayar1587 4 жыл бұрын
Hi Simon, thanks for the tutorial! If you run npm install @types/google-maps --save then all google types and structures are recognized and you don't need to declare google!
@vikassaxena16
@vikassaxena16 4 жыл бұрын
Thanks to educate me...is it works in background??
@galaxies_dev
@galaxies_dev 4 жыл бұрын
I'm not sure at this point if anything works well in the background :D
@calvincooke6529
@calvincooke6529 4 жыл бұрын
Simon, there will be a statue of you built somewhere some day. Your videos are simply the best.
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Haha I just pictured it, that would be epic :D
@katherinneira6518
@katherinneira6518 5 жыл бұрын
I have already create the login and register page with guards but i don't understand how to do this with an authenticated user
@vampirejs758
@vampirejs758 3 жыл бұрын
Why do we use capacitor geolocation api instead of simple navigator.geolocation to get current coords?
@dujonpratt987
@dujonpratt987 3 жыл бұрын
You should do this using the Wordpress API
@MrGugared
@MrGugared 4 жыл бұрын
Great Simon! Your videos are amazing
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Glad you like them!
@Kamleshkumar2010
@Kamleshkumar2010 5 жыл бұрын
Thank you. you are my sunshine.
@ryananto7015
@ryananto7015 3 жыл бұрын
Simon, good night, I request plugin mock location to detect fake gps on capacitor...
@jonathanperry7530
@jonathanperry7530 5 жыл бұрын
Excellent video, Simon!
@wardeha1
@wardeha1 4 жыл бұрын
Great tutorial as usual. Ccan we run the GeoLocation in the background?
@galaxies_dev
@galaxies_dev 4 жыл бұрын
I don't think so. Perhaps with an additional background service plugin, but I guess not like it is now!
@sangitajaiswal9205
@sangitajaiswal9205 4 жыл бұрын
Excellent video Simon. Thanks. You are awesome.Can you make a video on Google maps directions in ionic 4
@galaxies_dev
@galaxies_dev 4 жыл бұрын
We actually have a course on the topic of using the directions API inside the Ionic Academy :)
@AbhishekKumar-mq1tt
@AbhishekKumar-mq1tt 5 жыл бұрын
Thank u for this awesome video
@egaldamez2
@egaldamez2 5 жыл бұрын
GREAT VIDEO SIMON, i have a couple of questions for you Why the user = null; ? i usually use to declare stuff any; is this wrong? Does this work in the background? if i run it on my device i open the app hit start tracking and then go to use other app it is going to work? Thanks in advance!!
@galaxies_dev
@galaxies_dev 5 жыл бұрын
I think it might work but the OS might kill your app at any time, so you would need a plugin to prevent your app from being killed!
@note380
@note380 4 жыл бұрын
Hi, this is very informative, thank you. Is it possible to run capacitor geolocation in the background ?
@galaxies_dev
@galaxies_dev 4 жыл бұрын
I'm not sure, you could check out the community plugins for location if one helps about this particular issue: capacitor.ionicframework.com/docs/community/plugins#location
@medotarek121
@medotarek121 5 жыл бұрын
what's difference between using the modal as a entryComponent and exports the Module to the app Module ? and when i need to use entryComponent ?
@itsPAN1K
@itsPAN1K 3 жыл бұрын
is it possible to get current coordinates with clicking on map? the classic mapClick method doesn't return lat, lng console says undefined and if I console.log($event) it returns c
@eddiesonvergara5995
@eddiesonvergara5995 4 жыл бұрын
if you move to your current location the marker will move realtime?
@Trookboss7396
@Trookboss7396 4 жыл бұрын
Fantanstiv video. Thanx .Can you please make a video on google maps directions in ionic 4. Thanx
@inesgomes7805
@inesgomes7805 5 жыл бұрын
Thanks Simon! Anything with capacitor and WebRTC?
@FirmanMaulanaAditya
@FirmanMaulanaAditya 3 жыл бұрын
is it possible to use this for tracking in background process?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
No I think the app won't work correctly in the background, you can try a different background geolocation plugin but in general it's not really safe for a long time.
@dnnsnnz
@dnnsnnz 4 жыл бұрын
thanks for the tutorial :) . But i have some questions. That geolocation's plugin is only for capacitor o can i use it with cordova too?. Can i integrate the capacitor's plugin to a cordova's project?.
@galaxies_dev
@galaxies_dev 4 жыл бұрын
You can include Cordova plugins in Capacitor, but not vice versa. But there are also Cordova plugins to track the geolocation!
@havalsadun1383
@havalsadun1383 5 жыл бұрын
Thank you for tutorial Simon May I ask you @viewchild asks for 2 args I make the other states false But still I can't reach the map that is in html
@galaxies_dev
@galaxies_dev 5 жыл бұрын
You mean you add {static: false} for the second argument? Then it should work I think..
@sandeshtayde1372
@sandeshtayde1372 3 жыл бұрын
Hi Simon , great video . Can you please let me know , if we can change the styling and themes of these google maps from our Ionic app css files based on our interests, for eg . intead of the pin location icon ,if I want a different one , is it possible in Ionic ??
@galaxies_dev
@galaxies_dev 3 жыл бұрын
It doesn't depend on Ionic, it's more about the maps SDK but from what I know, you can pass options and even CSS classes to object of the map!
@jawwadarif8718
@jawwadarif8718 4 жыл бұрын
how can i see all devices on one screen where are they
@prasadnarayana
@prasadnarayana 3 жыл бұрын
where can I find the code for above tutorial please help
@galaxies_dev
@galaxies_dev 3 жыл бұрын
It's linked below the video.
@stephaniekassinopoulou3219
@stephaniekassinopoulou3219 3 жыл бұрын
Great tutorial! really gives a good picture of how to use firebase and geolocation together with user permissions! I was just wondering if the Geolocation functionality could have been used inside a service in order to reuse it into other components too.
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Yes sure, putting that logic into a service is definitely a good idea and always possible!
@gabrielsebastianlopezillia8743
@gabrielsebastianlopezillia8743 3 жыл бұрын
Hi Simon, as always this is an amazing video, thanks for it :). Have you done something like this but with some kind of background-geolocation? I need to develop an app for security personal tracking that must run and report constantly on background and that its making my job really hard. If you have some advice I'd be really grateful.
@galaxies_dev
@galaxies_dev 3 жыл бұрын
There are background plugins, but everything that targets iOS is really challenging, for Android it's a bit easier. There are even specific background geolocation plugins, but afaik you can't do heavy operations in the background or your app get's suspended!
@ninjatwentyfive
@ninjatwentyfive 4 жыл бұрын
how does that loadmap() works mine is not giving the coordinates and map options? help asap!
@galaxies_dev
@galaxies_dev 4 жыл бұрын
You can see all the code in here as well: devdactic.com/ionic-firebase-location-capacitor/
@dannyshf1993
@dannyshf1993 5 жыл бұрын
thanks for the tutorial! Can you show us how to upload image to firebase using ionic4?
@galaxies_dev
@galaxies_dev 5 жыл бұрын
There's already a course on that topic inside the Ionic Academy :)
@gabrieldiaz6184
@gabrieldiaz6184 4 жыл бұрын
"cannot find name 'observable'." :c
@tntg5
@tntg5 3 жыл бұрын
Hi Simmon! Thank you for your tutorials. Have you covered firebase auth with Capacitor? I can't get it to work on iOS
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Well general email/pw auth is the same, only if you need some native functionality it might be different.. But most of this is handled by the AngularFire package if you use it!
@tntg5
@tntg5 3 жыл бұрын
@@galaxies_dev thank you Simon for your response. In fact, Fireauth doesn't work on ios as smoothly as it does on android. When you perfom a signin with email/password, the authstate does not fire events on ios. But the sdk does get the token. So the solution I found was to trigger events manually on ios
@wheview_official1091
@wheview_official1091 4 жыл бұрын
I can't see Google map... I can see an error like below ERROR TypeError: Cannot read property 'nativeElement' of undefined
@stephaniekassinopoulou3219
@stephaniekassinopoulou3219 3 жыл бұрын
did you use the viewChild operator for the map element ?
@roslansyafiqa
@roslansyafiqa 5 жыл бұрын
Haii simon. How many api key should be used to deploy in android device? Should be specific credential to android api key? Help me.
@galaxies_dev
@galaxies_dev 5 жыл бұрын
What you mean by how many? You just need one API key for google maps!
@roslansyafiqa
@roslansyafiqa 5 жыл бұрын
@@galaxies_dev because i read another website, they used 2 api keys for browser. If Using one key, map will show "for development purpose only". So the location is not accurate. Btw, i try deploy in native device using 1 api key. The map still blank.
@coachrobtribiana6024
@coachrobtribiana6024 4 жыл бұрын
Hi thanks for this. Just want to know what did you use for recording/streaming?
@galaxies_dev
@galaxies_dev 4 жыл бұрын
I use Screenflow to record my screen and myself!
@coachrobtribiana6024
@coachrobtribiana6024 4 жыл бұрын
@@galaxies_dev Thanks man. Big help!
@manuelsanpedro4586
@manuelsanpedro4586 5 жыл бұрын
Hi can you assist me? The code works fine but when i tried to run on an android device in runs the app but does not send the phones location? is there any answer in this issue?
@galaxies_dev
@galaxies_dev 5 жыл бұрын
Perhaps you might have to apply changes to your manifest in order to get the permission from the user?
@JuanDeSouza7
@JuanDeSouza7 4 жыл бұрын
You should do a version of this using the new Ionic React
@victorgalvez1486
@victorgalvez1486 3 жыл бұрын
Yeah
@1984mnemonic
@1984mnemonic 5 жыл бұрын
This works on web. But when you upload to ionicframework.com and you try to build a package, even with the first commit, fails on the package build. Any fixes?
@galaxies_dev
@galaxies_dev 5 жыл бұрын
I think they have not yet added Capacitor support to their build system yet.
@yourdailydoseofcode
@yourdailydoseofcode 5 жыл бұрын
Can I use cordova and capacitor in one project?
@galaxies_dev
@galaxies_dev 5 жыл бұрын
In general yes, but you have to install Cordova plugins through Capacitor and only the npm package, not the plugin itself!
@joumigi4857
@joumigi4857 4 жыл бұрын
Can we use native google-maps on Capacitor?
@galaxies_dev
@galaxies_dev 4 жыл бұрын
I don't think that there's a package for that :/
@thakkarsagar
@thakkarsagar 5 жыл бұрын
please share git repository!!!
@luiszamoraveliz2862
@luiszamoraveliz2862 4 жыл бұрын
this.afauth.auth is not working line 21 in home.ts :( HELP!!!!
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Since AF 6 it's now only this.afaauth, the additional "auth" can be removed!
@eddiesonvergara5995
@eddiesonvergara5995 4 жыл бұрын
install angularfire2
@eddiesonvergara5995
@eddiesonvergara5995 4 жыл бұрын
simon did you already know why is the lat lng are storing in the database double and multiple times
@Flipkurama
@Flipkurama 4 жыл бұрын
Tnks Simmon! Does this cost?
@galaxies_dev
@galaxies_dev 4 жыл бұрын
You mean from the Google API side? I'm not 100% sure about their pricing, the beginning should definitely be free or covered by their credits (I think).
@Flipkurama
@Flipkurama 4 жыл бұрын
@@galaxies_dev Yes, I mean from them. I'm thinking about using this. I'll try use their credits, tnks.
@liberstudio562
@liberstudio562 5 жыл бұрын
btw, i like it!
@tawfik1546
@tawfik1546 4 жыл бұрын
i dont know why but it's saving duplicates on the database
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Do you perhaps trigger the write multiple times for whatever reason?
@aishahmalek9363
@aishahmalek9363 5 жыл бұрын
Roadmap property is undefined
@aishahmalek9363
@aishahmalek9363 5 жыл бұрын
Where did i go wrong
@shanKirs10
@shanKirs10 5 жыл бұрын
This may or may not be useful If the keyword "ionic 4" does not appear in the title it does not come up in the search results. :-)
@galaxies_dev
@galaxies_dev 5 жыл бұрын
Yeah I'll cover more Capacitor topics in the future!
@shanKirs10
@shanKirs10 5 жыл бұрын
@@galaxies_dev Yay !! You are the Best !!
@neura3964
@neura3964 5 жыл бұрын
dear simon, are you a bear? cause you are gordious. But this tuto don work for me, many errors refused to load the font. edited: it was the version of angular fire. put the latest and it work
@galaxies_dev
@galaxies_dev 5 жыл бұрын
Haha no I am still human! Glad it works for you now :)
@liberstudio562
@liberstudio562 5 жыл бұрын
Great video, but can you be more serious when you make video? Whithout "aaaaa........", " i dont know why this happen"... or something like this?
React Native vs Flutter - Which should you use?
22:31
Simon Grimm
Рет қаралды 31 М.
How to Localise Your Ionic 4 App with ngx-translate
18:14
Simon Grimm
Рет қаралды 23 М.
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Паша Осадчий
Рет қаралды 7 МЛН
Je peux le faire
00:13
Daniil le Russe
Рет қаралды 22 МЛН
So Cute 🥰
00:17
dednahype
Рет қаралды 57 МЛН
How to Create Background Tasks in Ionic with Capacitor ⚡️
37:11
Getting Started with Ionic 4 and Socket.io
23:22
Simon Grimm
Рет қаралды 18 М.
5 React Native Tips to WOW Your Users
16:36
Simon Grimm
Рет қаралды 24 М.
The Ionic 4 Images Guide (Capture, Store & Upload with POST)
32:18
Learn .NET MAUI - Full Course for Beginners | Build cross-platform apps in C#
4:08:53
Adding AdMob to Your Ionic App with Capacitor
19:29
Simon Grimm
Рет қаралды 12 М.
How to Build Your Own Capacitor Plugin for Ionic
26:59
Simon Grimm
Рет қаралды 21 М.
10 Simple Ionic Hacks
25:41
Simon Grimm
Рет қаралды 32 М.
Google Apps Script: Creating Managing, and Automating Projects with Script
1:54:55
Power Apps Tutorial
2:42:26
Learnit Training
Рет қаралды 340 М.
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Паша Осадчий
Рет қаралды 7 МЛН