[Important] Android permissions is updated and for API 29 or higher, "ACCESS_BACKGROUND_LOCATION" permission is required as well along with FINE and COARSE location permissions.
@adityasinghrajawat73444 жыл бұрын
Very Good!!! But just a suggestion for you......You should speak while making tutorials.
@Nags3435 ай бұрын
Thanks a lot it worked
@rahul08yadav4 жыл бұрын
Thank You Sir. You code so clean please continue making such video and try to add audio explanation if possible. You really helped me.
@AmanKumar-ec6bz2 жыл бұрын
thanks bro save my time
@sachinmurkuteshorts3 жыл бұрын
06:19 to 06:21 there is a problem in the code line numbers maybe you imported something but the video does not show that
@WolfSkinFull4 жыл бұрын
Огромная человеческая благодарность!
@pushanpaul13053 жыл бұрын
So far the most helpful location update video
@bodieernest65463 жыл бұрын
I know im randomly asking but does someone know a way to log back into an Instagram account? I was dumb forgot the login password. I would appreciate any help you can offer me.
@dravenomar40323 жыл бұрын
@Bodie Ernest Instablaster :)
@bodieernest65463 жыл бұрын
@Draven Omar i really appreciate your reply. I found the site thru google and Im in the hacking process now. Takes quite some time so I will reply here later with my results.
@bodieernest65463 жыл бұрын
@Draven Omar it worked and I finally got access to my account again. I am so happy! Thank you so much, you saved my account :D
@dravenomar40323 жыл бұрын
@Bodie Ernest glad I could help :D
@akshayrajput15863 жыл бұрын
how this app is getting location in the background when we allow it "only while using the app" location permission also, I have noticed that it's not getting location in background after few seconds
@noormohammad88593 жыл бұрын
nice work.. very workfull
@didieralejo2 жыл бұрын
Great job! Thanks for your explanation, it was very helpful.
@hexafgamer3 жыл бұрын
its perfect bro thank you so much.
@HardikPatel-zp3hc4 жыл бұрын
I have created tracking app which runs perfectly in android 7 in background but not running in 8+ Any solution?
@txt.girl.official3 жыл бұрын
Excellent...
@nickolajarjous26393 жыл бұрын
great tutorial
@bhagyshrikadam70884 жыл бұрын
thank you sir
@jigin1003 жыл бұрын
Thanks for the turorial. It helps me a lot on my project.
@officefineoutput3794 жыл бұрын
Useful Tutorial
@muhammadabdullah31813 жыл бұрын
Good job Man 😊
@m-coders4 жыл бұрын
Thanks sir Its very helpful to me
@jithendrasai4 жыл бұрын
nice tutorial, bro
@MrZiko19754 жыл бұрын
Good job! But it's not fully completed, we have to get result in activity/fragment/custom view. What channels do you use for that? EventBus or something more modern?
@chiragkachhadiya4 жыл бұрын
You can use intent service or local broadcast manager as well.
@danny_phantomwalker84183 жыл бұрын
I have a question - Instead of getting Lat n Long in Log.d, can u show me how to display it on the app screen in Textview? I can't seem to get it done correctly. Other than that, great tutorial, Just wish you would explain, atleast as notepad writings or something. Thanks for the video!
@ziedorabi75343 жыл бұрын
I'm stuck at this as well , any progress ?
@kadirbozkurt24123 жыл бұрын
@@ziedorabi7534 did you solve? if you did please tell me how
@jaa704 жыл бұрын
Sir, thank you very much !!!, one question: if I restart the phone, the app will start too? if not, how can I get that ?
@amenmoipushi88214 жыл бұрын
Set a broadcast receiver to know when the phone has been rebooted then if it has, start the location service.
@thangphamduc40853 жыл бұрын
Thanks a lot. It's very good.
@creativearts4917 Жыл бұрын
how do we pass this data to main activity means the one from which the location service call ran
@praveshbudhathoki7364 жыл бұрын
I got error in (Constants.LOCATION_SERVICE_ID), location-service-id is not recognized. help plzz
@ajayvamsee75083 жыл бұрын
Well superb but why not you provide project repo
@shreyanshjain9544 жыл бұрын
sir after using this code the accuracy of location is not fine...this code uses which feature .. GPS provider or Network Provider??...I think gps will have more accuracy
@rakeshpavanmudidana Жыл бұрын
Sir location share is working in version 13 in background also but that app is not working in any other version like lower then Android 13 version please give me a solution for this sir,🥺
@samseleven14 жыл бұрын
This works great. Thank you so much
@reyzanata80934 жыл бұрын
hi how if i want to add marker on Latlng and pass the data in to the components thanks
@DevKumar-ey6fh3 жыл бұрын
You got solution? Because I'm facing same problem.
@musicwell39404 жыл бұрын
Can u please make a tutorial on Google fit Integration
@HarpreetSingh-cl1sp Жыл бұрын
How i pass the location double value co-ordinate to other activity and set it to text view. PLEASE REPLY
@sandyhuang83223 жыл бұрын
oh man , you save my day and my life , appreciated , thank you ! do you have tutorial about Google Fit?
@TheAftermath3 жыл бұрын
Sorry sir, are Fused Location Provider APIs free to use? Aren't they from Google Play Services? So Are Google Play Services APIs free to use?
@Shivam-kz2dg2 жыл бұрын
Free
@surenrajp62284 жыл бұрын
What android studio you are using bro... it was awesome??
@chiragkachhadiya4 жыл бұрын
It's a theme plugin called material UI.
@AbdulSamad-yu1zn3 жыл бұрын
Hii Dear all how are you? I hope you all will be fine. I am facing null lat/long issue as i am using fusedlocationproviderclient... If mobile GpS button is enabled then i get location.. if i disable or reEnable it then i get null location.. if if i close or open app again and again Is there any other service or anything instead of this which works fine??
@sandeepkumar-yp6sl2 жыл бұрын
This code is not working on above API level 28.... please help me sir
@obadaqafisheh91854 жыл бұрын
can't get location updates after kill the app!!!
@kamilpuchaa51384 жыл бұрын
This may not work correctly when the app work in background. Simply not showing new updates, on the newest Android...
@marceloaguilarsanchez9414 Жыл бұрын
yeah, that's the problem, the code works, but in lower versions of 7, that's a problem that I found in my androrid 11, it doesn't work in foreground :c
@ahmadelmasri97022 жыл бұрын
Thanks a lot man !
@barriosraphael43 жыл бұрын
Great tutorial!!!! does it work in background?
@syedasadalizaidi554 жыл бұрын
Yo bro you saved my life and job lmao
@jayantdhingra48634 жыл бұрын
Thanku for this tutorial. Also plzz make video on google fit
@musicwell39404 жыл бұрын
Yes Sir
@zeeshanalimannur57042 жыл бұрын
I'm getting a delay=8000 ms and i don't know what to do I've searched online but couldn't get any help please help me out
@shantanudixit3063 жыл бұрын
the code is not working in android 11v when app is running in background mode
@pgaurav724 жыл бұрын
Thank you Sir! The code helped me a lot.
@suryaagungputra2984 жыл бұрын
can u tell me what theme u install for ur android stud please ?
@chiragkachhadiya4 жыл бұрын
It's a plugin for android studio called Material Theme UI.
@vsp42 жыл бұрын
Thanks
@Kshashir11 ай бұрын
Hi...Anyone can help to get the someone mobile location through link or by hidden link?
@apurvadiwe7237 Жыл бұрын
Working fine with Android 8,9 But how to get background location above android 10?
@apurvadiwe7237 Жыл бұрын
It works fine till 1-2 min after that it stops getting the location.
@syedaamna6086 Жыл бұрын
@@apurvadiwe7237 When I open other applications like facebook or watsapp, it stops giving location updates....
@thanhnguyenminh57234 жыл бұрын
verry nice
@kovgergox3 жыл бұрын
Service stops after app is not in focus in my case :(
@HungVu-dm6xc3 жыл бұрын
how long does the service take to stop in your case? I also encountered the same case. Do you know the cause and how to fix it?
@syedaamna6086 Жыл бұрын
Did u manage to resolve this issue>?
@Blazejek5737 Жыл бұрын
@Joannes252 жыл бұрын
excelente!!!!!
@Mardiyansahok4 жыл бұрын
Thank you Sir...but how to add iduser login on the location service?
@zandronarvaza68914 жыл бұрын
Is it possible to jampack a volley method on the service class ?
@chiragkachhadiya4 жыл бұрын
Yes.
@zandronarvaza68914 жыл бұрын
@@chiragkachhadiya It crashes the app when I put volley inside. Can you give me a hand please :(
@Shafi101114 жыл бұрын
how would i call those latitude longitude values in another activity? any help would be appreciated
@anaslakhani4 жыл бұрын
use broadcast reciever
@DevKumar-ey6fh3 жыл бұрын
@@anaslakhani hey can you help me how to set text for the value of lat and longt and keep updating it as the value be updated.
@teacup26333 жыл бұрын
Thanks, can you make tutorial to get Country \ City name?
@chchandrasekhar5575 Жыл бұрын
I'm not getting locations when the app is killed
@numanbhati71154 жыл бұрын
Sir please make a video on tablayout with only single fragment
@chiragkachhadiya4 жыл бұрын
But if you want only single fragment or screen then what is the meaning of tab layout since tab layout is used when you want to display multiple screens in single activity or something similar to that.
@numanbhati71154 жыл бұрын
@@chiragkachhadiya sir you are right make Tablayout logic video
@numanbhati71154 жыл бұрын
@@chiragkachhadiya please sir please sir
@chiragkachhadiya4 жыл бұрын
Here it is: kzbin.info/www/bejne/l5u5h52rhLifjJY
@numanbhati71154 жыл бұрын
Thank you for your reply sir this video is very helpful for me
@kuteslekkeropzeg2 жыл бұрын
Is it possible to download the code ?
@JUANFELIPENIGANEZALIAGA3 жыл бұрын
thanks but how can i add it to a textview please
@hoannguyen93814 жыл бұрын
how to up location continuously to firebase bro????
@warkadang3174 жыл бұрын
sir i have issue how to show that lat and long in activity updated
@DevKumar-ey6fh3 жыл бұрын
Have you got, because I'm facing same problem.
@kadirbozkurt24123 жыл бұрын
How do we send result to MainActivity? Please someone help.
@kushagraahire18712 жыл бұрын
Using intent
@syedaamna6086 Жыл бұрын
broadcast receiver
@Mechas11234 жыл бұрын
Nice code !!!!
@subhadipbera14563 жыл бұрын
SIR it doesn't work perfectly, plz help me...
@ectechzone47694 жыл бұрын
not working above api24 . kindly update what to do
@Shivam-kz2dg2 жыл бұрын
Include access coarse location , access background location
@maadmayya25504 жыл бұрын
Can you make a lap with aws ?
@safatelli41523 жыл бұрын
how can we make it working in background please ?
@Erwinsmith940403 жыл бұрын
I appreciate your code but its too complicated for begineers
@my_love_sanatan3 жыл бұрын
not working android 10
@ДимаЛузько-с9о3 жыл бұрын
Не хочет показывать координаты
@viralgohil66164 жыл бұрын
Thankyou sir But not working not getting latlog
@dimasoktanugraha95734 жыл бұрын
great tutorial sir. i've code your tutorial in kotlin, but when i click button stop location update, in my Log still get location update. is there any wrong?
@reyzareyznata27604 жыл бұрын
Same as me bro
@chchandrasekhar5575 Жыл бұрын
and background also
@chirujc4 жыл бұрын
location updates are stopped, when the app is killed from background
@khalilsnoussi85594 жыл бұрын
you can't get location updates when the application stops, that's very normal
@chirujc4 жыл бұрын
@@khalilsnoussi8559 I completely agree with you. But my requirement is getting location updates, even if the app is killed or background
@khalilsnoussi85594 жыл бұрын
@@chirujc i understood you, i had similar idea on my current project but in my case i needed notifications to show up even if the application wasnt working in the background and was very disappointed, actually notifications can't popup unless the actual application is working in the background you can test it with facebook or youtube apps.
@chirujc4 жыл бұрын
@@khalilsnoussi8559 but I believe, there is a way. Working on that, I will update you, once I have working example.
@chirujc4 жыл бұрын
@@khalilsnoussi8559 you can get location notifications, even if the app is killed from background . Here are the code changes to get it work instead of calling LocationServices.getFusedLocationProviderClient(this).requestLocationUpdates(locationRequest,locationCallback, Looper.getMainLooper()); startForeground(Constant.LOCATION_SERVICE_ID,builder.build()); use LocationServices.getFusedLocationProviderClient(this).requestLocationUpdates(mLocationRequest, getPendingIntent()); and private PendingIntent getPendingIntent() { Intent intent = new Intent(this, LocationUpdatesIntentService.class); intent.setAction(LocationUpdatesIntentService.ACTION_PROCESS_UPDATES); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); return PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); } In service class @Override protected void onHandleIntent(Intent intent) { if (intent != null) { final String action = intent.getAction(); if (ACTION_PROCESS_UPDATES.equals(action)) { LocationResult result = LocationResult.extractResult(intent); if (result != null && result.getLocations()!=null) { double latitude = result.getLastLocation().getLatitude(); double longitude =result.getLastLocation().getLongitude(); Log.d(TAG,"LOCATION UPDATE: "+latitude+" "+ longitude); // sending data to popup notification, in my case, created static method sendNotification() in Utils class Utils.sendNotification(this, ""+Utils.getLocationLatitude(this)+", "+Utils.getLocationLongitude(this) + ": " + DateFormat.getDateTimeInstance().format(new Date())); } } } } In Utils class, add the following method static void sendNotification(Context context, String notificationDetails) { // Create an explicit content Intent that starts the main Activity. Intent notificationIntent = new Intent(context, MainActivity.class); notificationIntent.putExtra("from_notification", true); // Construct a task stack. TaskStackBuilder stackBuilder = TaskStackBuilder.create(context); // Add the main Activity to the task stack as the parent. stackBuilder.addParentStack(MainActivity.class); // Push the content Intent onto the stack. stackBuilder.addNextIntent(notificationIntent); // Get a PendingIntent containing the entire back stack. PendingIntent notificationPendingIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT); // Get a notification builder that's compatible with platform versions >= 4 NotificationCompat.Builder builder = new NotificationCompat.Builder(context); // Define the notification settings. builder.setSmallIcon(R.mipmap.ic_launcher) // In a real app, you may want to use a library like Volley // to decode the Bitmap. .setLargeIcon(BitmapFactory.decodeResource(context.getResources(), R.mipmap.ic_launcher)) .setColor(Color.RED) .setContentTitle("Location update") .setContentText(notificationDetails) .setContentIntent(notificationPendingIntent); // Dismiss notification once the user touches it. builder.setAutoCancel(true); // Get an instance of the Notification manager NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); // Android O requires a Notification Channel. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { CharSequence name = context.getString(R.string.app_name); // Create the channel for the notification NotificationChannel mChannel = new NotificationChannel(CHANNEL_ID, name, NotificationManager.IMPORTANCE_HIGH); // Set the Notification Channel for the Notification Manager. mNotificationManager.createNotificationChannel(mChannel); // Channel ID builder.setChannelId(CHANNEL_ID); } // Issue the notification mNotificationManager.notify(0, builder.build()); }
@surenrajp62284 жыл бұрын
bro source code ??
@junaciz24093 жыл бұрын
give me aplication,please
@navinhariharan60973 жыл бұрын
Hey! Could I get the source code?
@SKREFI3 жыл бұрын
Source code please?
@ayushikannojia94953 жыл бұрын
Hey sir thank u for this video... Plz tell me how to save this latítude and longitude on database using postgreaql
@levihuibers54633 жыл бұрын
Fucking legend
@НикитаРерих4 жыл бұрын
Well, nice, but in 2020 Kotlin is the better choice....
@luishectormonterosantos12154 жыл бұрын
Error Android Q+
@VINAYSHARMA23232 жыл бұрын
Source code
@hackaman97523 жыл бұрын
i need the code bruhhhhhhhhh
@ssanjay37935 ай бұрын
source code
@ankeshpandey36304 жыл бұрын
Check instagram, DM you
@alberto35142 жыл бұрын
if (service.foreground) //Always False NotificationCompat.Builder //Dont show notifications Background, dont work