![]() Import .auth.UserRecoverableAuthIOException Import .auth.GooglePlayServicesAvailabilityIOException Name the class "MainActivity" and click OK. ![]() If prompted to select a directory, choose. Right-click on the folder and select New > Java Class. Afterįile > New > Java Class from the menu bar, or you can This folder appears in the group of app files. To do so, first select the java folder in the Most AndroidĪpplications, however, benefit from defining layouts, strings and otherĬreate a new Java class. Layout dynamically and uses hardcoded string constants. Step 5: Setup the sample Note: For simplicity, this quickstart builds its Replace the file's contents with the following code: Project sidebar, this file is nested under app and then under Find and open the default src/main/AndroidManifest.xml file.This will acquire and make available the libraries your project needs. In the toolbar, select Tools > Android > Sync Project with Gradle Files.Open the app adle file and replace its contents with the following:.Warning: Be sure to open the correctīadle file. In that list, expand the list of Gradle scripts and open theīadle file that is associated with the "app" module The Project sidebar is an expandable list of the default project files that In the Add an activity to Mobile screen, click Add No Activity.Ĭreates and opens the project.In the Target Android Devices screen, check the Phone and TabletĬheckbox and choose a Minimum SDK of "API 14: Android 4.0.Set Company Domain to "" and verify that the package nameĪutomatically produced matches the one you entered into the.In the New Project screen, name the application "Quickstart".Copy the SHA1 fingerprint from Step 1 into the Signing-certificate.Select the Credentials tab, click the Create credentials Select an Email address, enter a Product name if not ![]() ![]() On the Create credentials page, click theĪt the top of the page, select the OAuth consent screen tab. To create or select a project in the Google Developers Console andĪutomatically turn on the API. Important: When you create a production app, Issuer: CN=Android Debug, O=Android, C=US For example: $ keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -vĮnter keystore password: Type "android" if using debug.keystore The Keytool prints the fingerprint to the shell. When asked for a keystore password, enter "android". keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v Utility command to get the SHA1 fingerprint you will use to enable the API. IDE (as opposed to the stand-alone SDK Tools) and are comfortable finding,Ĭreating and editing files within a Studio project. This quickstart will assume you are using the Access to the internet on your test device. ![]() Player API, which lets you incorporate video playback functionalityįor API 23 or later, including the latest versions of Google Repository,Īndroid Support Library and Google Play Services. YouTube Data API in an Android application. Note: This quickstart demonstrates use of the This guide explains how to set up a simple Android application that makes ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |