Tag Info

New answers tagged

-1

If your workout object is just a collection of data, why not make it a singleton. Alternatively you could implement it as android Service and start it in your activities. I personally would not implement it as fragment, as for me fragments are more of a UI thing (even although fragments can be headless).


0

GitHub sounds like a good tool you could use. It can even be linked to Android Studio to automatically update your work. You'll be able to store multiple versions of this library. Old projects can reference the older library, while new projects can reference the new library. Alternatively, however, why not simply recreate the library and adjust it for your ...


1

In general, SOLID principles are usually met (See Snowman's answer) But since you mentioned the Android SDK, I will go a little into detail on how SOLID principles coming too short in this particular API. Single responsibility principle. The View class is responsible for positioning drawing event processing handling a huge load of other callbacks. So, ...


0

you need to implement a queue, not collision detection, when packets collide they are resend after the verifications, you have limited resources, if your detecting collision and resending data all the time, you can have a lot of problems with your hosting. A time oriented queue, using time as metric you can control how much requests per minute you are ...


3

In general, I disagree that GUI frameworks violate SOLID. There may be exceptions, but this wraps up my experience with multiple frameworks: SRP: a GUI class typically has one responsibility. Maybe it is responding to an event, rendering an object, or maybe it is "represent this UI element." That last one might sound like it is not a "single" ...


0

You are essentially trying to do collision detection the same way ethernet and other network protocols perform collision detection for network packets in a distributed setting. The problem is that you don't have the benefit of the protocol being aware of such scenarios if you're talking to a server that you don't control. The only real solution in that case ...


4

If your app is going to have a very small user base (say a corporate app, with less than a few hundred users), then you can make each client rate-limit itself to check the server less than once every N/100 seconds, where N = number of clients. Add in a little extra delay as a margin of safety, and perhaps randomize that margin a bit to lower the likelihood ...


10

Essentially you would need to proxy that web service with one of your own that does rate limiting. The devices wouldn't know anything about each other, and you can cache/re-implement the service if you need to scale further.


1

IANAL. I only consider the LGPLv3 because there are huge wording differences. Per section 4e, it is the responsibility of whoever "conveys" the "Combined Work" to also provide "Installation Information". If you are the "conveyer", you can e.g. host the package on your own servers or whatever's convenient for you and use that in your "Installation ...


0

You can use the If-Modified-Since HTTP header. If the server tells you that the page has been modified since the given date, then you can download the new content. http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.29


0

You could have your app calculate a hash of whatever the response from the website is, store it, then periodically check the website and compare a rehash of its response to your stored response. If they're different, then the website changed. If they're not, then there's a small chance they changed and managed to keep the same hash, but most likely the ...


3

There are services out there for this sort of thing. This article mentions some. Searching for something like "android device testing" should also lead you to some. Obviously you would need to evaluate which service gives you the functionality you need.



Top 50 recent answers are included