Trending December 2023 # Learn To Use The Google Play Store On An Android Device # Suggested January 2024 # Top 15 Popular

You are reading the article Learn To Use The Google Play Store On An Android Device updated in December 2023 on the website Tai-facebook.edu.vn. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested January 2024 Learn To Use The Google Play Store On An Android Device

The Google Play Store gives you access to millions of apps and games you can download for Android devices. It also offers movies, books, and music, though of course not all of them are available in every country. All you need to get started is a Google account — you won’t be able to browse or download content if you don’t have one. Once you have that ready, here’s how to use the Play Store on any Android device.

Although using the Play Store isn’t exactly rocket science, we want to explain a few basic things you should know. These include things like downloading content, adding a payment method, and redeeming a gift card.

Download apps and games

Once you find something you like, tap on it to bring up additional info. This includes a description, user ratings, screenshots, videos, and, of course, the Install button, or a buy button with a price in your currency if it costs something upfront. Tap on that and wait for the device to do its magic. When completed, you’ll get a notification that the content has been downloaded to your device and can be used — tap the notification or the Open button.

Step-by-step-instructions:

Search for content via the search box, categories, or home screen.

Tap on the game or app you like to bring up additional info.

Hit the Install/buy button to download content to your device.

Tap the Open button or the notification to access the downloaded content.

You can also get books and audiobooks

Of course, the Google Play Store isn’t only about finding apps and games. Google also has plenty of books and audiobooks. These can be found under the Books tab on the Google Play Store home screen.

The tap is further divided into categories such as Ebooks, Audiobooks, Comics, and Children’s books, all accessed through a carousel menu.

Step-by-step-instructions:

Search for content in the Books tab.

Tap on the content you like to bring up additional info.

Check out details and tap Ebook, Audiobook, or a similar button (often with a price attached) to purchase the content. You can use Free sample or Preview to get a taste first.

Keep in mind that as always, some of the items on the Play Store are free, while you’ll have to pay for others. You’ll need to add a payment method to your Google account to buy content from the Play Store, which we’ll look at in the next section.

How to manage your Google Play Store payment methods

Edgar Cervantes / Android Authority

To buy an app, game, or any other piece of content via the Play Store, you need to add a credit or debit card to your account, or else use PayPal or a Google Play Store gift card. The process is simple and only takes a minute or two.

How to add a payment method

The first step is to launch the Play Store app and tap on your profile icon in the top-right corner. Then select Payments & subscriptions, and tap on Payment methods. The last step is to follow on-screen instructions by entering the required details.

Step-by-step-instructions:

Launch the Google Play Store app and tap on your profile icon in the top-right corner.

Select Payments and subscriptions.

Tap on Payment methods and follow the on-screen instructions.

Enable authentication for purchases

Hit the profile icon in the top-right corner and tap on Settings.

Tap on Authentication.

Choose Require authentication for purchases and select your preference.

It’s also a good idea to enable the Biometric authentication toggle.

Launch the Play Store app and tap on your profile picture.

Tap on Payments and subscriptions.

Select Redeem code and type in the code found on your gift card.

How to update your apps and games using the Google Play Store

To ensure you get new features and bugfixes for the apps you already own, you have to update them.

Updating apps manually

Launch the Google Play Store app and tap on your profile icon. Select Manage apps and device option and tap on Updates available. Alternately you can choose Update all to update everything sight unseen, but you might want to be more selective if time and/or bandwidth is at a premium.

Step-by-step-instructions:

Launch the Play Store app tap your profile icon.

Tap on Manage apps and device.

Select Updates available.

Tap on Update next to each app, or else use Update all to speed up the process.

Updating apps automatically

The alternative is for your device to update apps and games automatically, which is usually done while charging. To enable this option, tap on your profile icon, then Settings, and select Network preferences. Hit Auto-update apps and pick your preference.

Step-by-step-instructions:

Tap on your profile icon and select Settings.

Tap on Network preferences.

Select Auto-update apps and pick your preference.

