android-developer-api

Google Sign In throws an exception com.google.android.gms.common.api.ApiException: 12500

半世苍凉 提交于 2020-12-13 03:33:46
问题 I have a simple application written in Android, where I want to do Google Sign and then Firebase Authentication. I copy paste the code from official page. val gso = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(getString(R.string.default_web_client_id)) .requestEmail() .build() if (requestCode == REQUEST_CODE_GOOGLE_SIGN_IN) { val task = GoogleSignIn.getSignedInAccountFromIntent(data) try { // Google Sign In was successful, authenticate with Firebase val

Failed to find target with hash string 'android-P'

不羁的心 提交于 2020-01-24 18:15:47
问题 I'm following this tutorial page and i get the exact same error that they say in that page Failed to find target with hash string 'android-P' in: D:\Development\Android\Sdk Install missing platform(s) and sync project when i click install missing platform(s) and sync project it shows the error as All packages are not available for download! The following packages are not available: - Package id platforms;android-P I have installed almost all the SDK it asks for ANDROID - P. 回答1: you're trying

Dashed input field in android for confirmation codes

纵然是瞬间 提交于 2020-01-24 10:07:27
问题 I am trying to create a Dashed input field for numbers in android layout, such as " _ _ _ _ " where I can add 4 numbers and get them in my main activity. I have searched a lot but not getting any better solution. 回答1: Use this library to achieve your objective. https://github.com/glomadrian/material-code-input 回答2: Create EditText for 4 dashes and implement OnTextChanged() for every EditText to quickly jump to other input . Make sure the EditText has input type as number and can only allow a

Application Randomly Disappeared from Google Play Store Search

霸气de小男生 提交于 2020-01-22 10:09:11
问题 My app, "(Adult) Never Have I Ever" disappeared from Google Play Search out of nowhere. When I would search my app by keywords in Google Play, "Never Have I Ever", I was ranked 3rd for my adult version of the app, and 5th for the kids version of the app. However a couple days ago, the adult version disappeared from the search results. It is nowhere to be found, unless I type in my developer name or the entire app name. I get most of my installs organically, so now people cannot find my app by

Unable to resolve all dependencies in android studio 3.0.1

只谈情不闲聊 提交于 2020-01-11 13:22:13
问题 Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0. Could not resolve com.android.support:appcompat-v7:26.1.0. Required by: project :app No cached version of com.android.support:appcompat-v7:26.1.0 available for offline mode. Error:Could not resolve all files for configuration ':app:debugCompileClasspath'. Could not resolve com.android.support:appcompat-v7:26.1.0. Required by: project :app No cached version of com.android

Is it possible to pause any video (mediaplayer) APP in Android when pull down the notification panel?

*爱你&永不变心* 提交于 2020-01-06 04:29:48
问题 The bounty expires in 3 days . Answers to this question are eligible for a +200 reputation bounty. zhangxaochen wants to draw more attention to this question. Assume I have the AOSP source code, How can I pause the APP in the foreground when pulling down the notification panel? I've googled and find an APP can listen the event onWindowFocusChange and take some action proactively, but how can I pause ANY APP when pulling down the notification panel, without modify every APP respectively (which

Android - How to check if Developer option is enabled

人走茶凉 提交于 2019-12-30 06:33:34
问题 How can I check if the user has developer option enabled on its device? (not with adb comunication active, or debug USB active, I need to know only if Developer Option are enabled). I've tried this solution: How to check programmatically whether app is running in debug mode or not? but it doesn't work for me. Thanks in advance 回答1: try this: int adb = Settings.Secure.getInt(this.getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED , 0); 回答2: You should use getInt or another in

I tried using this Flag in setFlags from tutorial but its deprecated, what do i do

时光毁灭记忆、已成空白 提交于 2019-12-24 14:55:23
问题 FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET is deprecated; so what should I use? private Intent createShareForecastIntent() { Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); shareIntent.setType("text/plain"); shareIntent.putExtra(Intent.EXTRA_TEXT, mforecastStr + FORECAST_SHARE_HASHTAG); return shareIntent; } 回答1: Quoting the documentation: As of API 21 this performs identically to FLAG_ACTIVITY_NEW_DOCUMENT which should be used

Android Auto custom apps - Official

て烟熏妆下的殇ゞ 提交于 2019-12-24 08:13:01
问题 I want to create a Custom Android auto app without doing driver distraction. I went through a lot of blogs and sites and I saw that there used to be custom apps that were blocked since the version 3.0. The developers of those custom apps were using an unofficial Android Auto SDK (https://github.com/martoreto/aauto-sdk) which has been removed. Is there a way to build a custom Android auto app which is completely legal? Is there any open source SDK-for-auto that is still available? (Note:

Cannot Install ARCore on Android Emulator

假装没事ソ 提交于 2019-12-23 23:13:11
问题 I understand this question has been asked a few times, however the solutions for the other users have not resolved my issue. I am attempting to install ARCore on my Android Studio emulator. The Play Store says "Your device isn't compatible with this version," and when I click and drag the ARCore for emulator APK to manually install it on the emulator, it gives me the following message: "The APK failed to install. Error: Could not parse error string" The System Image I'm using: Oreo/ API