Posts by Mateus Carvalho • 1,494 points
82 posts
- 
		-1 votes1 answer9 viewsQ: Background Service being killed on androidWe created a GPS monitoring application, every 30 seconds or so the application updates the user’s position on the server. With the recent changes of Android 8 and following, we saw that the issue… 
- 
		0 votes0 answers99 viewsQ: Notifications on Android stop after downtime in the appWe use both notifications from Onesignal as in the Firebase to notify our app service providers of new requests to be met in real time. We noticed that it even happens that the app running with a… 
- 
		1 votes1 answer57 viewsQ: Client-Server between APP trackeia real-time locationHello, we have an app that sends every 15 seconds the location of users to the server. Currently it is a simple POST from (lat/lng) in the API, there would be another better way to do this? Some… 
- 
		0 votes1 answer42 viewsQ: Changing button color dynamically on AndroidI have a menu, with 3 buttons, and I need to change their color dynamically in code. I’m currently doing it this way: mDrawable.setColorFilter (0xff0099cc, PorterDuff.Mode.SRC_IN); What happens is… 
- 
		2 votes2 answers963 viewsQ: Run HTTP POST asynchronously in JAVAI have a method that sends a POST to the server, how can I send multiple requests asynchronously? public void sendPost (Object content) { ObjectMapper mapper = new ObjectMapper();… javaasked Mateus Carvalho 1,494
- 
		0 votes1 answer127 viewsQ: Manage android library versionsCurrently in my application I have the following imports library in my build.gradle: compile 'com.google.android.gms:play-services-maps:+' compile 'com.google.android.gms:play-services-gcm:+'… 
- 
		2 votes1 answer78 viewsQ: Restricted access to files with GitI’m recruiting new developers to work on a PHP project, and there’s a configuration file that contains all the keys to my clients' databases. How can I make this new developer only have access to… phpasked Mateus Carvalho 1,494
- 
		2 votes2 answers156 viewsQ: Algorithm simulation of taximeterI’m creating a Javascript algorithm to make the calculation similar to that of a taximeter, where you have the time of flag 1 and of flag 2. function test(hora,bandeira1, bandeira2) { if (hora >=… 
- 
		0 votes2 answers490 viewsQ: Prevent button to be clicked twice on androidI have a delivery app, where when clicking the button a request is triggered, it turns out that there is a bug that even with a preventive code to enter, sometimes it happens that in thousandths of… androidasked Mateus Carvalho 1,494
- 
		0 votes1 answer219 viewsQ: Convert day of week number to Day stringI need to convert the number that corresponds to the day of the week in String of the day in Java. Ex: 0 => Monday 1 => Tuesday javaasked Mateus Carvalho 1,494
- 
		1 votes1 answer1847 viewsQ: Display Popup when you realize the user will leave the pageI am willing to display a Popup to display a form to capture the email and the name of the user who is accessing the site at the time he is close to leaving the site. I see this commonly on several… 
- 
		2 votes2 answers512 viewsQ: JSON to XLS in javaIs it possible to turn a JSON into XLS with java? I’ve done an algorithm that writes JSON to CSV, but not XLS. If you can post libraries or examples. 
- 
		0 votes1 answer37 viewsQ: Map tables to save access historyI have an application, in which I need to save at least once on the day, the date and time that user accessed the application/ system. Because we charge at the end of the month for the number of… 
- 
		3 votes2 answers97 viewsQ: Best practice for deleted dataI am in doubt as to how best to deal with deleted data. In the system should appear to the client the option, "delete given", but the fact that deletion of this data would have to erase several… databaseasked Mateus Carvalho 1,494
- 
		0 votes1 answer204 viewsQ: Set Timezone for all Datetime returned from serverI’m using a backend, which returns me a DateTime by default UTC, I used the function date_default_timezone_set to set the Timezone of São Paulo, but this worked only for the hours of my local… phpasked Mateus Carvalho 1,494
- 
		0 votes1 answer29 viewsQ: Restart service when killed by system automaticallyI am using a Service to perform a task in the background, when I starto it by startService() and I put it in the way onStartCommand() return START_STICKY; it reboots whenever the system forces the… androidasked Mateus Carvalho 1,494
- 
		0 votes0 answers1049 viewsQ: Calculate distance traveled on androidI developed an application that one of the features it has is to calculate the distance traveled by the user, for this I use a Service and the API LocationListener to request user location updates.… 
- 
		4 votes2 answers363 viewsQ: Alternatives to Google MapsI recently learned that for applications that track users (e.g., taxi apps), Google maps charges an annual license to use its API. I would like to know if there are other map API alternatives for… 
- 
		0 votes1 answer67 viewsQ: Update Listview item after CallbackIn my application, I use the SDK of Parse.com. The SDK provides a method for loading API objects assíncrona and in another thread called fetchInBackground(). Within the getView() of my adapter… 
- 
		4 votes1 answer628 viewsQ: How to prevent a new instance of Activity from being created every IntentIn my application I have a BroadCastwho receives push notifications in background, that pushcurrently opens an Activity with the information of a request to be accepted, what happens is that if at… 
- 
		3 votes3 answers135 viewsQ: Difference of null and another proposition using this null objectIf I have a code, for example: if(window!=null && window.isOpen()){ //todo } If window for null, Will he still try to call the second proposition or not check anymore? Because if he tries to… 
- 
		0 votes1 answer106 viewsQ: Resume to last Activity even when the app is forced to close by the userI have an app similar to taxi apps. It happens that in the driver’s app while he is moving to pick up the passenger, if he forcibly closes the app or the device restarts or gives some crash, when he… androidasked Mateus Carvalho 1,494
- 
		1 votes1 answer58 viewsQ: How to stay 'listening' to see if SMS arrived on AndroidI am implementing a Two-Factor Authentication service where I use a gateway for sending user registration validation codes. I want to implement an automatic check on android to check if the message… androidasked Mateus Carvalho 1,494
- 
		0 votes0 answers296 viewsQ: What is the best way to hide API Keys?When you’re sharing a repository and don’t want the person to have access to the key of some API, what’s the best way to hide? 
- 
		0 votes1 answer335 viewsQ: News API as a serviceI would like to display random news from Brazil and the world in my app while the user is processing a request. Does anyone know any service/API that can provide me with a Json of I handle? 
- 
		7 votes2 answers6247 viewsQ: How to get the current date/time, independent of the device?Well, I know that when you create an object like Date: new Date(), the time and date of the device is returned, so if I arrive at settings and change these values, then the time returned will be… 
- 
		0 votes1 answer87 viewsQ: Sharedprefferences cleaning automaticallyI have a class that manages sharedpreferrences, I realized that when I close the application and open again, the sharedprefferences settings are restored to the default. When in fact the value… androidasked Mateus Carvalho 1,494
- 
		-1 votes1 answer82 viewsQ: Use standard Android Activity template to switch between editing and viewingI have a activity which serves to display the User Profile, so it lists information about this user. I want to know how does that standard already adopted by Android in Actionbar stay an icon to… androidasked Mateus Carvalho 1,494
- 
		7 votes3 answers617 viewsQ: Create temporary lock on the appIn the app I’m developing there is a usage policy, and if this policy is scammed I want to suspend the use of the app for 30 mins, how can I do this? androidasked Mateus Carvalho 1,494
- 
		10 votes2 answers8768 viewsQ: Convert float or double in real $I have a float = 11.6 I want to convert into Brazilian currency R$ 11,60, someone knows how to do? javaasked Mateus Carvalho 1,494
- 
		1 votes1 answer35 viewsQ: A service can be killed by android?I know that depending on the time that one Activity be in a state of onPause() and if the device needs to release memory it will kill this Activity. I wonder if the same happens with the service… androidasked Mateus Carvalho 1,494
- 
		0 votes0 answers52 viewsQ: Application does not report error to google playWhen it appears that message "App stopped" usually appears a send report button, where this error will be sent to the google play developer console, but with my app is not happening this, someone… androidasked Mateus Carvalho 1,494
- 
		1 votes2 answers185 viewsQ: Android app restarts if it gets out of focus for a whileMy app is an intermediary for a service request, e.g.: (UBER). What happens is that the main screen of the business, which is the one that the professional is moving to go find the customer,… androidasked Mateus Carvalho 1,494
- 
		2 votes0 answers465 viewsQ: Google Cloud Messaging push notification takes too long to deliverI have an application similar to the taxi apps (99Tax, Easy Taxi, Uber), in it I use Google Cloud Messaging to send the alerts of new races, but sometimes the latency in the delivery of the message… 
- 
		1 votes3 answers7717 viewsA: Open and Close div using the same Javascript buttonRather than .click(), you can use the function .toggle() jQuery. It would look like this: $( ".hamburguer" ).toggle(function() { $(".menu").fadeIn(); }, function() { $(".menu").fadeOut(); });… 
- 
		0 votes0 answers37 viewsQ: How to block a user for a few hoursIn my Android application, we have a policy of use of the application and if some rules are violated by the user its registration should be suspended for a few hours. I use Parse.com as a back-end… 
- 
		-2 votes1 answer69 viewsQ: How to run videos on androidI want to run a background video as a Standby screen, hiding player controls etc. androidasked Mateus Carvalho 1,494
- 
		1 votes1 answer53 viewsQ: Date and Time update to check if you are onlineIn my android app I have a service that sends from time to time a user location and saves in another field lastUpdate the day and time that happened the update. Currently use… androidasked Mateus Carvalho 1,494
- 
		2 votes2 answers159 viewsQ: When should an attribute be a table or vice versa?Example: I have an Orders table, the order has some status, new, delivered, canceled etc. When the status is canceled I will give the option of the user to tell the reason that was canceled, this… 
- 
		5 votes1 answer278 viewsQ: Themes, Styles and support android LibraryHello since I started working with Android development, I have always had a hard time understanding how the part of Themes, styles and libs of support Android, I always have a lot of difficulty for… 
- 
		0 votes1 answer352 viewsQ: Do not allow onBackPressed to runIn my application, when the user logs in if he or she presses the onBackPressed() from his smartphone the app should not return to the previous screen. When he logs in and I change Activity I set in… androidasked Mateus Carvalho 1,494
- 
		2 votes0 answers44 viewsQ: Track Push opened in parseI have an application in Parse.com that sends Pushs with custom API messages to open an Activity, my Custom Receiver is like this: public class CustomReceiver extends ParsePushBroadcastReceiver {… 
- 
		-2 votes2 answers1933 viewsQ: Authenticate by SMSI would like to know how I can authenticate a registration by sending SMS to the user’s mobile number? And which companies provide this service. 
- 
		0 votes3 answers288 viewsA: How to make the content not be below the footer?Usually I set 100% for Wrapper Ivs when you already have a parent defining the site’s wrap as your own <div class="tudo'>, then do the following: .header, .conteudo, .rodape{ float:left;… 
- 
		2 votes2 answers1170 viewsQ: Format Phone number in Textview - androidI have a TextView that displays the user’s phone number, I would like to display in my application a mask that leaves the phone number in the format (xx) xxxx-xxxxx. How could I do that?… 
- 
		4 votes3 answers9315 viewsQ: Ask if the user really wants to leave the page?I have a page where any task occurs, only it is necessary to finish it, or all process will be lost. I would like to show an Alert, as Facebook and other sites show, asking the user if they really… javascriptasked Mateus Carvalho 1,494
- 
		1 votes6 answers18836 viewsA: Removing Titlebar from the android appYou can in the method onCreate() of its Activity //Remove a title bar this.requestWindowFeature(Window.FEATURE_NO_TITLE); 
- 
		0 votes4 answers63 viewsA: How to make a slideshow accessible to ringtones on smartphones?The Owl Carousel is a plugin that allows you to create slides, Carousels, responsive. It works together with jQuery so it is necessary to have jQuery in your scripts.… 
- 
		0 votes7 answers10560 viewsA: How to test if an Edittext is empty?if(editText.getText().toString().matches("")){ ..... } The method matches() tells whether or not the string passed corresponds to a given regular expression.… 
- 
		3 votes1 answer92 viewsQ: How to know if a session already exists on a system?I have an application where the user can only be logged in to a device at the same time, how can I do this restriction? I use the Parse.com service, it provides an API for data exchange between an…