Most voted "android" questions
Android is an operating system for mobile devices developed by Google and the Open Handset Alliance. Use this tag to reference questions related to programming for Android and be relevant only to this operating system. Use the [android-subject] tag instead of [subject] alone.
Learn more…8,935 questions
Sort by count of
-
1
votes2
answers101
viewsThe application for when editText is not populated
Hello! I’d like to ask for your help. I’m new to Android studio and I’m trying to create an app for my physics students to calculate motion equations. One of the methods is to calculate the equation…
-
1
votes1
answer46
viewsI’m Having Trouble Opening a New Activity after taking a photo with android studio
Code public class primeiraTela extends AppCompatActivity { ImageView imageView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);…
-
1
votes0
answers208
viewsHow to receive messages from firebase console on android in the background?
I have an app that sends notifications from the firebase console and my notifications don’t arrive on my phone when they’re in the background but when they’re in the foreground with the app open the…
-
1
votes1
answer544
viewsFirebase Query Database does not return changed values in the database
I have a query in Firebase that should return the user data to check if he still has access and his level of access to the system, however when modifying the values the query continues bringing the…
-
1
votes0
answers12
viewsAndroid - How to get Extras in an Innerfragment(Nested Fragment)?
How to get a Extra within Fragment nestled in another Fragment? I have an Activity with the following Layout: Activity (que infla um){ //Aqui a activity infla 3 Fragments para criar um…
-
1
votes0
answers27
viewsProblem with android agenda
I’m starting an interview to get a contact in the contact list: if (AceitouContacts) { Intent intent = new Intent(Intent.ActionPick, ContactsContract.CommonDataKinds.Phone.ContentUri);…
-
1
votes1
answer217
viewsError(Bitmap size Too big) when using Timage in thread firemonkey android
Use this function to generate images in the system: procedure converte_jpg(Bitmap: TBitmap; Stream: TMemoryStream); var surf: TBitmapSurface; saveParams : TBitmapCodecSaveParams; begin surf :=…
-
1
votes3
answers443
viewsGet Integer value in final . 00 and float value in . 01 to 0.9
I have this code below that is a calculator, but I have a problem: I wanted to return a value float when dividing 5 / 2 = 2.5 and returning an integer value when dividing 4 / 2 = 2 and not 2.0! Can…
-
1
votes1
answer153
viewsCreating a positiveButton in a Dialog on Android
I have the following method to create a Dialog in an Android app: public static void alertBuilder(String mensagem, Type tipo, Context contexto){ Dialog dialog = new Dialog(contexto, R.style.alert);…
-
1
votes0
answers99
viewsPut sound in app notifications
I’m having trouble with my application, I’m trying to send notifications to mobile devices, notifications arrive but they do not present sound and I need them to make the sound to draw attention. I…
-
1
votes1
answer89
viewsHow to return an avinda list of the database using Asynctask, and then deliver it to the class that will manipulate it?
I have an Internet class that loads a list from the database, but on the return of the doInBackground it returns the empty list. I already tested and the for is getting it right, then populates the…
-
1
votes1
answer1495
viewsHow to resolve adb.exe start-server' failed -- run Manually if necessary
I’m having the mistake: Unable to run 'adb': null 16:08 'C: Desktop Users PI SDK Platform-tools adb.exe start-server' failed -- run Manually if necessary By pressing the run button Android Studio…
-
1
votes0
answers99
viewsWhat am I doing wrong using LET (Kotlin)?
I’m using retrofit and onResponse, when I try to get body information with (Let), the internal code is not executed. response?.body()?.let { Log.i("Info", "Cidades: " + it.size) } If you try it like…
-
1
votes1
answer333
viewsThe Operator + is Undefined for the argument type(s) Charsequence, int
I’m trying to concatenate a text into CharSequence with int, but java warns that it is not possible to do this conversion by saying: The Operator + is Undefined for the argument type(s)…
-
1
votes1
answer99
viewsHow to use non-static "getSystemService"
I am making a class that repeats the notifications but I cannot import the Prompt class.Notification whenever I leave the Static Notification Class of the error in getSystemService in the following…
-
1
votes0
answers25
viewsRecover directory where apk was created by Gulp with Cordova-lib plugin
Good night, I’m having a problem to recover the directory where the apk file was generated. I use the Cordova-lib plugin in Gulp to build an Ionic application. The "real" problem is that I can’t…
-
1
votes0
answers30
viewsProgram type already present: android.support.v4.util.Timeutils
buildscript { repositories { jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.1.3' } } apply plugin: 'com.android.application' dependencies { implementation…
-
1
votes1
answer24
viewsHow to restrict that some folders are displayed in the gallery? android
I know how to list all the gallery photos but I need the Download folder not to appear in the list. I know I can filter but I can’t make it work. I do not parameter in the query I must paste so that…
-
1
votes1
answer371
viewsDoubt in Toast.makeText(this, ...)
This is the same code as a previous doubt, but now my question is another. In the Toast.makeTest(this, msg, Toast.LENGTH_SHORT); gives the following error when compiling, I believe that because of…
-
1
votes1
answer29
viewsLog activity for synchronization capturing task data running in background
I develop an application in Cordova, which synchronizes with an online database, the synchronization part is all in Java. (Context of the app) I am developing a "Log" screen for the synchronization…
-
1
votes1
answer352
viewsLimit an Edittext from 1 to 100 and include the "%" symbol
I’m making an application that takes the data entered in a EditText and makes a certain calculation. The problem is that I need the field to go from 1 to 100%, but the "Mask" I’m using is too simple…
-
1
votes1
answer279
viewsHow to change Apptheme?
I have 2 Styles files. With a click on a button I want to change from Apptheme to Apptheme2. how to do? Manifest.xml <application android:allowBackup="true" android:icon="@mipmap/ic_launcher"…
-
1
votes0
answers52
viewsTabllayout in a Fragment occupying all space
Good afternoon. I want to make an app where I have a side menu, with default options, like "home page, profile, about etc...". When I click on the home page, I want my screen to turn into a…
-
1
votes0
answers77
viewsHow to delete a photo from the gallery on Android
I have a code where I’m using my camera to take a picture, then I put it in a Imageview, only for viewing as it is saved then in my Sqlite. I wonder, how do I delete this photo from the gallery,…
-
1
votes1
answer46
viewsProblems with popup menu and Immersive Mode
I’ve set up my app to use Immersive Sticky Mode, but I also use some elements that are above the context of Activity and that when the user interacts with them, the app leaves Immersive Mode and the…
androidasked 6 years, 3 months ago Pablo Henrique 43 -
1
votes0
answers137
viewsProblem with Gradle Android Studio
I’m getting a Gradle Warning to exchange Compile for the implementation and api, but I’m no longer using Compile in my project. Configuration 'compile' is obsolete and has been replaced with…
-
1
votes1
answer75
viewsGet values from the 4th Firebase node on Android
I need to fetch the red highlighted values in the image, but I only know the blue highlighted item. I tried that way: firebase =…
-
1
votes0
answers663
viewsIonic application on different versions of android
I’m having a problem creating an apk that runs on different versions of android. My phone has version 6.0.1 and runs perfectly but when I tried to install on an android 5.0.2 the application opened…
-
1
votes0
answers54
viewsError calling non Static function from a static context
I created a class only to call 2 methods that cannot be static. But when calling the method of this object returns the error that I am not able to interpret. Code: public static Handler handler =…
-
1
votes1
answer82
viewsHow to call an Interstitial by clicking on a list item that passes through an Adapter?
I need to call a Interstitial in this Activity by clicking on a list item that comes from my Adapter: public class ListOfTemplates extends AppCompatActivity { private Template template; private…
-
1
votes1
answer53
viewsHow to filter to show only required fields in a class using Gson
I’m using Gson to work with json, let’s say I have this class class Track( @SerializedName("id") val id: Long, @SerializedName("name") val name: String, @SerializedName("modality") val modality:…
-
1
votes1
answer139
viewsHow to view a Menu by clicking on the Bottomnavigationview item
My application this way: I need a menu to appear when I select the fourth item: The code of my Activity Main: package br.com.friendlychat.navigationbottombar; import android.os.Bundle; import…
-
1
votes0
answers35
viewsNotification on android is not displayed
I’m having a problem in my app, it for some reason does not show the notification but the log. i runs normally! Code: package imm.pt.immsmart; import android.app.Notification; import…
-
1
votes1
answer39
viewsAdd a new "Android Resource Directory" to the project
Hello, I’m just getting to work with Android Studio. Well, I have a collection of images that I will use in my app and these images are separated into 3 folders. When I create a new directory in the…
androidasked 6 years, 3 months ago Rafael Araujo 89 -
1
votes1
answer545
viewsAndroid app does not connect on local webservice
I’m studying webservices but came across a problem, The API works because I can already enter data into the database, I’m using wamp, but in the app, I followed several steps and just don’t send,…
-
1
votes1
answer1997
viewsOne button click event
Consider the following layout of a Activity: <LinearLayout> <android.support.v7.widget.AppCompatButton android:id="@+id/btnLogin" android:layout_width="fill_parent"…
-
1
votes1
answer92
viewsjava.lang.Illegalargumentexception when creating a Snackbar
I’m developing an app that accesses my college’s Moodle and posted the first version. Since then I noticed some flaws in the application presented in the Google Play console but I could not find the…
-
1
votes0
answers120
viewsHow do I pass Activity data to your Fragment?
I learned how to send data from a Fragment to your Activity using interface. Only now I’m trying to do the opposite. Because I sent data to an Activity and I want that data to be sent back to your…
androidasked 6 years, 2 months ago Felipe Lacerda 19 -
1
votes1
answer26
viewshow to set the position of the item in the horizontal recycleview list?
Good morning, I have a correct horizontal recycleview, but I want to do this effect of example , the items starts almost in the middle of recycleview and after scrolling to the side it fills all the…
-
1
votes1
answer680
viewsPlace profile photo in Nav_header
I have a question in creating an App. I need to put the user profile photo in my Nav_header_tela_princial. I already have a profile screen, but I need to use the same image of the user profile…
-
1
votes2
answers385
viewsChange background image of a Recycler View Adapter after click
The thing is, I created a Adapter amending a RecyclerView in an Activity I call through this function (within Activity): private void gerarDatasView(CalendarJur calendario){ LinearLayoutManager…
-
1
votes2
answers706
viewsMake Floatingactionbutton Overlay Linearlayout
Hello, I’m making a kind of Actionbar and precise with the Floatingactionbutton overlap the Linearlayout that is fixed at the bottom, it needs to be in the same position put on the front of the bar.…
-
1
votes1
answer90
viewsProblems with Sharedpreferences
I’m not able to save the value obtained rewardItem mine to be displayed in a Textview, every time I close the application and return to the same value and 0. Can someone help me with this mistake?…
androidasked 6 years, 2 months ago Vanderclin Rocha 33 -
1
votes1
answer3152
viewsError: The apk has Permissions that require a Privacy policy set for the app, e.g: android.permission.CAMERA
I’m trying to publish an APP in my test stores, build works normal, but when I try to publish in the store appears the error described above. For what I have visa it is necessary to inform in Google…
-
1
votes0
answers538
viewsProblem in editing interface of android studio XML layout
Build.Radle (app) apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.example.karlo.menu" minSdkVersion 15 targetSdkVersion 28 versionCode 1…
-
1
votes1
answer51
viewsError: android.widget.Linearlayout cannot be cast to android.widget.Gridlayout
I’m trying to make an android app that lists the components coming from the bank. The error is as follows: Androidruntime: java.lang.Classcastexception: android.widget.Linearlayout cannot be cast to…
-
1
votes0
answers43
viewsError to popular array, firebase, photo gallery ANDROID STUDIO
I’ve been researching this mistake for three days and I can’t fix it. I’m setting up a photo gallery for my app and need to popular an Array with the photos coming from Firebase to show them in the…
-
1
votes1
answer67
viewsError sending pdf to Firebasestorage
I am trying to send PDF files to firebase Storage and with this code I can go to the point of picking up Uri, sending, but only falls into onFailure, follows the code @Override public void…
-
1
votes1
answer58
viewsHow do you run the getCidade() method with asynctask, and return the value of the city string to use in another method?
public class CadAnuncio extends AppCompatActivity { LocationManager locationManager; private Button btnSalvar; private DatabaseReference databaseAnuncio,…
-
1
votes1
answer76
viewsHow to get html code through a url in android studio
I would like to do as I get html code from a site using android studio. This is the code I did, but it does not returns anything. private static String pegarURL(String a) { StringBuilder b = new…