Launch the Play Store app and tap on your profile icon.

Select Manage apps and device.

Tap on Manage.

Check the app(s) you want to uninstall.

Tap the trashcan button to delete the selected apps.

There can be various reasons why the Google Play Store may not be working, such as a poor internet connection, an outdated Play Store app, caching or data issues, or even a problem with your Google account. See our guide for some possible fixes.

The Play Store app is typically pre-installed on Android devices. If your device doesn’t have it or you accidentally uninstalled it, you can download and install the app by visiting the Play Store website and downloading the APK file. Before downloading, enable the “Unknown sources” option in your device’s settings to allow installation from sources other than the Play Store.

We don’t recommend uninstalling the Play Store app as it’s an essential part of the Android ecosystem. However, you can disable it if you don’t want to use it. To disable the app, go to your device’s settings, select Apps and notifications, find and select the Google Play Store app, and tap Disable.

The Google Play Store is the primary app store for Android devices. There are others, such as the Amazon Appstore, but they serve niche purposes.

You're reading Learn To Use The Google Play Store On An Android Device

How To Take Screenshot On An Android Device?

How To Take Screenshot On An Android Device?

How to take a screenshot on Samsung phone or another Android device? If this question puzzles you, take a look at this article, we have listed here the best methods to screenshot Android phones.

How To Take Screenshot On An Android Device?

On an Android device, you can always take a picture of your phone’s screen anytime if you like anything. The image taken is known as screenshot. Once the screenshot is taken, You can view, edit and even share it from your phone using various sharing platforms such as WhatsApp, Email etc.

Ways To Screenshot Android Phone’s Screen

Open the web page, image or screen you want to capture.

Long press the Power button for a few seconds. A few options will pop-up on your screen, tap The screenshot is taken, and it is ready to share. It will look like this.

Method 2

Press and hold together the Power + Volume Down

Your phone will capture the screen. The screenshot will be auto-saved.

At the top of the screen, you’ll see the screenshot capture.

Method 3

Use gestures to take a screenshot on an Android device. In some of the devices it is swipe right to left on the screen, while in others it is three-fingers swipe down gesture to take screenshot of the screen.

Also Read: How To Screenshot Instagram Stories?

How to View, Edit, and Share The Screenshot Taken On Android Device

View the recent screenshot:

Swipe down from the top of the screen.

View all the screenshots:

Open your device’s Photos app or Gallery.

In the Menu/Albums/My Collections, look for the device folders, and tap

You can now see all your screenshots at a single place.

Edit Your Screenshot:

Share your screenshot:

Share the screenshot right from the Notification panel, or

Open the screenshot and share it from there, or

You can also share screenshot from Android’s Gallery app or Photos app.

Must Read: Methods To Take Screenshots on Windows10

How to Take Screenshot on Samsung Phones?

Note: We have tested these steps on Samsung Galaxy S10 Lite.

Method 1: Press Volume down and Power button together to capture a screen.

Method 2: Palm swipe gesture. To capture a screen, swipe your palm right to left or vice versa while slightly touching the screen.

Method 3:  Use Bixby to take a screenshot. Enable Bixby on the page you want to take a screenshot on Samsung. Say, take a screenshot. And it’s done.

Method 4: You can also take a long screenshot.

For this, take a screenshot on Android using any method, and in the menu that pops up tap the icon with down arrow enclosed in square bracket.

Continue till the webpage you wish to take a screenshot. The long screenshot will appear, and you can see it has stitched pages altogether. .

We’re Listening!

For more tech content, keep reading Tweak Library!

Quick Reaction:

About the author

Akshita Gupta

How To Set Up A New Google Account On Your Android Device

Whether you just got your first Android device or you just need a new way to contact people, you might be looking for a way to create a Google account. It might sound like a confusing process, but it’s pretty simple. Here’s how to set up a Google account without any hassle. You’ll find step-by-step instructions below.

Before we get started

