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
-
0
votes2
answers97
viewsApplication consuming too much server resource
I’m facing a problem with an app in Java for Android, the app apparently arrives at a point that consumes excessive server resource, if many users connect in the app reaches the point of taking down…
-
0
votes1
answer837
viewsPreview of Android Studio is not playing
I’m having problems importing a project that was written in an older version of Android Studio. My preview doesn’t appear. I’m a beginner and would like a little help! Follow Gradle and xml.…
-
0
votes1
answer206
viewsDatepicker date return problems
I’m using a datepicker for an application that will be used in the course, but when I convert it from int to Date, it returns the date 29/03/2018 as follows: Wed Sep 08 00:00:00 GMT 34 Code that is…
-
0
votes0
answers302
viewsError running setOnClickListener
I’m not able to do a simple BMI calculation. This is the error that appears in the image. Code: ButtonCalcular.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View…
-
0
votes1
answer218
viewsApplication closes when opening Activity
The app simply closes when I press the TextView. He should move on to another Activity. I’ve tried it many ways and it keeps crashing. package com.example.evellyn.auris; import…
-
0
votes1
answer31
viewsVisual error in Webview
I’m using a webview to expose my site, but on the sides it has two white bars as in the photo. Code: @Override protected void onCreate(Bundle savedInstanceState) {…
-
0
votes2
answers792
viewsI try to install React Navigation and returns a denied permission error
I tried to install the React Navigation module in my project with the following command: npm install --save react-navigation But the following error returns to me: npm ERR! code 1 npm ERR! Command…
-
0
votes1
answer47
viewsFATAL EXCEPTION main when using service on android
Good night ! I’m trying to generate a service that can identify when the screen of the mobile phone is erased or access, so I followed some tips to get to this point that is a simple test code, but…
java android broadcastreceiver android-serviceasked 6 years, 7 months ago Eduardo Rafael Moraes 710 -
0
votes1
answer100
viewsDevice location via bluetooth, android 6.0
I’m having difficulty with bluetooth, exactly with the location of other devices, given that this only happens with android over 6.0, because I tested on a device with android less than 6.0 and…
-
0
votes1
answer20
viewsDexarchivebuilderexception with Guava 21.0
I just received an Exception when I went to update the versions of the frameworks and run an application that was long stalled. My dependencies are these: dependencies { compile fileTree(dir:…
-
0
votes0
answers22
viewsEdit a contact within this agenda
I’m trying to edit a contact within my schedule. But when I save the edit it creates a new one. public class MainActivity extends AppCompatActivity { public static final String CONTATO = "contato";…
androidasked 6 years, 7 months ago Ygor Costa 1 -
0
votes1
answer413
viewsHow do I set a value in Edittext if empty?
EditText edit = (EditText)findViewByid(R.id.edit); //estabeleço o conexão if(edit.getText().toString().isEmpty()){ // verificando se a edit esta vazia String num = "6"; // Ou use um int, não vejo…
androidasked 6 years, 7 months ago Rafinha Castro 1 -
0
votes1
answer199
viewsI can’t adjust the image size to the layout
Hello I would like to change the layoutgravity of the image, which will always be filled on the sides and at the top. I change the layoutgravity but does not change anything. Example below: Screen…
-
0
votes0
answers463
viewsHow to solve Android Studio 3.1 upgrade issues
Hi, I updated Android Studio last week and after that it got complicated to work. It no longer identifies the Imports, no longer completes the code, Glade had stopped compiling but I was able to get…
-
0
votes1
answer303
views -
0
votes1
answer787
viewsHow to create and authenticate email and password in firebase?
I’m taking a class and I try to register the email and password, from this code, in firebase, but it is not created. I can’t get this authentication. The database I created to test if I was able to…
-
0
votes0
answers275
viewsHow to save checkbox on sqlite using recyclerView - android
So I have a project that has a checkbox list that when clicked would record in a column in the bank that items were marked, so far so good. Only I did not take into account the size of the list and…
-
0
votes2
answers371
viewsBuild Gradle Dependencies Version Conflict
I’m trying to use Firebase in my application, but it’s giving dependency error in Gradle. Build.Radle (App) apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin:…
-
0
votes1
answer38
viewsHow to get ACTION_ATTACH_DATA image
I wish I could fix this problem that I am, well come on, I’m making a simple Wallpapers app, which has its own online image gallery, the app is practically finished the problem now is, i want my app…
androidasked 6 years, 7 months ago Steve Rogers 322 -
0
votes1
answer89
viewsTitle in Scrolling Activity
Hello, I’m having a problem in the scrolling Activity. I would like to hide the title when the appbar is fully stretched and when retracted, the title is visible again. This is possible? my xml:…
-
0
votes1
answer82
viewsKotlin + RX Observer without Anonymous
I’m studying Kotlin Android and RX and I only see examples like : val api = StarWarsService() api.loadMovies() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe( {…
-
0
votes1
answer682
viewsHow to do error handling for outdated Google Play Services avoiding application crash on android?
I’m creating an app that uses Firebase, and which in turn uses the Google Play Services. In my tests, when the Google Play Services is outdated, it crashes the application and gives an error saying…
-
0
votes0
answers21
viewswanted to know how do I keep the stream running
Hi, I was wondering how do I keep the stream running, even if I go to another screen, or exit the application. More do not know how to do. Someone give me a hint and example. Thank you I’m using…
androidasked 6 years, 7 months ago Robson Cabral 33 -
0
votes1
answer45
viewsProblems to return objects in Parse using android
I’m having trouble returning the objects using Parse to connect to Heroku. When I search about returning objects, everyone tells me to use the following code: ParseQuery query = new…
-
0
votes1
answer100
viewsA service that runs every day in the background on android
Good afternoon ! Perhaps my question does not fit the criteria perfectly because it is another question whether "it is possible or not possible". Here is the problem: I want to create an app in the…
android services background android-alarmmanagerasked 6 years, 7 months ago Eduardo Rafael Moraes 710 -
0
votes1
answer182
viewsShared Preferences with Radio Button
I have a set of Radiogroup with 3 radios Buttons, and I need to save it in a Shared preferences. XML: <RadioGroup android:id="@+id/radioGroupOpcoes" android:layout_width="wrap_content"…
-
0
votes1
answer50
viewsIs it possible to simplify the Runnable command on an Android function?
I have created a class to facilitate the use of Dialogs, and I would like to know if it is possible to simplify further. My class is like this: public class FVRDialog { private Activity act; private…
-
0
votes1
answer337
viewsRecover user name and email in Navigationdrawer?
How do I recover the name and email of the logged-in user? I’m using Firebase BD. public class MenuActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {…
-
0
votes2
answers653
viewsHow the.setOnClickListener(view -> method() item works)
How does this item.setOnClickListener(view -> method());? I’ve never seen that kind of call, I saw it today and I was curious about that view, where does it come from? How does this type of call…
-
0
votes0
answers31
viewsDisplay the values of the android accelerometer in degrees
I am developing an android application that uses the ACCELEROMETER sensor. I need to measure the inclination in degrees. I was able to instantiate the sensor to measure it, display the X, Y and Z…
-
0
votes1
answer53
viewsDrag n Drop - Android
I made a Drag n Drop system, but when I insert the item, it seems that gravity is like top, when inserting new ones, they stand on top of each other, like drop where I drop the finger? The items are…
-
0
votes2
answers100
viewsNetworkonmainthreadexception error while recovering local IP from device
String netAddress = "000.000.000.000"; try { netAddress = InetAddress.getLocalHost().getHostAddress(); } catch (Exception e1) { e1.printStackTrace(); } ipLocal.setText(netAddress); I am trying to…
-
0
votes1
answer45
viewsCycle for only runs once inside a while and should always be run
listaA = new ArrayList <>(); boolean n = true; while (listaA.size() < listab.size()) { Log.i( "while ordena" , String.valueOf( listaA.size() )); valorAl = nRandom.nextInt( listab.size() );…
-
0
votes0
answers118
viewsMultiplos Broadcast Receiver
I am writing an Android app and need to recognize various system status like connection , battery status and some other, my doubt would be, how to create a function for that? i created the following…
-
0
votes1
answer29
viewsItemclicklistener not available
I’m creating a project that shows a list of equipment through a Recyclerview. When clicking on an item of this Recyclerview, you would need to open a new screen with details of the clicked item. The…
-
0
votes0
answers179
viewsError making android HTTP request
I’m implementing a native android app that requests with a WS. When trying to make the connection in the method connect() of HttpURLConnection I’m getting an error that doesn’t fall into the catch…
-
0
votes1
answer65
viewsHow to pass a String to an imageview
I have a big doubt, I passed an image from one screen to another and captured his URL, but I need to transform it to Bitmap, and exhibited it in a Imageview. Follows my code: public class…
-
0
votes1
answer335
viewsRun sql file with Sqlitedatabase Android
I am implementing in an Activiy the download of an sql file from a server on the web. The Download I’ve managed to do and is working smoothly. However, taking this downloaded file and having it run…
-
0
votes1
answer1389
viewsRecover Data from Firebase in Recyclerview
I need to recover from Firebase in Recyclerview user order requests in a way that organizes these requests in a list without overwriting the other one. For now my list is static. Each user has an id…
-
0
votes0
answers88
viewsSimpleadapter (JSON with sub-items)
I’m new to Android development, and I’m trying for days to make my first app work but without success. I am using Asynctask to make the request and Simpleadapter, it back the data but my JSON has…
-
0
votes0
answers39
viewsPassing data with Linearlayout onClick
In the software that I am developing when client click on an item in my Recyclerview, I would like you to call another Activity showing the item photo, price, description and would have him choose…
-
0
votes0
answers198
viewsAndroid Mysql Connection - Error with POST Method
Good night! I am developing a simple interface in Android Studio to login and register users. I followed the steps of a tutorial on youtube and almost everything works perfectly, I’m just having…
-
0
votes1
answer109
viewsExchange of information between Recycleviews
I have request tabs where "RECEIVED" retrieves data from Firebase BD inside a Recycleview. Request made by a user and received by the company. Now how do the items below: 1 - The company…
-
0
votes2
answers218
viewsApp hangs after ending loop in Thread
Hello, I made an app in Android Studio that breaks the phrases in words and stores in an array using split. Then I made a loop of repetition using while so that it displays word for word, but there…
-
0
votes0
answers27
viewsHow to automatically reset items when item is visible or invisible
Example: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"…
-
0
votes1
answer151
viewsLogin Screen Error - Xamarin Forms Visual Studio 2017 Android
I’m having a hard time finding the content of the Element Entry and compare to the value being stored in the BD Sqlite. Follow the code of my class Usuarios: public class Usuarios { [PrimaryKey,…
-
0
votes0
answers129
viewsDynamic listview with checkbox
How to add checkboxes to items in a dynamic list? I’m developing a school attendance app and this is my class to add students: public class AddAluno extends AppCompatActivity { BancoAlunos…
-
0
votes1
answer63
viewsAsynctask Android generating Nullpointerexception
I have this static class in an Activity where its function is to download a file and save it on the user’s device. I tested on a real device in the version of Android 7.1.1 and 4.1.2 and worked…
-
0
votes1
answer86
viewsC++ Character buffer adding no characters
Well, I have an application for android that uses Opengl ES 3.1, I did all the procedure to compile the shaders, I decided to put them in a separate folder in Assets, to recover the content I am…
-
0
votes1
answer144
viewsHow to edit the position of Floating buttom
This is the XML of my layout <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"…
androidasked 6 years, 6 months ago Paulo Eduardo 31