20

Android does not play as nicely with other frameworks as it could. Its recommended style of development assumes you build everything from its API, without other libraries. The UI layer is very tightly coupled to the model. This style is ideal for writing smaller, modular apps, not for complex applications. You need to give some thought as to whether you ...


18

It heavily depends on what kind of syncing you need. Periodic If your app is a news app that publishes posts at a certain time every day(lets say at 7.45 AM every day), then you run a periodic task in a background service, say at 8 AM. e.g.: Drippler. They notify me once every day(around 6.30 PM). I believe they use a periodic task. Event Triggered If ...


15

This is a fairly common problem with asynchronous transactions, and falls into several parts. How do both sides know that the transaction request has been successfully received? How do you resend a transaction request that the client believes has not been received properly? How does the server detect repeat requests from the client when the server ...


12

Note: Sync adapters run asynchronously, so you should use them with the expectation that they transfer data regularly and efficiently, but not instantaneously. If you need to do real-time data transfer, you should do it in an AsyncTask or an IntentService. - source. Basically, if you need real time transfer use IntentService (the first option), else ...


11

I'm one of those people who likes to be walked thru the basics. I like to build up my knowledge, rather than being dropped into reference documentation. I also like to make sure I have see all/most of the topics covered. I'd hate to develop the wrong thing because I don't know about Fragments, Content Providers, or whatever. ...how do I traverse the site ...


11

Its because its simpler - tools can be written to manipulate a XML document far easier than understand java code, so the layout can be created and modified by a simple tool that does not need to also be a java parser. Its also easier for people to describe a layout in XML than in java directly. This technique is used by a lot of things, eg WSDL that ...


10

Android is great at dealing with flexible designs that run across multiple devices. It's a huge topic that can't be expanded in detail as an answer, but I think fragmentation has gotten a bad rap. It really isn't that bad, and isn't that hard to handle. It's great to see your App run from small screen phones to large 10" tablets, and Android handles all the ...


9

Just a guess: Maybe Bundele-content must be be serializable and not every Lists implementation is serializable. From sdk-doc public Bundle.Bundle (ClassLoader) Constructs a new, empty Bundle that uses a specific ClassLoader for instantiating Parcelable and Serializable objects.


8

I think is very clear in InputMethodManager documentation when it says: The input method manager as expressed by this class is the central point of the system that manages interaction between all other parts. It is expressed as the client-side API here which exists in each application context and communicates with a global system service that manages ...


8

You've probably finished your course by now, but in case you are still searching, or someone else is: rolling your own DI is actually very simple on Android once you know how to do it. Creating the Dependency Graph I usually first start with a custom Application class (don't forget to register it in the android manifest), this class will live throughout ...


6

It depends on what you do with your data model. If you have existing code that manipulates an object oriented model, and if you want to persist those objects in a sqlite database, you need an orm. If you are writing new Android code from scratch, I would avoid an in-memory data model unless the app performs really complex OO manipulations, as a CAD program ...


5

Its not required, but it is a good idea. By not creating a separate company whoever registers to put apps on the app store assumes 100% of the liability and is also not required to actually divide any revenue you get unless you create a separate contract stating those requirements. Creating a simple LLC is quick and cheap, the potential headaches in the ...


5

Users do not like change. Even when the change is objectively superior from an UX perspective, the human resistance to change habits will result in them finding it subjectively worse. So when you already have a userbase you are developing the new application for, it is not a bad idea at all to follow the UI conventions they are used to instead of following ...


5

There is no rule you can apply to every app. You need stats on market penetration for each version, and cross reference that with what your app needs to do. Some older versions of Android might not have the framework features later versions have. And if features are missing you can probably roll your own, but that's additional cost. You also need to be ...


4

The Google Cloud Messaging will be definitely nicer to the users, because not only the application does not need to keep a foreground service (which implies status bar icon) running to keep a network connection open, it does not even need to be started at all. The GCM subsystem will start it itself.


4

Fragments aren't terribly useful on a phone. They were added to the API when people started wanting easier ways to take advantage of the extra real estate on a tablet. Think of an app with a list down the left side. When you select an item on the list, it launches a new activity using the remainder of the screen space, and you want to be able to swipe to ...


4

This falls under the basics of protocol communication. A transaction has been requested by the Android client, and the Server has to perform the transaction. If the transaction is dependant upon the Android client acknowledgment than this is call ACK/NAK communication. ACK (acknowledgment) and NAK (negative-acknowledgment) are used to tell the other-side ...


4

This is the classic purpose of using a hosts file. It's a very simple to edit file wherein you can put manual overrides for domain names to force them to resolve to some given IP. Windows Here's a simple tutorial on how to edit your windows hosts file: http://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/ Example of windows hosts ...


4

Using a background service won't really help you. The problem is that after a succesful check for wi-fi and server you can't be sure that they are still online while you make your call to get the online data because they may went immediately offline after the succesful check. A better alternative would be to just try to get the live data and if this fails ...


4

There are two considerations here: Adding a watermark takes quite a bit of processing power, especially for videos. It might be possible that a phone is capable of adding the watermark, but it will definitely degrade the user experience. The server typically has more processing power, and there the operation can be performed in the background while users ...


4

You are trying to create a distributed eventually-consistent system. Those are inherently complicated. It's understandable that you are having difficulty coming up with a good solution because there isn't one. For example, consider a user with two devices “phone” and “tablet”, and the following sequence of events: The phone and tablet start with the same ...


3

On Android events are triggered on the main UI thread, but you can not do any work on the main UI thread. What the developer might be doing is sending the task of addObject to another thread so that the main UI thread can continue. Looks like he has created a few classes to make these kinds of tasks easy to do. This is good practice, but I am making an ...


3

There is one aspect of a SyncAdapter that has not been mentioned by the other answers. The SyncAdapter pattern requires that you have a specific ContentProvider authority that you sync to and a specific account type (see Authenticator) that's going to be synced. So unless you already have those components in your architecture (e.g. because you give other ...


3

In short, yes your plans is good to go with a simple agreement between partners. You may consider that agreement to define basic rights of each of you in the project. However, if you are planning to grow the business and hit some point of substantial sale/revenue then you may probably want to consider registering business as LLC or Inc. The rule of thumb ...


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.


3

If you think about avoiding Java, but not Dalvik altogether, you could use Kotlin. http://kotlinlang.org Very neat language by JetBrains; thus it integrates well with Android Studio (or IntelliJ Idea). Much less verbose than Java, and introduces some functional programming concepts. Kind of like Scala, only simplier. It can coexist with Java in an Android ...


3

Your SimpleWakefulReceiver should not be making direct references to HttpManager. An HttpManager manages your communication with the server. It's purpose answers the question: "How do I communicate with the server?" You need another class to answer the question What do I communicate to the server?" The Single Responsibility Principle states: In object-...


3

If you're going to sync against your master SQL database you will always have the same problem: how do you resolve conflicting changes? CouchDB doesn't help you there. It explicitly does not handle conflicts and leaves it up the user to handle them (by picking sides). Other solutions also can't really help you, because to resolve a conflict you must ...


Only top voted, non community-wiki answers of a minimum length are eligible