Before you jump in, keep in mind that US citizens have to be at least 13 years old to set up a Google account and 18 to add a credit card. Why would you want to add a credit card? You can use it to buy apps and games on the Play Store, subscribe to YouTube Music, and pay for other services Google offers. Google will also ask for a phone number in order to recover your account if it’s lost or stolen.

As most of Google’s services are free of charge — including Gmail, Docs, Drive, and Photos — adding a credit card is optional, and opting out won’t be a problem.

How to set up a Google Account on your Android or iOS phone

Rita El Khoury / Android Authority

Creating a new Google account only takes a few minutes, and there’s no limit to the number of Google accounts you can have. Grab your Android device, open the Settings app, and select the Accounts option (on iOS, go to Mail, then Accounts). The next step is to tap Add account at the bottom and choose Google.

A page will appear to sign in to your account or create a new one. Select the Create account option and then follow the on-screen instructions by entering your personal information (including a phone number), selecting a username and password, and completing the process by agreeing to the terms of service. If you happen to run into issues with services like Gmail, we have guides to help you get back on track.

Step-by-step instructions to set up a Google Account on Android or iOS:

Head into the Settings of your device.

Select Accounts. In iOS, this setting is inside the Mail option.

Tap on Add account.

Select Google.

Pick Create account.

Follow on-screen instructions by entering your personal information, selecting a username, etc.

Tap the I Agree button to create your Google account.

How to set up a Google account using a browser

Oliver Cragg / Android Authority

Not digging the mobile phone method? It can be easier and faster to fill out forms and create an account using a computer and web browser. You can definitely do this whole thing online.

Simply go to the Sign Up page and start filling out your information. This will include your name, username, and password. Hit Next and fill out the next form. Select Next again and verify your identity by confirming your phone number. Google will ask you if you want to link your phone number to your account and offer other services. Follow the instructions, and your account will be created.

Step-by-step instructions to set up a Google Account on a browser:

Go to chúng tôi Sign Up page.

Enter your name, username, and password.

Select Next.

Enter your phone number, recovery email, birthday, and gender.

Select Next

If you entered a phone number, you can verify it now.

Follow instructions.

Done!

Frequently asked Google account questions

Yes, open your browser and head to chúng tôi to retrieve your password.

Yes, because Gmail actually resides as a service inside of the larger Google umbrella.

In order to see your devices, head to your Google account. Open the Security tab and select Manage all devices. Here, you’ll see all of the devices that you’re signed into.

How To Get Stock Android Experience On Any Android Device

If you are using an Android device from the likes of HTC, Samsung, LG etc., you’d have thought about getting stock Android on your device. While Android skins like TouchWiz, Sense etc. do bring in a great deal of functionality, they do feel overwhelming at times. Also, there are a number of reasons behind why we find stock Android attractive. Stock Android or pure Android, as some of us like to call it, has always been loved for its no-bloat, fluid experience. Plus, unlike Android’s older days, stock Android looks beautiful and unified, thanks to the Material Design UI language.

1. Install Google apps and disable similar apps

The first thing you need to do to get the stock Android experience on your Android device is install Google apps. While some Google apps like Maps, Google Photos, Play Music, Google keyboard etc. are available to download for everyone on the Play Store, some stock apps like Google Camera, Contacts, Clock, Phone etc. are only compatible with Nexus devices. In that case, you can easily go to APKMirror and download the APK files of the Google apps and sideload them to your Android device.

Note: Not all the Google apps will work on your device. For instance, we installed Google apps like Contacts through APKMirror and they work fine but apps like Google Camera and Google Phone don’t install on our HTC Desire 820. 

2. Use a stock Android launcher

The next thing you need to do is install a launcher that brings the stock Android look. The Google Now launcher is your best bet, as it’s the official launcher from Google, which brings the Google Now service just a swipe away on the left of the homescreen. Once you have installed the Google Now launcher, make sure to set it as the default launcher in Settings.

If you want to have more customization options and control over your launcher while keeping the stock Android looks, you can try out other popular launchers like Nova, Apex etc.

