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
-
3
votes2
answers10363
viewsWhat is the command to close or quit the game created in Unity?
I’m learning Unity and would like to know what the command to exit the game, ie close the application and also to know this command as I apply to press the back button of mobile Android execute such…
-
3
votes1
answer66
viewsQuestions on In App Purchase Android
I have two questions on In App Purchase... First wanted to know what it would be like to hide the key64 that talks in the test application you have in Android Studio, because it is not recommended…
-
3
votes1
answer530
viewsHow to view a video using Exoplayer?
I’m trying to implement the simplest example of Exoplayer (project link and Project Tutorial Link). However, after following all the steps of the tutorial, the application runs, but does not show…
androidasked 9 years, 6 months ago Juninho Cruz 165 -
3
votes1
answer404
viewsError in monetary mask, saved with the right digits but at display time 2 digits are missing
Colleagues! When I save the product gets the correct digits as on the screen above. However, when I enter the list of products and click on the product Scissors it opens on the registration screen…
-
3
votes1
answer33
viewsHow to rescue Edittext values created via script?
I have the following code that creates 4 Edittext in Layout: LinearLayout myLayout = (LinearLayout) findViewById(R.id.formulario); ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(…
-
3
votes1
answer181
viewsHow to download and import android v7-appcompat bookstore to Netbeans?
I’d like to know how to import to a project using Netbeans, the v7-appcompat android library. I’m using a study code and Net Beans isn’t recognizing some lines of code. public class MainActivity…
-
3
votes1
answer535
viewsNotification at a certain time with no need to open the program
package com.example.dell.notification; import android.annotation.TargetApi; import android.media.RingtoneManager; import android.net.Uri; import android.os.Build; import android.os.Bundle; import…
-
3
votes2
answers3168
viewsCount duplicate values in list
I have a ArrayList with multiple numbers inside it. I need to identify how many times each number appears and then eliminate redundancies. I was able to eliminate redundancies, but I’m having big…
-
3
votes1
answer6183
viewsHow to transform JSON into object array of a specific class, where this class has composite attributes?
I found the following problem when trying to transform a String JSON in object list. I have the following situation: I have a class Response which has some attributes, among them a list of "Post",…
-
3
votes1
answer85
viewsAVD Manager adjusts on display
Hello guys, I am using the intel x86 processor with a standard android Device 4.1.2. I just did the installation alone of the SDK and started the Device. As you can see, the display is all messed…
-
3
votes1
answer411
viewsHow to zoom in to a View image?
I am looking for the implementation of a zoom on the internet but do not think. I found just a zoom that is applied across the image. I needed this default zoom that you have in most apps that…
-
3
votes1
answer477
viewsIF condition is true but does not execute related code
I have my program that displays a message and in that same message the user must enter a code. I’m trying to validate whether he typed something or not, so I use the code: AlertDialog.Builder alert…
-
3
votes1
answer205
viewsHow do I know if there was a glitch in texting?
I have this method of sending SMS via app: public boolean enviaSMS(String fone, String mensagem) throws Exception { try { smsManager.sendMultipartTextMessage(fone, null,…
-
3
votes0
answers169
viewsPrinting houses in Bematech
I Googled but I couldn’t find any material that would help. How can I send a print from an Android app to a non-fiscal Bematech printer that is connected to a computer on the same network as Mobile?…
-
3
votes1
answer1897
viewsHow to find the operator of a mobile number?
I need to develop an application to make calls using a mobile chip, but for this, I have to know the carrier of the target number. You can discover the destination operator, programmatically, on…
-
3
votes1
answer155
viewsAsynctask causes a fatal error while executing the Ackground() method
The code does not present any error, but when I run it stops and presents a Fatal error at runtime in the Asyncloadxmlfeed class extending from Asynctask. follows the class code Asyncloadxmlfeed…
-
3
votes2
answers872
viewsHow to leave a Alertdialog with rounded edges?
When I want to make a Dialog customized I just put one layout inside it. But around it Dialog is square, someone knows how to round?
-
3
votes2
answers818
viewsHow to avoid restarting the screen elements when turning the phone?
I have an Activity with only one timer basically, and when turning the phone, the chronometer is reset. Is there an event that causes Activity to restart while doing so? I would like to prevent this…
-
3
votes1
answer2393
viewsTake the path of an image in the Gallery
How can I get the image path I just uploaded to then save to the database with the path? I took the image of the Gallery, right after with this image I wanted to take the path and save in the Sqlite…
androidasked 9 years, 5 months ago Gabriel Santana Bonatto 319 -
3
votes1
answer323
viewsSet maximum height for Alert Dialog
My dialog has a list, and when this list has many entries, the dialog cuts the buttons in the middle, as in the image : How do I set a maximum height not to get cut this way? Dialog code public void…
-
3
votes4
answers3938
viewsHow to open another Activity from a Navigation Drawer?
I need to call a Activity from an item of a navigation drawer. Anyone can help? These are the items I want to call for Activitys: public boolean onNavigationItemSelected(MenuItem item) { // Handle…
-
3
votes1
answer104
viewsNullpointerexception when trying to open database
I’m trying to include in DB an item that was selected, but when trying to open the database using the .open(); I’m getting an error of NullPointerException. After the user selects which item to…
-
3
votes1
answer722
viewsError while running an app in Android Studio
I imported a project from eclipse to Android Studio (version 1.3.2), until then all right, but an error occurred when I tried to run the program: Error:Execution failed for task ':dexDebug'.…
-
3
votes3
answers5170
viewsHow do I leave a round image?
I need the image to be round as well as the contact images of Whatsapp. I have tried to do some forms, for example with the tag < Shape>, but I didn’t get the right result. How could I get…
-
3
votes1
answer91
viewsAndroid app after several changes receives Sockettimeoutexception
I developed a menu app for Android, the waiter by the app sees all the tables, the app opens the table, makes the order coming out in the kitchen and so on. The web service returns a JSON for each…
-
3
votes1
answer5281
viewsHow to import an android project as a module in Android Studio?
I’m trying to import a project Android as a module of another project: But when I try to import, Gradle makes a mistake saying he can’t find the method android() in the archive build.gradle module.…
-
3
votes1
answer250
viewsFirst element in listview does not appear
I have a listview that lists through an Adapter. The list is updated after a Sqlite search. The problem is that it only appears from the second element of my table.... someone could help me?…
-
3
votes2
answers1845
viewsHow to recover the return result of a routine from within a Thread?
I need to run a routine within a Thread, and get the return of this method. My code is like this. class Main { public static void main(String[] args) { String resultado = ""; Thread t = new Thread()…
-
3
votes3
answers738
viewsHybrid applications optimize webview?
How the frameworks Do hybrids work? In my view what they do is they spin everything on top of the webview platform native, just packaging the JS code inside an application directory, such as Assets.…
-
3
votes1
answer3030
viewsHow to insert a library into a project in Android Studio?
I’m new to developing applications for Android and I found it really cool the idea of incrementing my applications with a kind of Intro as soon as they run. It was searching about it that I came to…
-
3
votes1
answer409
viewshow to work with different dimension in android studio?
I would like to adapt my app created for each mobile model. As I some it gets smaller text on the screen and in others larger, I would like to create a method where it adapts to the cell phone model…
-
3
votes1
answer74
viewsHelp with TCP Connection
I have a server that works with me and I connect to it by wi-fi but I need help to send commands to it, example sending a message using sockets or something like.
-
3
votes1
answer48
viewsIs there a downside to having a high number of Activities? What is the alternative?
I am a beginner in Android development and need to create a project with approximately 120 screens. Is it correct to use 120 Activities? What is the cost of this? There’s a more efficient way for…
androidasked 8 years, 6 months ago Marcelo Bmc 31 -
3
votes1
answer452
viewsHow to call an alert, a notification for user in Android application?
When the user clicks on an option he can receive an Alert saying, you selected certain command, certain option, how to make an alert of this type in an Android application?
-
3
votes2
answers1756
viewsReplication between Mysql and Sqlite (E vice versa)
I am developing a system that integrates a Mysql database with an Android application (through a webservice). I can already make connection, pass data, change them in the database through the App…
-
3
votes2
answers971
viewsProblems using the Edittext.setError() method
When trying to use the method EditText.setError() the error message does not appear. The code below is used to validate the required fields: public class LoginActivity extends Activity { private…
androidasked 9 years, 3 months ago Geison Santos 4,428 -
3
votes2
answers246
viewsUpload xml file to Gridview?
In my project, I need to select an XML file (table) from my tablet and then read its contents and show in a Gridview. I don’t know how to start, does anyone have any idea how? I think with the…
-
3
votes1
answer398
viewsAttach a photo to the email
Good morning to all, the doubt is as follows. I have some basic fields (name, phone etc), and an option to take pictures. I have already working sending email and the button to take photo, I can get…
androidasked 9 years, 3 months ago Daniel Kchevi 125 -
3
votes1
answer202
viewsExplanation about tags of Android components
I’m developing a app for Android. I found some tutorials to help me in the development but found some tags that I did not understand their proper explanations and when I should use each of them. Are…
-
3
votes2
answers1659
viewsSend notification message to app
I am developing an APP and I have the need to send warnings to users who use this APP. Example, in Apps of shopping websites , when a promotion appears a message arrives the App about the promotion.…
-
3
votes1
answer710
viewsSend HTML e-mail with Android formatting (style inline)
I am trying to send a personalized email through new Intent(Intent.ACTION_SEND), containing in the email body a formatted HTML, but when selecting the Gmail application, for example, the whole style…
-
3
votes1
answer484
viewsChanging the text of a Textview that is inside an Arrayadapter entry
I made a Adapter that extends of ArrayAdapter. My layout contains only a series of TextViews, one below the other, very simple. I want some event in the system to be watched by my Adapter and that a…
-
3
votes1
answer1091
viewsWorking with Base64 image in Android Studio
I have an app in Android Studio and would like to use Base64 image in Imageview and Imagebutton. I already know how to convert the image (from Drawable folder) to String, but I don’t know how to…
-
3
votes2
answers5650
viewsHow to turn on the camera flash?
I am not able to activate the camera flash to use as flashlight. The code I am running took from tutorials on the internet. package com.getten.home; import android.hardware.Camera; import…
-
3
votes1
answer161
viewsHow to receive automatically, in Activity, a value calculated in a Service?
I have an algorithm that generates prime numbers using a Service. Well, it works but I need it to update the data in my Activity automatically, at the moment it does this just by clicking on a…
-
3
votes2
answers639
viewsRegistration screen skipping field with "Enter"
I made a registration screen, but when the user gives enter on the keyboard it skips a line. Is there any way to block this ? Follow the prints for better understanding:…
androidasked 8 years, 4 months ago Artur Mafezzoli Júnior 441 -
3
votes2
answers252
viewsLogin to an Android APP
I am having trouble authenticating my user when the user is checked it returns me a successful response but my application does not exchange Activity. Just follow my codes: PHP: <?php…
-
3
votes1
answer250
viewsHow to check the battery consumption of a device’s sensors?
I am developing an application for Android, in which I will use the sensors embedded (for example, GPS and Accelerometer) of the mobile devices, only before I need to test the consumption of these…
androidasked 8 years, 4 months ago nandaah.munhoz 187 -
3
votes1
answer1208
viewsKeep the field hint visible when typing
In some apps like the ones shown below, the hint is not hidden when starting to write inside the field. In Gmail, it seems that the fields Of and To do not use hint are a combination of layout +…
androidasked 9 years, 2 months ago Geison Santos 4,428 -
3
votes2
answers37
viewsHow to send data to the constructor?
I need you to help me understand the object programming part. I needed to pass a value that was not inside the test object to know what was the choice of the utility. But once again I’m a beginner…
androidasked 8 years, 4 months ago John Lemon 31