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
answer87
viewsLike moving two buttons around?
I’m developing an Android app that’s basically a game. In one of the Activities there are some buttons, and I wanted that when an event occurred (including the trigger of another button) two buttons…
-
2
votes2
answers403
viewsWhy does the app close when I click edit1?
Guys the problem is this, I click on the button to create a new form ,edit1 gets the focus, digital keyboard appears when I click on the letter a for example the app closes, why is it? Anyone can…
-
2
votes1
answer42
viewsI want to know how to pass an object to Activity using the following code
public class PessoasDAO extends DataBase { public PessoasDAO(Context context) { super(context); public Pessoas findByPass(String senhaLogin) { String sql = "SELECT * FROM pessoas WHERE SENHA_PESS =…
-
2
votes2
answers190
viewsCheck connection at every instant
The thing is, I’m creating an app that depends on the internet connection for most services. To make it more dynamic, I thought I’d do something similar to the Youtube app. In the youtube app it…
androidasked 6 years, 7 months ago Andrei Coelho 6,196 -
2
votes1
answer49
viewsError using Asynctask more than once
I am developing an application for android that connects to a webservice, to make the connection part I used an Asynctask to avoid crashes, but when I run the application I can register the user…
-
2
votes2
answers826
viewsReturn to a previous Fragment from any Fragment
I have a main activity in which are called some Fragments: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);…
-
2
votes1
answer96
viewsWhite screen in transition between activities
I have a project in which I developed a method to save a reference to the activity current and when I used the HOME from the next screen, it returned to the activity using that saved reference. But…
-
2
votes2
answers48
viewsApp does not run on other phones
I developed some apps that ran smoothly on my mobile, but when I install in another just give the message that the app stopped and this error message in Android Studio. 05-17 09:03:55.571…
androidasked 6 years, 6 months ago Romão Gomes 143 -
2
votes1
answer66
viewsResponsiveness - Android studio
I’m having a layout incompatibility with other versions of android. on my android 8.0.0 the layout is like this On another mobile with android 4.4.2 I’m using recyclerview,grid,cardview dependencies…
-
2
votes1
answer44
viewsHow to make proportional screens on different phones on Android?
I’m taking a beating to get that answer, so who knows who around here can give me a little help... I need to place a certain screen, a background image, and a series of buttons superimposed on this…
-
2
votes2
answers1957
viewsbackground image of android screen
Good afternoon ! I am trying to put a background image in my application login screen, this image was downloaded from the site Unsplash, and when I put it in the background property of my layout the…
-
2
votes0
answers29
viewsSet a matching password?
Good afternoon, I’m making an android application to connect and communicate with an Internet via Bluetooth, my problem is regarding pairing, where I can’t set the password automatically to pair…
-
2
votes1
answer406
viewsError in findViewById declaration on Android
I’m new to Android and I’m having a difficult programming. That part of the code always error in R of findViewById. When placing the mouse over the error appears the information Cannot Revolve…
-
2
votes1
answer1192
viewsCount the number of records in firebase
Good morning Developers! I’m having a hard time in a project that I can’t move forward, here’s the problem/scenario: We have a screen that brings information, a message, and on the screen there is…
-
2
votes1
answer262
viewsHow do I send multiple values to a single Activity
Good morning, everyone, I have the following situation: I have 4 screens (Activity), they are: Mainactivity, Disiplinaactivity, Avaliacaoactivity and Resultfinalactivity. The point is, the data…
-
2
votes0
answers81
viewsHow to paste an excel list to android studio and get organized with break lines?
List in excel Relacionar o item Cidade Relacionar o item Afonso Bezerra Alexandria Alexandria Almino Afonso Alto do Rodrigues Angicos Angicos Apodi Apodi How to do this in xml? Because as a long…
-
2
votes0
answers22
viewsError @Databasefield + Abstract Class Ormlite (java.lang.Illegalargumentexception: No Fields have a Databasefield Annotation in class ***.Object)
I have a class that extends from the object class (abstract) from which I need to save the fields in the database, but the ormlite asks that the object class has some field with the @Databasefield…
-
2
votes0
answers101
viewsUnexpected end of stream
I’m consuming a webservice on android. But I’m having trouble with the following method: public static SoapObject Retornar_Lista_UFs(int pCodigo_Entidade) { Financeiro_NG oFinanceiro = new…
-
2
votes1
answer476
viewsHow to open a PDF file, which is in the Assets of my APP, in a PDF reader already installed on mobile phone?
I have an APP that needs to open some PDF files (laws) that should come along with the application. The idea is to call a Intent to open these PDF files by the PDF reader itself already installed on…
-
2
votes0
answers64
viewsChange drawer menu item color - Navigationdrawer
Hello, I wonder if it is possible to change the color of each item that comes in the drawer menu (Navigationdrawer) standard android. I know that choosing a project with this slider the android…
-
2
votes1
answer656
viewsTown Spinner connected with the State Spinner
I have 2 spinner in my application, one populated with the name of the states I registered in the database in firebase and another with the cities, they are linked by the state ID. I managed to…
-
2
votes0
answers274
viewsSend push notification with FCM direct from an Activity on android
Good night ! I’m having trouble adding the functionality of sending notifications to the users of the application, through the Firebase console these notifications are already sent and received,…
java android push-notification firebase-cloud-messagingasked 6 years, 4 months ago Eduardo Rafael Moraes 710 -
2
votes0
answers62
viewsAndroid Studio - Error using Bottomnavigationviewex methods
Good afternoon, I’m using the lib Bottomnavigationviewex to make a navigation bar for an Android app, but when will I use the methods "enableXXXX" and the "setTextVisibility" gives the error below.…
-
2
votes0
answers44
viewsAndroid Error: Apache Httpclient does not exist
Now it is mandatory by google to have in the code that updating where the version of targetSdkVersionto apply the latest API’s to applications. I changed the values of SdkVersion to 26 as…
-
2
votes1
answer103
viewsHow to transition to the previous Fragment when pressing the back button?
I’m having the following problem: I have an Activity, in which I call a Fragment as follows: FragmentManager fm = getSupportFragmentManager(); Fragment frag = new MyFragment(); FragmentTransaction…
-
2
votes2
answers58
viewsError while adding Youtube Player
I’m making an application that lists youtube videos , I created a layout to inflate in the main Activity and put the player in it <com.google.android.youtube.player.YouTubePlayer…
-
2
votes1
answer38
viewsCode before or after super
When screams a method, always comes the super of the parent class, but at the time of coding the right thing to do would be before or after it? In the example below the right would be this:…
-
2
votes1
answer228
viewsHow to resolve a synchronization with the server when there is connection drop on Android?
I’m making an application, where has a job registration in Sqlite that should be synchronized with the server in PHP with Mysql. After doing a lot of research, I couldn’t find any answers to my…
-
2
votes1
answer15
viewsHow to get Width of Imagebutton
How can I get the width of an Imagebutton defined in XML 0 being defined by weight? <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"…
-
2
votes2
answers104
viewsPriority running android thread
I have the following code for printing in P.O.S on Android; Before calling pass the data to thermal printing, I make the call to test if the printer has paper or is all right with it.…
-
2
votes0
answers113
viewsGoogle Credentials, Photos API
I’m trying to integrate an APP with Google Photos. By following Get Started you can see the following code: // Set up the Photos Library Client that interacts with the API PhotosLibrarySettings…
-
2
votes1
answer20811
viewsForced cancellation of an existing connection by the remote host
So guys, I’ve been breaking my head with this problem in Android Studio: 1 - I’ve already started adb:…
-
2
votes3
answers148
viewsTransform Jsonarray into Class Object
I am consuming an API in my application that returns me an array of names, I created a class to assign each name to 1 instance but I am having problems to take this Jsonarray and transform into…
-
2
votes0
answers169
viewsDynamically generate JSON from android form
Context: I have a Cordova app that there are SUS forms with more than 30 fields that is sent to the server through JSON. I’m building a native android APP for the same function; Problem: Need to map…
-
2
votes1
answer112
viewsHow to make a method wait for the java server response using Retrofit2?
Hello friends I have the following method that requests to the server: public MetaDataR metodo1(final String m) { Call<MetaDataR> call2 = new RetrofitConfig().getMetasService().getMetas(m);…
-
2
votes2
answers472
viewsError checking that fields are empty!
I’m trying to check if the product registration fields are empty, probably the error is in the declaration of if, that was to is returning the error message: "Unfilled fields, try again" With the…
-
2
votes0
answers46
viewsCommunication PWA vs Native Android App
Friends, I have an application for internal use in the company in PWA. And for a new demand we will need geo localization in real time. Features we do not have yet in the service worker and no…
-
2
votes1
answer148
viewsDifferent layout for portrait(portraint) and landscape(Landscape)
I got the following: package carcleo.com.cadastro; import android.app.Activity; import android.content.res.Configuration; import android.os.Bundle; public class Principal extends Activity {…
-
2
votes2
answers880
viewsUpdate only 1 item within firebase’s
I have the following knot in firebase: Inside this node I need to access the user value and change it, to do this I am using this code: firebaseSenha =…
-
2
votes2
answers2154
viewsConverting Int to String!
I am trying to recover some information recorded in the database, only when an error happens, because I am trying to take an "integer" value and pass to "String", then I am not able to do this…
-
2
votes2
answers1117
viewsCheck if a value exists in the Firebase Realtime Database
I have a database with this structure: what happens is that when creating a new user, I need to check if there is no longer a registered equal nickname, but I am not able to do this. Here’s the code…
-
2
votes1
answer97
viewserror when receiving JSON from url
Following the answer given to the question: Android: read JSON data Which is exactly the same problem as mine, I arrived in class: package com.example.carlos.radiosingular.classes; import…
-
2
votes2
answers60
viewsError in class object generation
I have the following method: private ArrayList Clientes (JSONObject jObect) { Log.e("Lis: ", jObect.toString()); /* A linha acima impime E/Lis::…
-
2
votes0
answers1478
viewsAdd App button on Home screen
Lately I’ve been seeing this button that’s at the bottom of the print Adicionar o app QuintoAndar à tela inicial present on some websites, when you click it add an icon of the site in the menu and…
androidasked 5 years, 11 months ago Vinnicius Gomes 115 -
2
votes2
answers345
viewsTesting web server connection - Android
I need to make a test connection with the web server, I am using this code below but all the attempts I made it always fall in the catch HttpURLConnection conn = null; try { URL url = new…
-
2
votes1
answer89
viewsCreate a protected directory in the device’s Storage
Through an application it is possible to create, edit and remove both files and directories, but we know that it is necessary for the user to give permission to read and write depending on the…
-
2
votes1
answer112
viewsUpdate fragment with Listview
I intend to "refresh" a fragment (fragment30.java) that displays the records of an Sqlite table after the deletion of one of these records . The records shall be submitted using a Listview…
-
2
votes1
answer173
viewsHow does an object return using addListenerForSingleValueEvent from fire base?
Hello, I would like to know if it is possible returns an object using Query.addListenerForSingleValueEvent() from firebase, follow example code... public static Passageiro getDadosUsuarioLogado() {…
-
2
votes1
answer293
viewsHow to create image animation by rotating, with decreasing speed, until it stops
I have this animation below in which an Imagemview rotates on its axis for 4 seconds. It rotates even with the same speed the 4 seconds. <?xml version="1.0" encoding="utf-8"?> <set…
-
2
votes1
answer138
viewsWhy does my program only work if I avoid parse Try catch?
I get a date from SQLITE but cannot understand where the error is, it is simply not visible. String dateValue = empDatadevolucao.getText() .toString() .trim(); SimpleDateFormat ft = new…