3. Install Material Themes

Most of the Android skins from manufacturers come with their own Themes store, so you should easily find some good looking “Material” themes to install. These Material themes are aimed at people who love the looks of stock Android and they bring wallpapers, navigation bar icons, icons, ringtones and more.

4. Install Icon Packs

While Google Now launcher brings you the stock Android interface, it lacks the icons. Thankfully, there are various icon packs that bring Google-y icons but our favorite is the Moonshine icon pack. While Moonshine does bring icons that look very very similar to stock Android, it has made a few changes to refine Google’s design language even more. If you are to use the Moonshine icon pack, you will have to use a third party launcher like Nova, Apex or one of the many great launchers available on the Play Store. If you’d like icons identical to stock Android, the Nova launcher offers it natively, so you can use that as well instead of Moonshine.

5. Change font and DPI

The stock Android interface uses the Roboto font and to match the looks of stock Android, you will have to use the Roboto font on your skinned Android device. To do that, you can simply install a font changer app like HiFont or iFont and search for the Roboto font. Once downloaded, you will have to install the font and then apply the font in your device’s Settings page.

Note: While most devices let you install and apply the fonts with ease, some device will require root access. So, it all depends on the device you are using. 

Unlike stock Android, skins like TouchWiz and Sense feature huge interface elements and it’s not just the fonts. However, you can change that by reducing the DPI of the interface. You can easily lower the DPI on Samsung devices by going to “Display Scaling” settings and selecting “Condensed”. However, devices from companies like HTC, LG don’t include this option in their ROMs. So, you’ll either have to rely on rooting your device or live with the same DPI.

6. Use a Stock Android lockscreen app

To complete the stock Android looks, you will have to get a lockscreen that looks and works similar to stock Android. You can install the L lockscreen app, which not only brings the looks of the stock Android lockscreen but also matches its functionality. It brings you lockscreen notifications along with the ability to open notifications in a way that’s identical to stock Android.

SEE ALSO: 5 Apps That Bring iOS Experience on Android

All set to give your Android device a stock Android look?

These methods do make sure that your device does look a lot more like stock Android. However, if you really want the full stock Android experience, you should go ahead and install one of the various custom ROMs. These custom ROMs bring the stock Android look along with tons of cool functionality, as well as great performance. But if you are not willing to take the rooting plunge, these steps are indeed your best shot at getting stock Android on your device.

Here’s A List Of 144Hz Supported Games On The Play Store

There is boatload a number of phones in the market that come with 90Hz or 120Hz refresh rate displays. Be it the budget Realme 6 or the flagship Galaxy S20 Ultra, we recently compiled a list of games that support these high refresh rates. Now, the ROG Phone 3 has made its India debut today with a 144Hz display – bumping up the new normal to offer an even fluid and smooth gaming experience.

Popular Games That Support 144Hz Refresh Rate 1. Alto’s Adventure

You must have already heard of or played this game. Alto’s Adventure is one of the most popular endless runner games, but skiing through the beautiful landscapes on 144Hz displays would be more fun, right?

2. FZ9 Timeshift

It has been a long time since I played FZ9 Timeshift but its story mode is one that I really enjoyed playing on mobile. It’s a typical shooter game that sees you destroy a terrorist organization, fight against other players, and more. The ROG Phone 3 will enable you to enjoy this game on the 144Hz display. Exciting!

Download (Free, in-app purchase starting at $0.99)

3. Shadowgun: Legends

Launched alongside the insanely popular PUBG Mobile, this game has proven its might as one of the most enjoyable FPS shooters on Android. You’ll assume the role of legendary warriors, Shadowguns, to eliminate alien invaders – now in fluid 144FPS.

Download (Free, Offers in-app purchases)

4. Final Fantasy XV Pocket Edition

This is a free-to-play role-playing game from the creators of the world-renowned Final Fantasy franchise. You have to combine your magical abilities with tactical expertise in this game, but there’s a catch. Only the first chapter is available for free and you will have to pay to unlock the other nine.

