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
-
12
votes1
answer2421
viewsWhat is the best way to store money in Sqlite?
Li that post on the lack of precision of double, and virtually every link in the post. Then I realized that this was a vulnerability of my software in production (since I have rounds to every corner…
-
11
votes2
answers3208
viewsDifferences and use of Strings vs. Charsequence
Many methods in Java expect parameters CharSequence, but the code runs normally when I pass a String without conversion, for example: String mensagem = intent.getStringExtra(MainActivity.MENSAGEM);…
-
11
votes2
answers2940
viewsDraw path on the map
How do I draw a particular path using the Google Maps V2 API? What I want is something more or less like this: I inform the street A and the street B and get the drawing of the path between these…
-
11
votes1
answer1299
viewsNo return of geolocation using Phonegap
I’m using the code to pick up the geolocation of the Phonegap, but even so, when I emulo the app, it returns me nothing. There is something wrong in the code? index.html <html> <head>…
-
11
votes2
answers7686
viewsHow the android:Ems attribute works (Textview)
I would like to understand how this attribute works (android:ems). I saw something citing that he acts on the source of the text, but I did not understand how. I tried to do some tests, and did not…
-
11
votes1
answer25900
viewsIs it possible to create Android apps using HTML5?
I really wanted to start developing applications for Android phones, but I have almost no knowledge about the operating system SDK, I have more knowledge about HTML, Javascript, CSS. I have in mind…
-
11
votes2
answers2958
viewsWhat are Loaders? How to implement a Loader to load from the database without content Provider and how to implement a custom Loader?
On the Internet, at least in my research, I found little material on Loader in Portuguese. That is why I record here this question, to have documented answers to the android programming community as…
-
11
votes2
answers35240
viewsHow to develop programs for Android through Python?
To develop programs for Android in Python it is necessary to build a framework in such a way that the application is executable on Android phones? I am new as Android programmer, I am studying and I…
-
11
votes2
answers210
viewsHow to detect USB connection via application?
It is possible to detect a USB connection in my Android application and how to do this? I have a sync menu that is performed via USB and FTP, however I want to make the USB option accessible only…
-
11
votes3
answers3031
viewsWhat better way to create an app that works offline and automatically encrypt data with a server?
I’m deepening into the world Mobile, where I had the first challenge, which is to create a App Android basic registration, name, age, etc. The tricky (at least for me) is that I have to update this…
-
11
votes3
answers533
viewsPure Java and Android App
I’m a beginner in Java. I preferred to start studying pure Java, that is, I discarded studying by dragging components. I met Javafx; I preferred to study the construction of these components at hand…
-
11
votes1
answer336
viewsWhy serialize object to send in another Activity?
What is the explanation for serializing the object both using the implementation serializable or Parcelable. I know this serves to create a new instance of the object in the other activity, but why…
-
11
votes1
answer486
viewsPush android with Amazon SNS
I’m trying to push an android app, but I’m not getting the push in my app. Manifest.xml <?xml version="1.0" encoding="utf-8"?> <uses-permission…
-
11
votes2
answers335
viewsSplit a String dynamically based on screen size
I’m working on an android app and at some point I get a string from a web-service that is quite large, and the client wants this String (which will be shown in a Edittext) be divided into multiple…
-
11
votes1
answer2979
views"java.lang.Securityexception: Permission Denial" on Android 6 Marshmallow (API 23)
I’m trying to register a broadcastreceiver so I can check a new sms that might arrive on the device. I’m getting an error only on android marshmallow in the following snippet of my code: public…
-
11
votes3
answers580
viewsProblem with the input click
I’m developing a hybrid mobile application, using HTML5 and JS. I have the following problem: when I click, for example, on Nickname, it opens the part of Sex. However, it is a very strange…
-
11
votes2
answers8134
viewsWhat is the right approach to get the click/position in Recyclerview?
What is the right approach to click on Recyclerview? 1 - Inside onBindViewHolder use position, even if within setOnClickListener methods, which turns the position variable into FINAL; 2 - Inside…
-
11
votes3
answers2941
viewsWhat is a View on Android?
The visual components of Android as EditText, Button and others, possess the Listeners to handle events triggered by actions performed by users. Therefore, in the method corresponding to the event,…
-
10
votes2
answers1364
viewsSqlite error on Android : error code 11: database disk image is malformed
I have a version of the App in production where it is allowed to mark a message as favorite, only that this totally random error happens provoking corruption of the database and resulting in…
-
10
votes3
answers17841
viewsImporting library in Android Studio
How to import a library into Android Studio? I have a project on Eclipse that uses libraries: zip_file library downloader_library needed to add APK Expansion Files to an application that has more…
-
10
votes5
answers2656
viewsHow to manage a Sqlite connection between multiple simultaneous threads?
So I’m facing some problems with my Sqlite connection, where I’m not finding a skilled solution. Setting My scenario is this:: I synchronize the data of my application with a legacy system, through…
-
10
votes1
answer11955
viewsDifference between Handler and Thread
I made a test app in which I would like to see a ProgressBar updating by simulating a long-duration task. I initially tried using Handler because after some research I saw that its use was…
androidasked 10 years, 7 months ago Androiderson 1,249 -
10
votes1
answer3183
viewsSave value in Sharedpreference
How I do to save and recover information in an Android Prefence file. Example String a = "stack overflow" int b = 32; boolean c = true;
-
10
votes2
answers9199
viewsTesting an application’s Internet connection
I have an app that connects to webservice but the problem is that when I have 3G, it is a mistake. When the connection is good, with a wi-fi for example works perfectly. I have some algorithms that…
-
10
votes2
answers1042
viewsHow to make the use instructions screen when starting an app
When we download an app, it often presents a screen (or several) of instructions to use the app itself?! I would like to know how to do that. If you can’t put some code address or tutorial, at least…
androidasked 9 years, 3 months ago Tairone Dias 318 -
10
votes1
answer500
viewsPick up news from a specific website
I am currently looking for a solution to implement a module in my App to pick up news from a specific website and show on the screen of the news module. Someone can show me a way?…
-
10
votes2
answers973
viewsEnable Proguard on Android app
I did an example project, using SQLCipher, and I’m trying to obfuscate the code with the Proguard, however, after exporting and signing the application, and converting the.Dex classes with the…
-
10
votes4
answers16860
viewsHow to get the current location of android device?
I am developing an android application that needs to get the current location of the device (Latitude, Longitude) and use this data in google maps...how can I do this? If you help me get only the…
-
10
votes3
answers694
viewsWhat best practices when implementing requests?
When implementing calls to a webservice I have been working with the following scheme: I implement a class that extends AsynkTask and within the method doInBackground() make the call to my service.…
-
10
votes4
answers6185
viewsWhat is the difference between match_parent and fill_parent?
When I am editing the xml layout I always get confused when choosing between the match_parent and the fill_parent, and I always end up thinking I’m doing everything wrong because I don’t know what…
-
10
votes1
answer751
viewsHow to send an audio file from Android phone to computer?
I’m working on an Android app that records the phone call on a mobile device. I just need to send a copy of the audio file to the computer via TCP/IP. I already have a function that sends text to…
-
10
votes0
answers558
viewsFacebook Login button has no action
I’m testing the Facebook Login API, but by clicking the button Log in with Facebook nothing happens, only the bar where it has the time turns black for a moment and then comes back with the color of…
java android facebook facebook-sdk facebook-apiasked 8 years, 11 months ago Giancarlo Abel Giulian 3,999 -
10
votes2
answers936
viewsOpen map at current user position
I’m trying to open Googlemaps in the current position of the user, I’ve done a lot of research and still can’t make it work in my project. I’m using Fragments to manage the layout. In the current…
-
10
votes1
answer257
viewsWhat are extended functions?
I’m writing an article on programming in Kotlin, I came across this name, which are extended functions?
-
10
votes4
answers14893
viewsAdvantage and advantage between onClick and setOnClickListener
I have a certain situation where we see that it is possible to create in the XML file a property called onClick: onClick: XML: <Button android:layout_height="@dimen/edittext_min_height"…
-
10
votes1
answer144
viewsHow to adapt my code to Android 4.1?
I’m making an app using Materialize. But a mistake is happening. The MENU is to work as in the second image. It is hidden with a TranslateX(-100%). And when I click on the MENU icon it opens the…
-
10
votes1
answer361
viewsPassport Session authentication on Android
I have a web app running with Nodejs, Express and Passport-JS authentication, and everything works perfectly. Now I’m developing an Android app and need to authenticate my users using the same API.…
-
10
votes3
answers6900
viewsWhat’s the difference between Return and break in a switch case?
In some situations it is necessary to practice the switch case for optimization and improvement of code. I have an application developed for Android using Java, which in case is used of both…
-
9
votes0
answers219
viewsSimulate Insufficient Balance Error in Paypal
I am developing an application for Android in which I need to integrate Paypal in the purchase part, I am using Paypal Sandbox to test, seemed to be working perfectly. I create my personal account…
-
9
votes2
answers9432
viewsCreating app that runs in the background
Some famous apps, among them Facebook, Whatsapp, Hangouts, use a service running in the background that does not end even with the disconnection/ connection of the device. My question is how to…
androidasked 10 years, 6 months ago Geison Santos 4,428 -
9
votes1
answer536
viewsWhy do we have to use mplements?
What’s the difference between using btn.setOnClickListener(new OnClickListener() { and public class MainActivity extends Activity implements OnClickListener{ I’ve been doing an Android course and my…
-
9
votes1
answer304
viewsRead message from USSD Android code
Using the API on Android is possible to communicate via USSD? It is possible otherwise? If yes how can I get, in Java, the reply message when entering a USSD code?
-
9
votes2
answers4470
viewsConvert date dd/mm/yyyy to yyyy-mm-dd’T'HH:mm:ss
How do I convert a date into format dd/mm/yyyy for the format supported by Sqlite yyyy-MM-dd'T'HH:mm:ss? Example: public static String converteStringEmData(String stringData) throws ParseException {…
-
9
votes2
answers5295
viewsReduce the size of an APK file
It is possible to reduce the size of an APK file by changing the way it is compressed? It is known that an APK file is just a ZIP file, signed and aligned. However, I performed some tests, and if…
-
9
votes2
answers3184
viewsblock "erasing" the screen for downtime
My application works as a guide for a professional illuminator, it works passively(responds via Bluetooth to user commands in your work tool) or offline where the user can operate it manually in…
-
9
votes2
answers3516
viewsWhat is the right way to authenticate to a REST API used by mobile applications?
Actually there are two questions (with the right to subquestions). Today I have an already implemented token generation engine (inherited from a web application) that I am using in my REST* API for…
-
9
votes1
answer907
viewsThread or Asynctask? When and which one should I use?
When it is recommended to use threads? At what point it is advisable to use the AsyncTask? I would like to know what to use and when to use it.
-
9
votes1
answer1656
viewsYoutube on Webview for Android app
Does anyone know how to view a Youtube video or any streaming video through a WebView? In the code below, there are three buttons. The first takes the user to the link he typed, the second is fixed…
-
9
votes6
answers19681
viewsHow to fix this error "Error cannot resolve Symbol R" in Android Studio
I imported a project made on Eclipse to the Android Studio and errors appeared in the code regarding the R with the following message cannot resolve Symbol R How to correct this error?…
-
9
votes2
answers731
viewsPriority in progress
It is possible to prioritize a progressdialog before a Thread? In my app, after clicking a button, I need to freeze a progressdialog for 2 seconds. After that, generate a query to my webservice, and…