Questions tagged as 'android'

1
answer

Notification at a certain time without opening 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 android.support.v7.app.ActionBarActivity; import a...
asked by 15.05.2015 / 15:04
1
answer

IF condition is true but does not execute related code [duplicate]

I have my program that displays a message and in the same message the user must enter a code. I'm trying to do the validation if he typed something or not, for that I use the code: AlertDialog.Builder alert = new AlertDialog.Builder(context)...
asked by 20.05.2015 / 19:29
1
answer

What is the setProperty method of the System class on Android?

In my case I used this way: System.setProperty("file.encoding", "UTF-8"); Would it be the language ID used?     
asked by 24.05.2015 / 20:16
2
answers

Android: Saving data to files

I'm having trouble using files on android. Save the file and use it quietly to close the application, when I open the app again the file is recreated and I lose the recorded data. I tested several solutions, I have this code now: public...
asked by 04.01.2016 / 13:55
2
answers

Error saving data from an sqlite registry

I'm having trouble saving data from a people record in sqlite JavaNullPointerException: invalid int: (51) 3452-2470. This error started to occur after I applied a mask. Here are the codes below. import android.text.Editable; import android.tex...
asked by 28.12.2015 / 06:19
1
answer

How to add ellipsis if content leaks from Android layout?

How do I add ellipses if content leaks from the Android layout? For example: I have a very large text in my ActionBar , and instead of having to decrease it in size, I want it to add ellipsis if there is a layout leak, for example from "Firs...
asked by 04.06.2015 / 16:04
3
answers

How do I prevent an application running in the background from being stopped by the user?

For example, an application that requires the cordenings of the device every 30 seconds and runs in the background, and the user can not force the device to stop manually.     
asked by 01.10.2015 / 00:54
2
answers

How to retrieve a string-array item within the layout of my activity, in the "xml" case?

I created an array of strings in xml in my folder strings.xml, now I want to know how to retrieve a specific item according to its position, both in the Java source itself and in the XML code ... code in the strings folder: <string-array...
asked by 11.04.2015 / 14:09
2
answers

Close Previous activity makes application faster?

I was developing an application for Android and I had a question: In my main class MainActivity I have the setContentView function that initializes my screen, but if I want to open other Activity I need to close the previ...
asked by 13.02.2015 / 22:48
1
answer

How to print on Android through a bluetooth printer?

I've been searching and found nothing to print on Android through a bluetooth printer. Is it possible to do that? Is there a library or SDK?     
asked by 06.11.2015 / 16:42