Download (Free, Offers in-app purchases)

5. Mekorama

Download (Free, Offers in-app purchases)

6. Minecraft

This is one of those games that do not need any introduction. Minecraft is an amazing sandbox game that sees you build a home, breed animals, and craft weapons to survive in an open world. If that’s something you feel you will enjoy, then Minecraft can run at a sweet 144 FPS on some of the latest gaming phones out there.

7. Modern Combat Versus

If you are a fan of PVP games like Rainbow Six Seige, then Modern Combat Versus is something you should definitely give a try. It boasts fast-paced 4v4 action gameplay that I quite like.

Download (Free, in-app purchase starting at $0.99)

8. Hill Climb Racing 2

This used to be my go-to game a couple of years ago. I’m certain that a lot of you must have played Hill Climb Racing 2, where you race opponents on a variety of tracks. You can also upgrade and customize your vehicle to your heart’s desire. It’s time to reinstall the game as it can operate at 144FPS.

Download (Free, in-app purchases starting at $0.99)

9. Super Samurai Rampage

Are you a fan of Samurai Jack? Remember that cartoon? Well, this game will remind you of Samurai Jack as you play as one in this retro pixel-style game. The aim is to take out any and all enemies using your katana to attain the highest score – now at 144FPS as well. A super-smooth victory?

Download (Paid, $1.99)

10. Vainglory

Download (Free, in-app purchase starting at $0.99)

The Complete List of 144Hz-Supported Games

Apart from some of the most popular and interesting games listed above, here’s the complete list of games that support 144Hz refresh rate displays:

GameGenre

1945 Air ForcesArcade

Ace Force: Joint CombatAction

Arma Mobile OpsFPS

Badland BrawlStrategy

BallzPuzzle

Batman: The Enemy WithinAdventure

Battlelands RoyaleShooter

Bendy in Nightmare RunAction

Blades of BrimEndless runner

Bleach Brave SoulsAction

Boggle With Friends: Word Game Word

BombSquadAction

BreakneckRacing

Card ThiefPuzzle

CATS: Crash Arena Turbo StarsAction

Chameleon RunArcade

Chicken Jump: Crazy TrafficArcade

Chilly Snow Slide 2Arcade

Cover FireFPS

CSR Racing 2Racing

DARIUSBURST -SP-Arcade

Dead Target – Offline Zombie ShooterFPS

Dead Trigger 2FPS

Deer Hunter 2023Simulation

Deus Ex GoPuzzle

DokdoSimulation

Don’t StarveAdventure

Don’t Starve: ShipwreckedAdventure

Dub DashArcade

Epic Battle SimulatorSimulation

EterniumRole Playing

Fast Like a FoxAdventure

Final Fantasy XV Pocket EditionRole Playing

Frag Pro ShooterBattle Royal

FZ9 TimeshiftFPS

Golf ClashSports

Google EarthApplication

GrimvalorAction

Groove Coaster 2Music

Grow KingdomStrategy

Hill Climb Racing 2Arcade

Hitman GoPuzzle

Injustice 2Action

Into MirrorAction

Into the DeadAction

King of Sails: Royal NavyStrategy

Lara Croft GoPuzzle

Lara Croft: Relic RunAction

Legendary: Game of HeroesRole playing

Lemmings – Puzzle AdventurePuzzle

Magic RampageRole Playing

Man or VampireRole Playing

Marvel Contest of ChampionsFighting

MekoramaPuzzle

MinecraftArcade

Mini Dayz: Zombie SurvivalAction

Mini MetroPuzzle

Modern Combat VersusFPS

RC SoccerArcade

Mortal KombatFighting

MR BowArcade

NyxQuest: Kindred Spirits Adventure

OddmarPlatformer

OK GolfSports

Pac-ManArcade

Pac-Man 256Arcade

Payback2 – The Battle SanboxArcade

Perfect SlicesArcade

Photon StrikeArcade

Plague IncSimulation

Pumped BMX 3Sports

