Posts by JBarbosa • 881 points
38 posts
-
2
votes1
answer232
viewsQ: Mongodb seeks to return internal arrays
Example of structure: { "_id" : ObjectId("598d4eb912f28534d80a5820"), "nome" : "Emilio", "produtos" : [ { "_id" : ObjectId("598d4fb912f28534d80a5821"), "nome" : "produto1" }, { "_id" :…
-
0
votes2
answers1027
viewsA: Stream video mms or rtsp:// on android
Years later arose libs for this: https://github.com/pedroSG94/rtmp-rtsp-stream-client-java…
-
0
votes0
answers422
viewsQ: Updating a list of documents in mongodb
I’m trying to update a list of objects similar to this: var lista = [ { _id: 57ea29361b297553c99d702f, nome: 'Meu nome', __v: 0 }, { _id: 57ea29371b297553c99d7031, nome: 'Meu outro nome', __v: 0 } ]…
-
1
votes1
answer74
viewsQ: Image framing
I’m trying to put a 704x480 image in an Imageview, but it’s floating with spaces above and below. Ex.: <?xml version="1.0" encoding="utf-8"?> <LinearLayout…
-
1
votes0
answers22
viewsQ: Security with Accountmanager
I am using the following method to collect the user’s email for authentication (email only) in my app: AccountManager.newChooseAccountIntent(null, null, new String[]{"com.google"}, false, null,…
-
0
votes1
answer71
viewsQ: Copying an attribute from a list in java
Copy example: List<MyObject> listaDeObjetos = new ArrayList<>(); List<String> nomes = new ArrayList<>(); for (MyObject obj : listaDeObjetos) { nomes.add(obj.getNome()); }…
-
0
votes1
answer137
viewsQ: Cardview in API 10
With normal background: When changing to another color, a line below the Textview: xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"…
-
4
votes2
answers79
viewsQ: Reusing string in XML
Ex.: <?xml version="1.0" encoding="utf-8"?> <resources> <string name="primeiro_nome">Bigown</string> <string name="nome_completo">{primeiro nome} Silva</string>…
-
2
votes2
answers814
viewsQ: Checking Time in java
Given a list of times ex.: String[] times = {"11:00", "12:00", "13:00"}; I want to take my current time and compare with the list which is the next hour, eg.: current time is 11:30, taken from the…
-
0
votes1
answer72
viewsQ: Screen guidance on android
I have an Activity that has is declared in the manifest as Portrait, and I have an image gallery, where when clicked on any of the images I launch this code: getSupportActionBar(). Hide();…
-
4
votes2
answers1267
viewsQ: Size of an Arraylist
In Java... What is the initial size of a ArrayList? Reaching the maximum size, when it "expands", its size is doubled?
-
4
votes2
answers1027
viewsQ: Stream video mms or rtsp:// on android
I’m looking for some lib to play video stream in the format mms://..., I’ve tried with Videoview but says it does not support this format(Windows media player), looking for apps (in google play)…
-
0
votes1
answer285
viewsQ: Intersection and Subtraction Groupings
I have a question regarding regular expressions. I do not understand how intersection and subtraction work in regular expressions. Could someone enlighten me? [a-z&&[aeiou]] Interseção…
-
9
votes2
answers13289
viewsA: How to indent code in Android Studio?
To ident the code has the shortcut: CTRL + ALT + L, (or if you prefer select the code you want to identar before). To increase the source: File Settings Editor Colors&fonts Font. Go to Save…
android-studioanswered JBarbosa 881 -
1
votes4
answers2193
viewsA: How do I search a value within a String?
This is a two-dimensional array/vector string, where it can be accessed like this: table[ROW][COLUMN] table.length , retorna o tamanho da linha. table[0].length , retorna o tamanho da coluna. Now…
-
7
votes1
answer329
viewsQ: Polymorphism in Java
Example: // Super classe: Carro abstract public class Carro { String nome; public void andar(){ // anda } } // Sub classe: Fusca public class Fusca extends Carro { public void andar(){…
-
2
votes1
answer418
viewsQ: How to minimize the reduction of compatibiliade due to the use of permissions?
In my new version when putting these permissions in Manifest, I had a reduction of compatibility with various devices, would have some way to check this or who does not have support for these…
-
0
votes0
answers54
viewsQ: How do I identify where the flaws that Google Analytics returns occur?
I am receiving by Google Analytics the following flaws: NullPointerException (@ViewGroup:dispatchDraw:2879) {main} NullPointerException (@ViewGroup:dispatchDraw:2859) {main} But I don’t know how to…
-
1
votes1
answer2014
viewsQ: super.onBackPressed() or Finish()?
What is the difference between the methods? in the case of super.onBackPressed() can only be used within the right onBackPressed() method?
-
1
votes1
answer100
viewsQ: Automatic process in PHP
I wanted to know how to (and if possible) leave something automatic occurring in PHP. My idea is, a site where it automatically collects data from another site and stores it in a database only…
-
4
votes2
answers3962
viewsQ: Taking System Time in C
I want to take the time of beginning and end of a for. Ex.: #include <stdio.h> #include <time.h> int main () { time_t rawtime; struct tm * timeinfo; int i, j; time ( &rawtime );…
-
5
votes1
answer380
viewsQ: Adding libs on android with eclipse
I usually take the jar and put it inside the lib folder of my project, but I’ve seen people who do the same thing and add it by "Java Build Path/Add Jars...", it’s different to just put it in the…
-
1
votes2
answers736
viewsQ: How to return global variable within a Requesttask class
Well I use the Requesttask class to do some things like: protected string doInBackground(String... Uri) protected void onPostExecute(String result) so I want to return the variables to do other…
-
1
votes1
answer492
viewsA: Changing the title color of my application
Solved :) <style name="MeuAppActionBarTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar"> <item name="actionBarStyle">@style/MeuAppActionBar</item> </style> <style…
-
0
votes1
answer492
viewsQ: Changing the title color of my application
I have tried various codes to change the color of the title that is in the application’s actionbar, but nothing, I think it’s simple, but I can’t figure out how. use the "Theme.AppCompat.Light"…
-
2
votes1
answer124
viewsQ: How to show ad when closing my app
I want to show my ad when the user presses to "return" where I should release this code: Adbuddiz.showAd(Activity);
-
3
votes2
answers161
viewsA: Exporting my project, proguard error
I solved my problem by adding in proguard.cfg the following code: -dontwarn android.support.** based on that explanation: https://github.com/exmo/equizmo-android/wiki/Ofuscando-aplicativos-Android…
-
2
votes2
answers161
viewsQ: Exporting my project, proguard error
Exporting without proguard all occurs normally, but when active this error: [2014-09-14 01:59:01 - meuapp] Proguard returned with error code 1. See console [2014-09-14 01:59:01 - meuapp] Warning:…
-
-1
votes1
answer94
viewsQ: Social Networks in my app
Good I want to add two buttons where the user would share a phrase on facebook or twitter with my link app(via app...), do not know where to start.
-
0
votes1
answer71
viewsQ: Passing String between classes
I got my main class where I got ... String ola = "Hello fellas"; and I have my other class: public class NotificacaoDiaria extends BroadcastReceiver { @Override public void onReceive(Context arg0,…
-
0
votes1
answer484
viewsQ: Setting a view at the bottom
Currently I use this code to put Adview in the Bottom, but when adding a Scrollview, it is fixed at the bottom of the list and not at the bottom of the screen. -- <RelativeLayout…
-
3
votes2
answers142
viewsA: Calling the same condition in the code
Solved: public void conexao() { if (verificaConexao() == true){ // Chama a classe RequestTask new RequestTask().execute(site); } else { loader.setVisibility(View.GONE);…
-
3
votes2
answers35944
viewsQ: Taking time in format: HOUR:MINUTE:SECOND
I currently use this code: // Pega a hora Date hora = new Date(); hora.getTime(); He returns it to me: Thu Aug 28 21:55:42 BRT 2014 I would like a way to get only hour, minute and second. How to do…
-
0
votes2
answers142
viewsQ: Calling the same condition in the code
//Função para verificar existência de conexão com a internet public boolean verificaConexao() { boolean conectado; ConnectivityManager conectivtyManager = (ConnectivityManager)…
-
0
votes1
answer38
viewsQ: Taking String values and separating them
Ex.: (Textview)result = "text1;text2;text3;text4" ; I want to take them in sequence and do it this way, so that I can manipulate them separately. String tx1 = "text1"; String Tx2 = "text2"; String…
-
0
votes1
answer679
viewsQ: Importing content from a div of a website into my application
Well I want to take the content of a "div" of a site to display it in my application, I’ve seen something about Webview, but I have no idea how to do...
-
1
votes1
answer1710
viewsQ: Logcat - Does not appear
I am making the Example 5 of the cap 3 of the book Google Android 3ºed(Ricardo R.Lecheta), where applying a filter to display on the logcat. only you’re not returning anything to me. package…
-
5
votes1
answer560
viewsQ: What are Android SDK Extras?
I would like to know what is the purpose of each of the options of the "Extras" of the SDK, to see which ones need to be installed (some I know more or less, I’m not sure). Android Support…