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
-
6
votes1
answer989
viewsHow to reduce the size of a variable passed via POST by compressing it
My application in Android picks up the String sends to the arquivo.php that processes the data. I soon realized I couldn’t pass the code on base64 to the arquivo.php. I need some function in java…
-
6
votes1
answer1287
viewsHow to resolve Networkonmainthreadexception error?
I have an error in passing the JSON HTTP Client to Android. Follow my JSON code: // constructor public void JSONParser() {} public JSONObject getJSONFromUrl(String url) { // Making HTTP request try…
-
6
votes1
answer2358
viewsHow to send data via POST and recover in a PHP?
How to send the data via POST with send-json method, value 0, following my PHP code: // Recupera os dados $nomeUsuario = $_POST['nome']; $cpfUsuario = $_POST['cpf']; $bairroUsuario =…
-
6
votes2
answers12679
viewsWhere to find the android database path?
SQLiteDatabase BancoDados = null; String NomeBanco = "Cadastro"; CriaBanco(); public void CriaBanco(){ try{ BancoDados = openOrCreateDatabase(NomeBanco, MODE_WORLD_READABLE, null); String SQL =…
-
6
votes1
answer393
viewsonClick on dynamic button causes error "Cannot resolve constructor Intent"
I’m trying to create a dynamic button, and in it put the click function. Button btnJogarNovamente; btnJogarNovamente = new Button(this); btnJogarNovamente.setLayoutParams(new…
-
6
votes1
answer228
viewsProblem to execute a query in Sqlite
Table statement @DatabaseTable(tableName = "alarmes") public class ListenerAlarme { @DatabaseField(generatedId = true) public long id; @DatabaseField(canBeNull = true) public Date dataAlarme;…
-
6
votes1
answer1544
viewsHow to get the predominant color in an image?
I’m taking a picture of a camera and passing it to a ImagemView and would like to take the predominant color of this image, how could do this on Android? my next classLaiout ( wrote laiout with i…
-
6
votes1
answer488
viewsReplace with Fragment does not work properly
I’m making a simple example with Fragments and what I need is that when I click the first button the app replace for Fragmen1 and when you click on the second button appear Fragment2. When I start…
androidasked 9 years, 3 months ago user3010958 63 -
6
votes2
answers10977
viewsSDK Command Facebook Android - Key hash
I’m doing the tutorial on SDK of Facebook for Android and I didn’t understand this part, which talks about hashes key to development environments. Commando: keytool -exportcert -alias…
-
6
votes1
answer566
viewsConsuming Webservice with large data volume
I have a demand where I need to import a file JSON with 65k of records for my app Android,after calling my service URL REST the app starts importing the data but crashes after some time, I would…
-
6
votes3
answers189
viewsHandling items from an Action Bar outside the onCreateOptionsMenu()
I have an item in my Action Bar to display progress (a Progressbar) if a request is occurring. When the request occurs, I must show Progressbar and hide the other items, when the request ends, I…
-
6
votes1
answer96
viewsKeep a certain frame within an android app
I’m trying to manipulate the frame rate (frame rate) within a Unity scene, when I run it on the Unity platform, it works with the particular frame value I sent. However, when I pass it to my cell…
-
6
votes1
answer873
viewsHow to access data from the innermost "level" of a JSON?
I needed a way to access the innermost "level" of JSON below: (name, value, last query and source) { "status": true, "valores": { "USD": { "nome": "Dólar", "valor": 2.333, "ultima_consulta":…
-
6
votes2
answers238
viewsFirebase Google
I currently use Google’s Firebase database, ( and other components like, auth, FCM, etc.) for my project. I wonder if there’s a way to create server-side routines. For example: after a period of…
-
6
votes2
answers2168
viewsCompile and run project via command line
I have an Android application developed in Eclipse. I know it is possible to compile and run a project from the console, but I don’t know how to do it. The basic steps to compile a program JAVA is…
-
6
votes1
answer354
viewsHow to make a Floatingactionbutton square or rectangular?
I have 2 Floating Action Buttons on screen. How can I make them rectangular?
-
6
votes1
answer1385
viewsPrint text and image on Zebra printer
I used "Zebra Designer" to generate a "code" for the Zebra printer to interpret, but I don’t know how to add an image in the middle of that print dynamically, like... I have a tablet that the…
-
6
votes2
answers4150
viewsChanging Screens in Navigation Drawer
The Navigation Drawer had some changes, where the method was used onNavigationItemSelected(int position, long itemId) and now comes with the method onNavigationItemSelected(MenuItem item). I tried…
android android-layout android-fragment navigation-drawerasked 8 years, 11 months ago Mauricio Junior 149 -
6
votes2
answers784
viewsWhat is the best way to create a mobile application that communicates with a Webserver?
I’m developing an app mobile which should contain the same content of the website, and it is necessary that the same database (Mysql) used by the site is also used by the mobile application. I…
-
6
votes1
answer72
viewsDatabase on Android persists the information?
Does the database lose its information when closing the application? In this case it should be an online database?
-
6
votes2
answers1375
viewsAndroid Studio - No accent appears
Hello, I have a very strange error in Android Studio, suddenly it stopped accepting the accents in the string and comments, when I try to type for example "is" it shows only "a". I’ve tried…
-
6
votes1
answer933
viewsHorizontal scrollview of a Textview automatically slide when inserting dynamic texts
I have a layout simple according to the shown below that it has a ScrollView horizontal when exceeding the limit of TextView. But I would like when inserting text the focus of TextView was always at…
-
6
votes1
answer10799
viewsCPF/Cnpj Mask in Edittext
I have an Edittext field, I want to know how I can define a mask for it to format the text inserted in the corresponding format, CPF or CNPJ, I tried using the method described in this other…
-
6
votes1
answer2544
viewsWhat is needed for OCR Android
I’ve seen several articles and questions on forums and many other sites on the internet, I know what is necessary for a basic ocr, I’ve managed to do one and so but what I’m going to ask here is…
-
6
votes1
answer1762
viewsHow to put a logo on Toolbar?
I was researching here and I found something very interesting, the company logo on Toolbar. How do I place a company’s logo on Toolbar?
-
6
votes2
answers1173
viewsSpace between Edittext and keyboard on android
I wonder if it is possible to put a margin to space the edittext keyboard so it is not so close: The xml of how I am declaring Edittext: <EditText android:id="@+id/editTextNome"…
-
6
votes1
answer88
viewsApp version updates and changes
I have some questions about updates and changes to an app version. I posted an app to the Play Store and didn’t change anything on my Androidmanifest. It was as follows: package="com.app"…
-
6
votes2
answers1292
viewsXamarin Error - aapt.exe/Resources
I installed Visualstudio 2015 Community, with Xamarin, until then beauty. But I’m in trouble, actually not only myself, I’ve seen in many places, that quite a lot of people are making the same…
-
6
votes2
answers296
viewsWhat is the Anko?
Already converting my Android projects to Kotlin, in some researches I’ve been doing, several times quoted a Anko Kotlin. What is this Anko? What is this about? What is your goal?
-
6
votes2
answers168
viewsWhat is Pushnotification really?
I’ve been wondering now about Pushnotification and if it really is what I want. To solve my problem I need to Pushnotification? See, what I want is this: When the user(seller) changes the flag of…
-
6
votes1
answer611
viewsGet user location without using GPS
Hello. I’m developing an application on android that you need to notify a group of users who are in a certain region. The only way I know how to get the user’s location is by using GPS. The problem…
-
6
votes2
answers1773
viewsWhat is the Retrofit?
I am using the retrofit in an application to consume a Java Web Service and I am in doubt: Retrofit is a library or API?
-
6
votes1
answer290
viewsGenerate an APK on a server
I was thinking of an architecture that would work as follows. The user would have a series of parameters to fill and generate code automatically, then to click on in a Buttom, be it in version web…
-
6
votes1
answer2476
viewsDraw route over the street on the map
I have a feature that captures the positions of gps every 10 seconds. Every 30 seconds or if there’s a 20 degree change in the Bearing (Compare the last position with the current one) store to send…
-
6
votes1
answer277
viewsUpdate Textview on onResume
package br.com.automaserv.stocserv.fragments; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import…
-
6
votes1
answer2385
viewsAPK not upgrading
I am trying to update an app in google play store incremented version code, generated apk with the same key, however, the store displays the following error: any tips on how to solve this problem?…
-
6
votes1
answer605
viewsWhy is it recommended to use "sp" instead of "dp" in text sizes?
Bearing in mind that when we use the unit sp in the TextView there’s always a Warning in this way: Should use "sp" Instead of "dp" for text Sizes In this Sopt response shows exactly the difference…
-
6
votes1
answer350
viewsCan you create an Expandablelistview with the Swipe effect?
I have a ListView which is composed of 3 ListView's chained. The first is a list of Year of release, which has a list of genres that in turn stores a list of movies. I wanted to have the option to…
-
6
votes1
answer6678
viewsChange APK subscription key on Playstore
Hi, I have an app on Google Play Store that was from another account and that went to my account, because it will not mess with it anymore and the customer asked us to work on the next version. The…
android ionic google google-play google-play-servicesasked 6 years, 3 months ago Alexandre Oliveira 135 -
6
votes1
answer1057
viewsHow to detect if the system supports hardware acceleration?
Currently I do this so that one of mine activity that require acceleration work: <application android:hardwareAccelerated="true"> <activity ... /> <activity…
-
6
votes1
answer51
viewsDetect implicit Intent action when the Android Operating System changes the time manually
I need to detect in my application when user changes system time manually. How do I do this? For example: If user restarts the device I can detect this event with on my Broadcast receiver so: if…
-
6
votes1
answer495
viewsHow to filter logcat by command line?
I was reading the android documentation and saw that it is possible to monitor logcat by command line, without necessarily having the IDE open. I installed a minimalist version of ADB (only what is…
-
6
votes1
answer7667
viewsAndroid - Datepicker in an editText
Next, I would like a date selector to appear as soon as I click on editText I have, but what I found automatically setting the current date, I want it to be chosen... Follow the code I’ve tried so…
-
6
votes1
answer500
viewsRefresh in Webview when rotating device
I created my application via WebView, but when I rotate the screen the site gives refresh, or is back to the login, my code: Mainactivity: package com.sirseni.simpleandroidwebviewexample; import…
-
6
votes3
answers1479
viewsWhat is this "Could not find method schedule(View) in" error?
I’m calling a method, when I click the button and this error appears, but I don’t know what it means: java.lang.Illegalstateexception: Could not find method to schedule(View) in a Parent or Ancestor…
-
6
votes2
answers1240
viewsWhat is the purpose of the Recyclerview.Adapter class when using Recyclerview?
To use the Recylerview Android we need to create a class CustomAdapter extending from the abstract class RecyclerView.Adapter then implement three methods that are: onCreateViewHolder…
-
6
votes1
answer3429
viewsUse Bundle and/or only putExtra?
To pass data between activity, have 2 forms: 1. Using Bundle: public void teste(View v) { Intent i = new Intent(this,Teste.class); Bundle bd = new Bundle(); bd.putString("site","google.com");…
-
6
votes2
answers490
viewsDifference between Activity and Content
I do not know if this is the right place for this, if it is not for guidance where I take this doubt. I’m learning to develop apps in Android Studio, and I’m following some tutorials. Some cases…
-
6
votes1
answer2441
viewsApplication does not work after generating . APK
I am facing a problem when trying to generate an app apk developed in Android Studio. After generating the . apk to install the app on other phones, the app is installed but does not open. On mobile…
-
5
votes1
answer1387
viewsDisplay a message when Listview is empty
I have a Listadapter that extends a Basedapter that works perfectly. When it is empty I wanted a message to appear any. Where to implement this validation?