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
votes0
answers265
viewsAndroid - How to Create a Loop Properly in an Activity and Pause It and Summarize It
I have a project of a CHIP-8 emulator that I’m trying to port to android, the entire emulator is written in C++ so I created a C++ library in android studio and added it to my project, the problem…
-
1
votes2
answers73
viewshow do I stop a sum?
I’m making an app where I have to pull a sensor (I used the accelerometer) and save the sum of the 3 parameters. As soon as I try to save that sum the app hangs, I found that the save command that…
-
1
votes0
answers358
viewsESC function in Android Studio
A customer uses its own application in a data collector with Android 5.0+ system. The data collector is like a very robust smartphone used by companies, and in this case it has a physical keyboard…
-
1
votes0
answers46
viewsBack to Android menu
Have a menu inside a menu, like going back to the previous menu? <menu xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"…
android xml android-studio android-layout android-xmlasked 6 years, 1 month ago João G. Hartmann 31 -
1
votes2
answers123
viewsHow do I get data from one node within another node in Firebase with android?
I need to get the data from the "usrCategoriaUsuario" node that is in tb_usuario. The normal data I get, but this usrCategoriaUsuario, I’m not getting. Code that searches the User data in Firebase:…
-
1
votes1
answer71
viewsReferencing components of Activity
I searched but found no answer. I need to access a TextView that is present in my Activity within a Java Class that is independent of the Java Class itself Activity. The way I tried was by creating…
-
1
votes1
answer53
viewsInsert multiple Markers into Maps
I found a code here on the site, I put in my project but it didn’t work, anyone knows how I can solve? The method below is called in onViewCreated() Note: I am using the Map inside a Fragment, it…
java android android-studio android-fragment google-maps-android-api-2asked 6 years, 1 month ago Elailson Silva 11 -
1
votes0
answers104
viewsReturning number of Sqlite records and displaying in Textview
I have an app and I need to display in a TextView the amount of records stored. public int contagem(){ createBank = new CreateBank(this); connecting = createBank.getReadableDatabase(); String cursor…
-
1
votes1
answer308
viewsRecyclerview with Show More button
I have a recyclerview that pulls data from firebase, but it takes all the data at once, and this causes the application to lock, as I do for it to show only the first 10 and as the user goes down…
-
1
votes0
answers24
viewsWatson Speechtotext crash app android when Microphonehelper is called
I cannot start the audio recording. I am receiving the following error: E/AudioRecord: start() status -38 E/AndroidRuntime: FATAL EXCEPTION: Thread-7713 Process: com.sienaapp.sienaapp, PID: 5005…
-
1
votes1
answer78
viewsGetting a response from Webservice with Ksoap
I have a web service that returns this data: <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"…
-
1
votes0
answers34
viewsNot returning returning the json
Good I’m starting in the android area and still do not know much about it and would like help with the following code: gridView = (GridView) findViewById(R.id.lastedAnimeView);…
-
1
votes0
answers222
viewsView All Columns from an Sqlite Table using Bindig
Forms, I would like to know how to display all table columns of a Sqlite database, using Binding and Listview. I’m using Visual Studio 2017, the latest version with Android. All the features of…
-
1
votes0
answers67
viewsHow to save a capture the mobile screen on a bitmap?
I would like to capture the entire screen of the phone, but what I’ve achieved so far only captures the control passed in the function parameter. follows the code below: //USO: var B: TBitmap; begin…
-
1
votes0
answers71
viewsDrawing in the middle of the screen with the android canvas
How to draw in the middle of the screen, in all the attempts I made I could just stretch the drawing and not move it to the center of the screen. public class Carta { private static int…
-
1
votes1
answer115
viewsHow to stop a service?
I created a VPN connection in my app through a service, at the click of a button, the connection is made. But now I want to know how to do the reverse, IE, by clicking the button disable this…
-
1
votes1
answer200
viewsError when buildar for android Ionic
I’m getting the following error: BUILD FAILED in 0s /home/Flavio/helloworld/Platforms/android/gradlew: Command failed with Exit code 1 Error output: FAILURE: Build failed with an Exception. Where:…
-
1
votes1
answer3118
viewsBlack screen in android emulator
I’m trying to start the emulator by android studio and genymotion but in both is a black screen in emulator: It may be my graphics card that is terrible, but would have some way to fix it? Or some…
javascript android android-studio react-native emulatorasked 5 years, 11 months ago Célio Júnior 35 -
1
votes2
answers558
viewsHow to save the value of a variable in Android Studio?
I am developing a small game just for friends and do some tests, the problem is that I know virtually nothing of programming and got stuck in the data saving part. I have read several times and seen…
-
1
votes0
answers29
viewsSqlite does not input data into the database during an Asynctask
I’m trying to add data to DB inside an Asynctask. In it I catch the Inputstream coming from an httpURLConnection, I interpret the JSON and saved in the local Sqlite. But I don’t even know if this is…
-
1
votes1
answer74
viewsIn android 8 Service stops and does not reboot when Activity ends
I am testing a service but when Activity is terminated the service to temporarily, then the service tries to restart, is called the onCreate method but onDestroy is called in sequence and the…
-
1
votes0
answers79
viewsFirebase Crashlytics: How to debug non-fatal errors?
Hello! Good afternoon, sir. I have an application for Android (developed in Android Studio) that uses lib Mpandroid Chart (a lib for Charts). Like any chart that we want to compile, we first need to…
-
1
votes1
answer103
viewsAdd Jsonobject to List<Discipline>
I’m having problems when I add data to a List. I have the following code that takes the return of a Jsonobject and adds it to a List. Then I move on to the InicialAdapter.java DisciplinaTask…
-
1
votes0
answers29
viewsProblems with localization request
Hello, good afternoon! I am having problems with the return of my location in my code (it is also not asking permission to the user) CODE OF ACTIVITY public class GPSActivity extends…
java android android-studio google-maps android-permissionasked 5 years, 11 months ago Gabriel Júnior de Souza 13 -
1
votes2
answers167
viewsRecover Spinner’s position to use in another Spinner from another Acitivity
I have a Banknote Registration App that has 1 spinner. Spinner contains card registration with Idcard, title and description (Saved in a "Card" table in the database). When save this register from…
-
1
votes1
answer35
viewsImplementation of "Loading..." message in Webplayer
Well, I made the code more readable... The same is true of a web radio player. It has functionality however I would like to add a message waiting / wait, when the video/music takes long to load.…
androidasked 5 years, 11 months ago Carlos Rocha 1 -
1
votes0
answers85
viewsMedia|Player in the notification area
Well, I’m making one app that has a plugin MediaPlayer to play web radio. I would like to add, when the player was clicked, a prediction of it in the notification area (I think that’s the name) also…
-
1
votes3
answers76
viewsHow to Save to Seekbar Android Sqlite Value Database
I am trying to register values in the database in Kotlin from Seekbar, from Datepicker, Radio Group in my Cadastroscrolling.kt I can play the visualization of age // definindo SeekBar seekbarIdade =…
-
1
votes0
answers35
viewsplayer.setDataSource(URL); giving error
I have the code below that opens a URL of Streaming of a web radio and plays/pauses her. Got and bugs in this código I don’t think so and I ask for your help. package carcleo.com.player; import…
-
1
votes2
answers89
viewsAccess child node in Firebase
I have 2 users. Twelve user and thirteen user. Each user has created a project, as you can see in the image. How do I make the twelve user access only the projects he created, and the thirteen only…
-
1
votes1
answer43
viewsAdd Beforeclick and Afterclick events to a button
I created a new class that inherits the Button component. I’ll call this class "Novobutton". This Novobutton will work as the traditional Button, but the onClick event needs to run 2 more new…
-
1
votes1
answer222
viewsFirebase Database Android does not recover data by class
I’m creating an app Android with authentication and database by Firebase, authentication is working and I can write data through a class normally. My problem is that when reading the class data does…
android firebase firebase-database realtime-databaseasked 5 years, 10 months ago Rafael Bandeira Chruscinski 13 -
1
votes0
answers49
viewsFunction in Mainactivity waiting for an asynchronous return of a function that is in an Asynctask, there being intermediate classes between both
The application has a Class with functions that perform actions in an internal BD and another Class that does almost the same for a BD by an external API. I’ve reviewed the case soen in English and…
-
1
votes0
answers103
viewsjava.lang.Illegalstateexception in Broadcastreceiver
I’m getting the following error on the console of my android app, this error shows the warning that the App stopped even not using it: Caused by: java.lang.IllegalStateException: at…
-
1
votes0
answers60
viewsHow to access "onDestroy" when the app is forced to close (force-Killed)
I have an app and I need it to access a code when the app is forced to close (force-Killed). Below I will leave the code for better understanding, however it is on onDestroy and does not run when…
androidasked 5 years, 10 months ago Luis Felipe 162 -
1
votes0
answers37
viewsAndroid open only certain links in Webview
I have the following code: @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url.contains("https://m.sendspace.com/") ||…
-
1
votes1
answer317
viewsOpen link only with . com - Android Webview
In the code below, link with mcpack are open in the Webview application, however, sometimes it opens in the default browser, which I do? @Override public boolean shouldOverrideUrlLoading(WebView…
-
1
votes1
answer152
viewsUse of Spinner on Android
I would like to know how to put the values that will appear in Spinner. I already have the values, they will always be the same, without the need to come from a database. The problem (or not) is…
androidasked 5 years, 10 months ago GUSTAVO HENRIQUE LOPES SPACHUK 93 -
1
votes2
answers182
viewsGenerate random number in a user-given range - Java/Android
I’m trying to generate a random number in a user-given range. Android Studio does not point error, however the app does not generate any value. What may be wrong? Thanks in advance! public class…
-
1
votes0
answers31
viewsonShowFileChooser() only works once
I have an Android application consuming a web page and implementing some functionality for the user. The problem appears when I try to attach media files from Android device to send to server more…
-
1
votes1
answer396
viewsSmarttablayout : How to use icons on tabs instead of text?
Hello, I’m using tabs in my learning app with the Smarttablayout library, I’m going to leave below an image of how they look (the image is from the internet, but it just serves to show the same…
-
1
votes0
answers44
viewsAndroid voice knowledge
I’m making an app in which I ask a question and the phone answers me as the question asked,but the problem is that the phone listens but does not answer me, IE, does not speak. public class…
-
1
votes0
answers170
viewsPrint image on LX300+II matrix ESC/P printer using Java / Android
I’m plugging in a printer LX300+II via cable USB directly on a mobile device Android, I can print text normally, as I already have a little bit of printer experience ESC/POS, I tried to adapt a part…
-
1
votes1
answer94
viewsWhile() loop validation bug?
I’m trying to set the total of some values I capture in the Sqlite database, so far so good because the values passed in my Arrayadpter is set on the screen without major problems. The problem is…
-
1
votes0
answers46
viewsHow to display the full Android keyboard (text + numeric)?
I implemented a mask component for a text field in my App (https://github.com/VicMikhailau/MaskedEditText/issues). It works very well, but I came across a problem that in Edittext normal does not…
androidasked 5 years, 9 months ago Marcelo Gomes 551 -
1
votes1
answer380
viewsError installing apk by adb adb: failed to install my.apk:
As you all know, as of August 2019, it will be necessary to send apk ready for architecture 64. I’m already testing the app to see if it works normally on architecture 64, I’m following this…
-
1
votes1
answer469
viewsNo such Column Android Sqlite
I need to accomplish the following select on Sqlite on Android SELECT p.codigo, p.nome, p.preco_padrao, (coalesce((select sum(i.qtd) qtd from tbl_item_compra i inner join tbl_compra c on (c.codigo =…
-
1
votes1
answer126
viewsput Thread.Leep in the Retrofit Call method without locking the Thread UI (main)
Good from what I understand the method call.enqueue(new Callback<Void>() { initiates a thread to communicate with webservice. So I thought I’d slow down the method by putting one…
-
1
votes0
answers38
viewsInterstitial ad with delayed loading
I’m trying to implement an interstitial ad, and I would like it to be loaded before, in the app it’s happening to load along with the action which causes delay and makes the ad appear well after. I…
-
1
votes1
answer134
viewsHow to take a JSON String and display in recyclerview without repeating?
I have a json with a list of users, photos posted by this user. The idea is to have a recyclerview with the name of the users, and when clicked, it will display the photos of that user. The…