Posts by Carlos Bridi • 831 points
39 posts
-
0
votes0
answers73
viewsQ: Compile report
I’m creating a report that does a database query from a parameter that’s sent to Jasper. In the source code I checked to see if the compiled file . Jasper is valid (date of creation, parameters,…
-
0
votes1
answer191
viewsQ: Publish Ionic browser app
It was developed an application in Ionic 2 here in the company that I work, however, one of the customers that is using, I would like to use it on the desktop (via browser). How and which files I…
-
1
votes0
answers27
viewsQ: Deploy per command line
We are creating automated application version generation and publishing routines using Gitflow and CI (Intel). Is there any way to deploy apk (it is already generated and signed - I just want to…
-
0
votes1
answer1332
viewsA: Decimal mask on an ion-input type "number"
I solved using a function same and changing the field type to "tel". It is not the best of ways, but I believe that I overcome the need for now. <ion-input type="tel" inputmode="numeric" min="0"…
-
2
votes1
answer1332
viewsQ: Decimal mask on an ion-input type "number"
I need to make a value mask (9 digits with 3 decimals), and when the user starts to enter the value, the field place the commas and point automatically, similar to what happens today in the bank…
-
1
votes1
answer173
viewsQ: Update widget data - update time
I am creating an application that will have a widget, it will be presented some data taken from a webservice. I need it to update every 5 minutes to have a recent user information. The documentation…
-
0
votes1
answer112
viewsA: How to set the value of a spinner elegantly
If you’re using java8 to compile, you can use filter to search the list with predicates: Optional elemento = lista.stream().filter(c -> c.getId() == 1).findFirst(); if (elemento.isPresent()){…
-
6
votes1
answer7667
viewsA: Android - Datepicker in an editText
Try it that way: Calendar myCalendar = Calendar.getInstance(); DatePickerDialog.OnDateSetListener date = new DatePickerDialog.OnDateSetListener() { @Override public void onDateSet(DatePicker view,…
-
0
votes1
answer155
viewsA: Android Webview does not return website content
Check the following items: Internet permission on Androidmanifest.xml (<uses-permission android:name="android.permission.INTERNET" />) Site actually exists. I did a test with the site you are…
-
4
votes2
answers1577
viewsA: Problem with special characters
The moment you upload the file to the BufferedReader, pass the charset as parameter. File path = Environment.getExternalStorageDirectory(); File fileProduto = new File(path, "/Import/produto.csv");…
-
0
votes2
answers173
viewsA: Create a Resource string or a class of counters?
I have researched the subject and the result has been somewhat mixed, but I will draw on the official documentation. "Should I create a Resource string or a class of counters?" To official…
-
0
votes1
answer89
viewsQ: How to activate saving battery?
How do I activate battery saving? I will develop an app that monitors the battery, and that, when it comes to a certain percentage of battery, battery saving is activated automatically.…
androidasked Carlos Bridi 831 -
2
votes2
answers106
viewsA: What method to make you download all the media volume on Android?
In your file Manifest.xml, you must add permission to vibrate. <uses-permission android:name="android.permission.VIBRATE" /> To silence the phone, you can trigger the AudioManager as follows:…
-
4
votes3
answers248
viewsA: How to make an Array created within an Asynctask be global?
You can adopt a slightly different strategy today, so I’ve seen your class JSONOAsyncTask make the request and interpret the answer within the class itself. This can be bad at the time you have to…
-
5
votes3
answers813
viewsA: What is the difference between methods for obtaining a context?
this: It is the current context of your Activity, belongs to activiy, when activiy is destroyed, the context will also be. Note: Extension of Activity, which may turn, also extends from a class…
-
0
votes3
answers458
viewsA: Listview images and quantity - Android
About images in databases: I do not recommend saving images within the database, for query performance reasons and we are limited when working with more resolutions - and as we know, devices have…
-
3
votes1
answer412
viewsA: What is the error in DEBUG: java.net.socketExeption "socket Closed"?
No android, to reference the local network, you must use the address: 10.0.2.2:8080 because the android emulator runs on a virtual machine, therefore, 127.0.0.1 or "localhost" will be the same…
androidanswered Carlos Bridi 831 -
5
votes3
answers4806
viewsA: Split the database to multiple clients or create one for each?
I don’t know if there’s a "better option". Split database: Pros All stored in one place. No need to do "experiments" to log into the bank. Easy backup - single file No need to worry about updating…
-
0
votes2
answers446
viewsA: Intent. Filter program that appears in the "open with" option
Add "mimetype" to Androidmanufest.xml in your Intent with the extension that will be supported. <intent-filter > <action android:name="android.intent.action.VIEW" /> <category…
-
1
votes1
answer812
viewsA: no such column _id (code 1) while compiling - SQL
The field "_id" is not technically mandatory (documentation citing), however, if you use the Cursor who inherits from CursorAdapter, it will be necessary to have a field "_id" on your table. You can…
-
1
votes1
answer65
viewsA: Error of Nullpointerexception
As quoted in the comments by Virgilio, your mistake is in passing the table with single quotes. Take the value of the variable sqlSelect and run in your database, error will occur. Pass parameters…
-
0
votes1
answer68
viewsA: I created an application in android studio but when I install on the phone and game is slow
Try using threads for each "wheel" you have, so you won’t run them in the main thread. new Thread(new Runnable() { @Override public void run() { RotateAnimation rotate = new RotateAnimation(0,360,…
androidanswered Carlos Bridi 831 -
0
votes2
answers949
viewsA: What is the best way to pass a context to a nested class?
I’ve also had problems with contexts in different classes, and it’s kind of hard to control that. What you can do is create a Listener interface with a method that returns exception to the class you…
-
-1
votes2
answers602
viewsA: Delete Sharedpreferences created dynamically
Hello, the official method documentation does not cite any method to remove all sharedPrefferences from your app via code without citing the Shared key. The only time it cleans completely (and no…
-
-3
votes2
answers237
viewsA: What is the purpose of baselineAligned?
According to official documentation android:baselineAligned When set to false prevents the layout from aligning its children's baselines. Found here.…
-
2
votes2
answers64
viewsA: Check smartphone horizontally
You can use the following strategy: getResources().getConfiguration().orientation And the result will be according to the documentation that is here. However, I’ve seen some people complaining this…
-
1
votes1
answer48
viewsA: The tab is going through the reset button
You could create a folder called "layout-land", inside you add new layout files that will be used when the phone is in Landscape. It is difficult to create an xml that fits all devices and…
-
0
votes1
answer177
viewsA: Disable GPS via code on Android 4.2 up?
Try this strategy, it worked with me some time ago in the project I was, I do not remember the version I used of Android - only had this excerpt saved for backup. Intent intent = new…
-
2
votes1
answer328
viewsA: App restarts when it changes orientation (rotated)?
If you want Android does not recreate Activity every time you rotate the phone, just put in Manifest, within the tag Activity, the code: <activity android:name=".MinhaActivity"…
-
1
votes1
answer399
viewsA: Gradle version error
You can change the classpath and put a "+" before the version that defines the change, so it will not lose compatibility (so soon). classpath 'com.android.tools.build:gradle:2.2.+' By doing this you…
-
0
votes1
answer502
viewsA: How to generate an APK without DEBUG in Intellij IDEA?
I think the "no Debugger" mode is only when the app is signed, so you have a . apk to send to the play store. You can’t send an app to the store without it being signed (hence it is as Debugger).…
-
6
votes3
answers956
viewsQ: Because there are two uses in Delhi
Because there are two uses in the Units of Delphi ? Just below interface and soon another in implementation, what the purpose?
delphiasked Carlos Bridi 831 -
0
votes1
answer246
viewsA: Animate circular form Activity
Search on overridePendingTransition has a question here teaching how to do with circular mode (which I believe is what you would like to do).…
-
2
votes1
answer1384
viewsA: Blank Activity does not appear in Android Studio
Depending on the version you are using from Android Studio, there may have been only one "Rename" from Activity Blank Activity. In version 2.1.2 has the option Empty Activity, which must be…
-
1
votes1
answer495
viewsA: Problem in Converting Photo Base64 on Android
Try this approach below: public static String getStringFromBitmap(Bitmap imagem){ ByteArrayOutputStream baos = new ByteArrayOutputStream(); imagem.compress(Bitmap.CompressFormat.PNG, 30, baos); //…
-
3
votes1
answer1493
viewsQ: Recognize a Jsonobject or Jsonarray
I’m developing an app that consumes data from a Webservice, which can return one or more records at a time. Until the moment always received a Jsonarray, made the "conversion" of it: JSONArray…
-
1
votes1
answer248
viewsA: Enter contact data from the app
You can use the following approach: ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>(); ops.add(ContentProviderOperation…
androidanswered Carlos Bridi 831 -
6
votes1
answer1246
viewsA: Tap the photo and open the gallery and camera
Camera Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(takePictureIntent, 1); Gallery Intent intent = new Intent(); intent.setType("image/*");…
androidanswered Carlos Bridi 831 -
0
votes2
answers41
viewsA: Update Listview from a sorting Radiogroup
Some considerations: 1) You will always make the consultation in bank on onResume()? 2) I could use a list store strategy and sort it with Sort() - but then you have to implement a…