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
-
2
votes1
answer210
viewsRemove the notification "App is running in background"
I fixed my app to work in the background with android 8 however many customers came to uninstall the application because of the permanent notification "App is running in background". I need my…
-
2
votes2
answers82
viewscode decrease
Is there any other way to accomplish this code? This code is very repetitive, I wanted to know if it is possible to decrease and make easier the understanding. if (games.getBallId() ==…
-
2
votes1
answer1551
viewsHow to make monetary mask on Edit Text Android
Good morning gentlemen, I’m having trouble putting a monetary mask on an Edit Text, I checked several forums and tutorials but no method worked. My project is to basically make the customer put the…
-
2
votes0
answers61
viewsTake the value of Try and fix to Return
I would like to redeem the result value that is inside Try, the code is correct directly in Activity, but when I put in asyncTask I cannot set it in the Return result;. Follows the code AsyncTask:…
-
2
votes1
answer187
viewsHow to open an Activity when you don’t have internet?
I’m with a project that uses internet, and when there is no internet the same does not leave the menu because I put a lock access to other activit when there is no internet, but in did not open I…
-
2
votes2
answers217
viewsGo back to the previous Fragment by clicking the Back Phone button?
I’m trying to implement the functionality of going back and appearing to me the fragment in which I was previously. That is: fragment1, Fragment 2, Fragment 3 and Fragment 4. I can go from Fragment…
-
2
votes1
answer2120
viewsIssue when publishing app to Google Play Console
Friends would like a help, I am publishing for the first time an app in the play store, I created the app running perfectly, I already have a Google play console account, I created the app but when…
-
2
votes0
answers130
viewsWhy does an integer not format correctly (Kotlin/Java)?
I use the Android Studio 3.4.2. I ran a test code that generates a very strange format. This excerpt was placed right after the beginning of the onCreate. And it’s a pure integer! fmtFloat =…
-
2
votes4
answers1329
viewsReact-Native run android
Hello guys I’m starting a project with React-On but I’m having serious problems so far in trying to run the code in the emulator of android studio, so far I have not made changes in the project…
-
2
votes1
answer209
viewsError while creating tables simultaneously in sqlite database
I’m developing a mobile application that saves data from a form in the local database, using the sqlite. Only every time the database is reset or changed its version it returns me an error that…
-
2
votes1
answer149
viewsNOTIFICATION_SERVICE with Channel=null error, how to resolve?
I did work perfectly this notification on android 19 and 21 but does not work on 27, 28 e 29. <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> private void…
-
2
votes1
answer102
viewsMessage from "Empty Child" on an Expandable Listview on Android
I want to create a statement to the user stating that a Group of an Expansible Listview does not contain any Child (That the group is empty) as in the image below. Searching the net, I noticed some…
-
2
votes1
answer32
viewsRepeated id’s in different xml layouts on Android
I am developing app and noticed that I can put the same id in two different xmls. For example: Imagine a Textview. In the 1st Layout I define your id: <TextView android:id="@+id/textViewExemplo"…
-
2
votes1
answer357
viewsPass parameters in the Retrofit2 GET method for Android
Talk to me, baby? I’m trying to pass a parameter in the retrofit, but I’m not getting it. I confess that I’m very beginner in Android. I did a little research, but what I tried didn’t work out so…
-
2
votes0
answers164
viewsHow to transfer a file(db) from Android to PC using Delphi(Firemonkey)
I am using Delphi Tokyo 10.2.3 for Android programming, Firemonkey deputy (FMX), I need to create a code that is possible inside the App on android can transfer a file in case the Database to the PC…
-
2
votes2
answers56
viewsAdd element to an Arraylist only if it does not exist (Android)
I am programming a bluetooth app in Android Studio. I have an arrayList and I place devices that have been discovered in a bluetooth connection. It turns out that when I perform the task of…
-
2
votes2
answers748
viewsError Type 3 - Activity does exist
Every time I try to run my app on AVD or on my phone to test the following message appears to me: Error while executing: am start -n "com.example.vantajoso/com.example.vantajoso.MainActivity" -a…
-
2
votes0
answers94
viewsHow to remove BOM (Byte-Order-Mark) from multiple UTF-8 files?
I have several files in UTF-8 with BOM(Byte-Order-Mark) and I want to remove several at once. The need is that I have an Android project created in Eclipse and need to perform a migration to Android…
-
2
votes1
answer67
viewsATM simulator in Android Studio
I’m setting up a basic ATM simulator in Android Studio, where the user must enter the password, which is already pre-defined, in the case is "Java". If the password is correct, the message "Correct…
-
2
votes1
answer1938
viewsWhat’s the difference in having a JKS or a PKCS12 subscribing to my Android app?
I was generating a Keystore for my application by Android Studio and received the following warning: Key was created with errors: Warning: The storage of keys JKS uses a proprietary format. It is…
-
2
votes1
answer58
viewsHow to always register data in the last generated Event?
In my code every time I perform a criminal record a document is created. I wonder if you have how to register information in the latter document generated instead of generating another. I’m doing it…
-
2
votes1
answer218
viewsMethods for changing orientation of the UI Automator Framework do not work
The methods setOrientationLeft() and setOrientationRight() below simply do not work, both on emulated devices and on physical devices. I would like to know if there are any rules for using sponges…
-
2
votes1
answer608
viewsConvert date from one format to another
I’m making an application for Android that uses the Apoid API of NASA. To do this, the user enters a date, and when clicking the button, a photo of the galaxy referring to the date typed appears.…
-
2
votes1
answer27
viewsDoubt regarding Textwatcher - Android
all right? I’m having trouble with the Textwatcher. Like, I created two "plaintext" that I named "et_texto1" and "et_texto2", when I write something in "et_texto1" it has to appear the word…
-
2
votes1
answer249
viewsKotlin - How to wait for the user to return a function called inside the while loop
I have an algorithm that via console helps the user in sorting a list of items, it works well for the console (code below), but I’m adapting the interface to become an app (as print) I wanted that…
-
2
votes0
answers26
viewsRecovery of Images in Firebase Storage "Failing" Randomly
I am creating an app in which in the main Fragment a Recyclerview displays a list of registered animals. Images are being saved to Storage with the name = Animal Id + ". jpeg". I retrieve the list,…
-
2
votes1
answer42
viewsFiltering a list with elements contained in another list
I have the class class estruturaPosicaoXY(val x: Float, val y: Float) {} then fill out a list of that class through the method: fun mapearXY(x: Float, y: Float): List<estruturaPosicaoXY> { val…
-
2
votes0
answers23
viewsTextview does not show all the long text, no automatic line break
Textview name does not show all text, name text is dynamic, I’ve tried to leave it with multiple lines but it didn’t work. <?xml version="1.0" encoding="utf-8"?>…
-
2
votes0
answers14
viewsHow to Resolve Android Studio Error while Trying to Play MID File
Hello. I’m learning android and I’m trying to play a file. MID in my app. On Activity Main has this code: package com.micsgsoftwares.exemploplayermusic; import…
-
2
votes0
answers27
viewsHow can I set 10 items per listview?
Hello, I would like to know how I can show 10 items per page in listview? Adapter: ThreadsAdapter(@NonNull Context context, int resource, @NonNull List<MessageThread> objects, ThreadsActivity…
-
2
votes1
answer39
viewsMethod into classless files. Flutter
Guys I came across a code inside a flutter file (Dart) that left me with some doubts, is a classless Dart file with only one method declared. I tried to look at the documentation but I guess I…
-
2
votes1
answer42
viewsReceive response Okhttp KOTLIN
I am trying to process the data received from an external API. I have two files, one responsible for making the request, and the main one to call the function, but I can’t pass the data return to…
-
1
votes3
answers1261
viewsWhat does "android.R.id.content" mean?
I’m following a tutorial here and it references this in this line: getSupportFragmentManager().findFragmentById(android.R.id.content); What is the meaning of this identifier?…
androidasked 10 years, 9 months ago user3174 -
1
votes1
answer223
viewsHow to make maps work on old and new Apis at the same time?
I’ve been struggling for over a month to make a simple app that shows a map work. I managed, according to another post, to work in version 3.2, but not in 4.1 and, by the comments of friends, this…
-
1
votes3
answers300
viewsAndroid Development Profile (Profile)
I was taking a look here and I still can’t find out if there is a way, I believe you also go through this. When we are developing an application that uses some service, we have somewhere in our code…
-
1
votes2
answers1054
viewsKeeping an item from a selected Listview when pressed
I’m developing a listview, and I need to leave a selected item when I click, and then take the position of that item, in order to do the inversion of two items, which is up with what is down for…
-
1
votes2
answers1222
viewsHow to pass the application context to the Adapter by reading Json using Asynctask?
private class GetEmpresas extends AsyncTask<Void, Void, Void> { ... @Override protected Void doInBackground(Void... arg0) { // Creating service handler class instance ServiceHandler sh = new…
-
1
votes1
answer125
viewsHow to apply a texture without distorting?
I have a texture like this, which I will apply in various different shapes and sizes, plus table background and table rows. How to apply it in various sizes without distorting? It is possible? NOTE:…
androidasked 10 years, 9 months ago Marckaraujo 149 -
1
votes2
answers864
viewsHow to get the registry ID that is populated in Listview
How do I get the Listview ID? Follow my shorthand code: UPDATE How do I get the REGISTRY ID that is populated by Sqlite in Listview. public class MainActivity extends ActionBarActivity { private…
-
1
votes2
answers569
viewsHide and show the header of a listview when scrolled
I’m developing a app for Android using Android Studio, and want a listview with header where the header is hidden when the list is scrolled down, and it appears when scrolled up regardless of the…
-
1
votes3
answers2228
viewsHow to make a simple square on Android?
Can you make a square full of one color without all the complications? I say complications, because the examples I see here on the internet requires you to create another class, inheriting from the…
androidasked 10 years, 9 months ago brazilianldsjaguar 3,303 -
1
votes1
answer1290
viewsConversion of ASCII code to characters does not work
First of all, I’m new to developing Android. I would like to know why my application hangs when I try to convert ASCII code to characters. private String crip(String str, String psw) { int code = 0;…
-
1
votes1
answer1289
viewsPhonegap app does not install on device
Working with Phonegap/Ordova and finding documentation for it in Portuguese is very complicated, so asking questions about problems faced will help enrich with content. My problem is being when…
-
1
votes3
answers878
viewsUnsuccessfully installing an app on a Genesis GT-7240 tablet
I have a tablet Genesis GT-7240, whose Android version is 4.1.1, Kernel 3.0.36+. Man manifest.xml has <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="17" /> I’m trying to run a…
-
1
votes1
answer360
viewsRepeat the animated background
I made an app with an animated background, here’s the code: Main layout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"…
-
1
votes2
answers241
viewsHow to know if the keyboard (Keyboard) is visible?
Is there any method that tells me when the keyboard appears and disappears?
-
1
votes2
answers189
viewsChrome Mobile Android [Add to Homescreen]
Today I discovered that I can make a page as a native APP, with shortcut in the homescreen, opens almost in full screen... I did a test and it worked, now I need to make it work 100% fullscreen,…
-
1
votes1
answer233
viewsBroadcastreceiver - how to register for addProximityAlert method
The snippet below has the mission to give a warning to the user if he entered an area of terrain that is a circle around the given geographical coordinates: double mLatitude=35.41; double…
-
1
votes1
answer160
viewsWidget layout is not working
I wonder why this layout is not displayed in my widget: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"…
-
1
votes3
answers942
viewsHow to change the theme of an App to Android to look like iOS?
I’m developing an app Android and would like to use a theme that makes it similar to iPhone (iOS). Is there any place where I can get this theme or simple way to implement it?…