Hot answers tagged

16

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 ...


14

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 ...


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 ...


11

Edit: Now Android Studio is the preferred IDE to create Android Apps. Also hardware-wise at least Intel Core i3 processor and 4GB RAM should be used for decent performance. Of course more the hardware, better it is. We do a lot of Android development at our work. > Is it necessary to have an Android device to learn & programming for the ...


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 ...


10

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 ...


10

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 ...


10

Years ago, I used to run into the same problem developing software for Palm devices. There are a couple of obvious strategies: Having users help with the testing - have a beta testing program, have your app give good information on errors, and have a good way to report bugs. Using device-specific emulators Both are quite limiting, though. There is no ...


8

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

The Android SDK includes various emulators that you can run on your desktop system. Be warned, some of the emulators are pretty resource-hungry; there are several I can't run because my hardware is simply not up to snuff. It's not the same thing as running on an actual Android device, but it at least allows you to get your feet wet without having to ...


7

I would say no... if it's just for learning the framework, then I don't think you need one. I agree with Michael to the extent that if you're developing apps for users to actually use, then you want a real device so that you can get a real sense of whether your application is usable or not. But for the purposes of learning, the emulators will suit you just ...


6

Not necessary, but... The Android SDK provides you with virtual devices you can use on screen, but without responding to true touch events and seeing the scale of your application on a device in your hand I think it is a poor substitute to understanding how users will truly interact with your application.


6

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 ...


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

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 ...


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 ...


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

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 ...


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 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 ...


3

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 ...


3

I am really happy to see that you want to do Android programming, it is advised to learn Java before learning Android. It is something you don't know HTML but want to create a web page. But on the start you can implement very simple hello world type of example and grasp the concepts before jumping into programming. "Language does not matter, logic does". ...


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

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.


2

Well here's the steps that I took (granted I like to jump in over my head which from what I gather isn't exactly your way of doing things): Google around Keep getting directed here: http://developer.android.com/guide/topics/fundamentals.html Get about half way through, then get ADD. Back to google. Before you do the same, have a gander at 'The ...


2

I would highly recommend spending some time studying Java before jumping into the fray of Android development, as it adds a whole layor or two of complexity on top of the language. I am fairly new to both Android and Java, but Java in a Nutshell really helped get to grips with the Java part of Android development. This book is really great in explaining the ...


2

The benefit is reuse. You can reuse a fragment in different activities, just like the documentation says. Imagine an address block on an invoice and a packing list. The invoice and the packing list are two different activities. With a fragment, you can write the address block once, and use it in both activities.


2

When it comes to synching data which involves connectivity you'd want to be able to scale also. I believe the recommended way to go about it is using the Sync Adapter. It also seems to be that way if you check out the Android traning guide: Creating a Sync Adapter The sync adapter component in your app encapsulates the code for the tasks that transfer ...


2

Sync Adapters should be used unless you need real time data because, It automates data transfer based of variety of criteria, like data changes, elapsed time, time of day, etc. It centralizes all data transfers so your data transfer is done in conjunction with data transfers from other apps, which reduces battery usage. For instantaneous tasks we can use, ...



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