Questions tagged as 'android'

1
answer

How to authenticate in site via HttpUrlConnection to get access to JSON method?

I have an Android application that should request a JSON to a web application, however to access the method it is necessary to log in to the site. How do I perform this identification via code? Webservice.java package br.ufscar.dc.contro...
asked by 16.08.2015 / 02:31
1
answer

How to use a custom Adapter in the android ListFragment

Hello everyone, I'm having trouble using a custom Adapter and displaying this Adapter in a ListFragment . My Custom Adapter public class UsuariosAdapter extends BaseAdapter { Context ctx; List < Usuario > usuarios; p...
asked by 29.07.2015 / 16:40
1
answer

How to play a sound using Mediaplayer?

How can I create a button with SoundEffect using the MediaPlayer class or any other android class? I tried using the following code that I found some examples, but I did not succeed. public void playMusic(){ if(player == null){...
asked by 09.11.2015 / 22:45
1
answer

Implement editing of contacts after being written to the database

Hello I'm adapting a aplicativo that manages contacts with banco de dados interaction. No aplicativo , I'm inserting and deleting contacts but I'm having trouble implementing método to edit the contacts and save the ed...
asked by 30.10.2015 / 03:03
1
answer

Customize webView error page android

Please have a webview in my android app, how can i customize it if the user does not have internet? Thanks Current webcview code: WebView wv=(WebView) findViewById(R.id.webView); WebSettings ws = wv.getSettings();...
asked by 23.10.2015 / 12:55
1
answer

I have a fragment that renders an xml but if there is no record I want it to render another page (xml)

I'm new to android and I do not know how to do that. Here's a little bit of my code. I'll check if there are no records if the list is not empty. If it is empty I need it to render the other page with no records. How can I do this? public Vie...
asked by 15.03.2017 / 15:06
1
answer

How to write the percentage symbol in a string in Java?

How to make the string accept the percent symbol ' % '?     
asked by 23.05.2015 / 17:35
2
answers

Android Studio - No accent appears

Hello, I have a very strange error in Android Studio, suddenly it stopped accepting the accentuations in the string and comments, when I try to type for example "a" it only shows "a". I've tried everything in File Encoding and nothing. can anybod...
asked by 12.01.2017 / 15:06
1
answer

Because the compiler warns me Anonymous new Runnable () can be replaced with lambda

Because this code ( Thread ) shows this message ( in the compiler ), and how do you not show it again? Code: public void onCreate(Bundle icicle) { ... mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {...
asked by 03.07.2015 / 01:46
1
answer

Android notification

I have a very simple test project that in the onCreate event of screen 1 sends a notification, which upon clicking opens screen 2. Proposedly, I quickly click on the notification to open the new screen (testing purposes) by doing some sort...
asked by 03.07.2015 / 16:46