Real Racing 3Racing

Rebel IncSimulation

Rope HeroAction

Shadow Fight 3Arcade

Shadowguns: LegendsAction

ShadowmaticPuzzle

SkullgirlsFighting

Smashing RushArcade

Sonic Dash 2 Adventure

Sonic the Hedgehog ClassicArcade

Soul KnightAction

Space Armada: Galaxy WarsSimulator

Space Jet: Space ships galaxy gameSpace Shooter

SquadronArcade

Squadron IIArcade

Subdivision InfinitySpace Sim

Subway SurfersArcade

Super Samurai RampageArcade

Temple Run 2Action

The Catapult: Clash with PiratesAction

RepubliqueAction

The Silent AgeAdventure

The Walking Dead: Road to SurvivalRole Playing

The Wolf Among UsAdventure

Tiny Room Stories: Town MysteryPuzzle

Toon BlastPuzzle

Traffic RiderRacing

Trials FrontierArcade

UNKILLED – Zombie FPS ShootingFPS

VaingloryMOBA

Vendetta OnlineSpace Sim

Wonder TacticsRole Playing

Last Hope Tower DefenseTower Defense

Offline BubblesArcade

Ceres MRole Playing

AncestorArcade

Opsu!Music

Friday the 13th: Killer PuzzlePuzzle

Doodle God HD FreePuzzle

8 Ball PoolSports

Blitz BrigadeFPS

Offroad Legends 2Racing

Grand Mountain AdventureSports

Xenowerk TacticsStrategy

PoopdieAction

CarX Drift Racing 2Racing

EvertaleRole Playing Game

Walk masterAction

HexoniaStrategy

Chess RushStrategy

Infinitode 2Strategy

Farm PunksAction

Tales RushAction

Crossing VoidRole Playing

Dungeon QuestRole Playing

Pocket RoguesRole Playing

EverybodyRPG ReturnsRole Playing

Slash of Swords – Arena and FightsAction

A Way to SlayAction

MindustryAction

Off the RoadRacing

TheoTownSimulation

Open TTDSimulation

ArmelloBoardgame

Reckless Getaway 2Action

Tank StarsArcade

Harvest TownRole Playing

Somnus: NonogramPuzzle

Falcon SquadArcade

Zombie Gunship SurvivalAction

Shadowguns WargamesAction

Curse of ArosRole Playing

Last ArrowsAction

Tower Madness 2: 3D DefenseStrategy

The Walking Zombie 2Action

Mosaic: BlipBlopArcade

A Planet of MineSimulation

SubterfugeStrategy

Legend of SolgardRole Playing

Idle ZombiesArcade

Tiny BubblesPuzzle

Egg incSimulation

The Mighty Quest for Epic LootRole Playing

Old Man’s JourneyAdventure

Survival DerbyArcade

Hunter AssassinAction

Knights of Pen and Paper 2Role Playing

Dead City ZombieAction

Rise of KingdomsStrategy

Honkai Impact 3rdAction

Titan Quest Action

Bullet EchoAction

Kingdom Two CrownsSimulation

Color Me HappyArcade

Rick and Morty: Pocket MortysStrategy

The Greedy Cave 2: Time GateRole Playing

Sword MakerSimulation

Egg TycoonSimulation

Adorable HomeSimulation

Swordman: ReforgedAction

Battlevoid: First ContactStrategy

Smash BanditsRacing

Smash Cops HeatRacing

Bullet Hell Monday FinaleArcade

Bullet Hell Monday BlackArcade

Duel OttersArcade

Bloons Adventure Time TDStrategy

Transmission Puzzle

sand:box – relaxing particle engineSimulation

Pokémon Café MixPuzzle

Ninja ArashiAdventure

Dead CellsAction

Stellar FoxPuzzle

Infinity LoopPuzzle

Fancy Pants AdventuresArcade

Doodle AlchemySimulation

Balls?Arcade

Cosmic WarsStrategy

Broken Dawn 2 HDAction

Soda Dungeon 2 Adventure

