Questions tagged as 'android'

2
answers

Google drive API on android, I can not make this example work

Researching the Google Drive API, I found this example that theoretically allows me upload an image to drive. The problem I have is that the following code: File fileMetadata = new File(); fileMetadata.setName("photo.jpg"); java.io.File file...
asked by 13.06.2017 / 17:02
2
answers

Handle the closing of an App on Android

I would like that when closing my application in the background, for example when making the swipe as in the following image: And later that when re-entering the application, it will continue with the active user session and leave me in...
asked by 09.05.2017 / 02:18
3
answers

Problem getting the ID name

I have several buttons, I assign this function, what I want to get the name of the ID depending on the botón that has been pressed, I could already get the whole value (of the identifier) but I need the String of the ident...
asked by 04.05.2017 / 23:23
3
answers

Firebase notifications

How can I make the firebase notification that arrives while the screen is off emit the sound I have in my raw folder. (if the app is in the foreground the sound runs without problem)     
asked by 01.06.2017 / 07:42
2
answers

WebView in a fragment Android Studio

I'm trying to show a web page in a web container, WebView, I've already done it but in a normal activity, now I want to do it but in a fragment, since I'm using a Navigation Drawer. I previously had the following code which worked well for me....
asked by 06.06.2017 / 23:01
1
answer

Bold text that I charge for SharedPreferences

I try to put in bold only the text I receive from SharedPreference but I do not know how to do it correctly, this is what I have always done but on a text, not on one loaded with SharedPreferences and so I see It is possible. con...
asked by 05.06.2017 / 22:51
1
answer

Error Only the original thread that created a view of the hierarchy can touch its views. on Android

After Android-Studio warned me that there is too much load on the main thread.    Skipped 113 frames: the application may be doing too much work on its main thread I have created a runnable to launch a thread with some processes:...
asked by 10.05.2017 / 15:14
2
answers

How to detect the rotation of the screen and change the data of the GridLayoutManager

As many of us know that when turning the screen of the phone or tablet what the application does is to load the activity again, I need to detect that turn and change the value of the GridLayoutManager and pass it to the recyclerview, the content...
asked by 18.11.2017 / 06:17
2
answers

Convert milliseconds to hour / minute / seconds on Android

Someone could see me an example of the CountDownTimer class for an hour / minute / seconds format, thanks. I tried this but it does not work contador.setText(""+String.format(FORMAT, TimeUnit.MILLISECONDS.toHours(millisUnti...
asked by 15.08.2017 / 01:20
1
answer

Implement a CountDown Timer in a service

I have a button that when pressed starts a countdown, and I want this account to be maintained until it ends even when the app closes or changes from Activity . I understand that one way to do it is to use a service in the background, but...
asked by 25.08.2017 / 03:19