Idle Digging Tycoon Simulation

Laser OverloadPuzzle

Rope Slash Puzzle

OrbiaArcade

Sky RollerArcade

Happy WheelsArcade

Though a myriad of games listed above are the same as those mentioned in the 90Hz/ 120Hz games list that we compiled last month, this is the most extensive list of games that are supported on 144Hz display phones. So yeah, if you are planning to enjoy the fluid gaming experience on your new high-end gaming phone then take your pick and have fun.

How To Launch Google Maps Directions Via An Intent On Android?

Introduction Implementation

We will be creating a simple application in which we will be creating a text view for displaying the heading of our application. After that we will be creating two text input fields which are used to get the source location and destination location from the user. Then we are displaying a button which will launch the google maps intent and draw a route between this source location and destination location. Now let’s move towards android studio for creating a new project.

Step 1 : Creating a new project in Android Studio

Inside this screen we have to simply specify the project name. Then the package name will be generated automatically.

Note − Make sure to select the Language as Java.

Once our project has been created we will get to see 2 files which are open i.e activity_main.xml and chúng tôi file.

Step 2 : Working with activity_main.xml

android:layout_width=”match_parent” android:layout_height=”match_parent” android:orientation=”vertical” <TextView android:id=”@+id/idTVHeading” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_marginStart=”10dp” android:layout_marginTop=”100dp” android:layout_marginEnd=”10dp” android:gravity=”center” android:padding=”4dp” android:text=”Google Maps Direction Intent in Android” android:textAlignment=”center” android:textColor=”@color/black” android:textSize=”20sp” <EditText android:id=”@+id/idEdtSourceLocation” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_below=”@id/idTVHeading” android:layout_margin=”10dp” <EditText android:id=”@+id/idEdtDestinationLocation” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_below=”@id/idEdtSourceLocation” android:layout_margin=”10dp” <Button android:id=”@+id/idBtnShowDirection” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_below=”@id/idEdtDestinationLocation” android:layout_margin=”10dp” android:padding=”4dp” android:text=”Show Direction on Maps”

Explanation − In the above code we are creating a root layout as a Relative Layout. Inside this layout we are creating a text view which is used to display the heading of our application. After that we are creating two edit text fields which are use to get the source and destination location from the user. Then we are creating a button which is use to open the google maps intent and draw the route on google maps application.

Step 3 : Working with chúng tôi file package com.example.java_test_application; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { private EditText sourceEdt, destinationEdt; private Button directionBtn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); sourceEdt = findViewById(R.id.idEdtSourceLocation); destinationEdt = findViewById(R.id.idEdtDestinationLocation); directionBtn = findViewById(R.id.idBtnShowDirection); @Override if (sourceEdt.getText().toString().isEmpty() && destinationEdt.getText().toString().isEmpty()) { Toast.makeText(MainActivity.this, "Please enter source and destination location..", Toast.LENGTH_SHORT).show(); } else { openMapsIntent(sourceEdt.getText().toString(), destinationEdt.getText().toString()); } } }); } private void openMapsIntent(String source, String destination) { try { Intent i = new Intent(Intent.ACTION_VIEW, uri); i.setPackage("com.google.android.apps.maps"); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(i); } catch (ActivityNotFoundException e) { Intent i = new Intent(Intent.ACTION_VIEW, uri); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(i); } } }

Now in the open maps intent method we are creating a uri in which we are passing source and destination location. After that we are creating an intent in which we are setting google maps application package name to it. Then we are calling a start activity method to start google maps application. Along with that we are putting this in a try and catch block. In the catch block we are checking if the google maps application is not installed on the users device. In that case we are opening a google play application and redirecting users to install google maps application page to install google maps application.

Note − Make sure you are connected to your real device or emulator.

Output Conclusion

In the above article we have taken a look on How to launch Google Maps Direction via an intent on an android application.

Update the detailed information about Learn To Use The Google Play Store On An Android Device on the Tai-facebook.edu.vn website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!