Questions tagged [android-development]

Used to tag questions related to Android programming and new development features. Android is a platform and complete development stack from the Operating System to the APIs. developer.android.com is the official site for information about Android development.

27
votes
2answers
14k views

Does it make sense to use ORM in Android development?

Does it make sense to use an ORM in Android development or is the framework optimized for a tighter coupling between the UI and the DB layer? Background: I've just started with Android development, ...
23
votes
6answers
20k views

Design for syncing data in Android

I have been seeing two implementations for syncing data between the server and the client on majority of the apps. This assumes no GCM is set up:- Running an intent service periodically which ...
12
votes
2answers
17k views

What to do when request is sent to server and while waiting for response internet connectivity lost?

I am sending a huge amount of data to server. Now while I have sent the data and waiting for server response, suddenly my android device gets internet connection lost. So what I used to do is, showing ...
11
votes
5answers
925 views

Is it necessary to have an Android device to learn programming for the Android?

Is it compulsory to have an Android device to learn programming for Android ? Currently, Java is my primary programming language.
10
votes
2answers
718 views

Strategies to troubleshoot an error that only happens on a specific device

As an Android developer, the target market I create apps for is very fragmented. While I can specify certain requirements - e.g. my app only supports Android version x.x or above, sometimes errors may ...
9
votes
2answers
9k views

Development on Android without using Java [closed]

As the title of this question suggests, I am looking forward to develop app(s) on Android platform without using Java at all. It doesn't mean I have some kind of vendetta against this beautiful ...
8
votes
4answers
755 views

Is there a sequence to read through the Android developer site for a user new to Android? [closed]

To summarize: I can buy a book, people say "Just read the developer site", I like to be spoon-fed the early learning piece for a technology, what path through the developer site will give me that ...
8
votes
1answer
2k views

Why does the new ADT create a static inner class Fragment by default?

Honestly, I can't help but feel that this is done merely to confuse newcomers. Most of the errors on Stack Overflow by complete Android newbies mostly stem from that they have a static inner class ...
7
votes
3answers
1k views

How do people deal with Android fragmentation? [closed]

I've spent the past few years working on iOS apps, and I'm now giving some serious consideration to creating an Android port of one of my apps. I'm sure that complaints about fragmentation are a ...
7
votes
1answer
4k views

Why does Android's Bundle API accept ArrayLists rather than Lists

I'm new to Android and while going through a tutorial on saving Activity state to a Bundle, I noticed that instead of accepting the more generic List interface, Bundle's put methods are expecting ...
6
votes
2answers
5k views

What's the best implementation for offline mobile app synchronization?

We have an Android app written as a Cordova AngularJS SPA which has now grown so that we need to add some work to it meaning we have to improve the synchronization part of the app. The app is mainly ...
5
votes
2answers
1k views

Pure Dependency Injection - How to implement it

I'm doing an Android project for an online course. I would like to use DI in that project, so I started to use dagger2, but now I started to have typical newbie problems that are holding me back. As ...
5
votes
2answers
6k views

Benefits to using fragments in Android projects

I am learning Android programming and right now and i'm reading about fragments. I understand what fragments are, but either the tutorial is missing some steps or i'm missing something. So my question ...
5
votes
1answer
543 views

Android: Design for fetching update/syncing from server

I'm building a meeting app where users can create, join (by invite), and edit events like meetings, outings etc. Think What's app chat groups. So I'm looking into designing how the android app would ...
4
votes
2answers
8k views

setSoftInputMode versus InputMethodManager

I have seen and used both of the methods to hide the on screen keyboard while coding Android: getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); and: ...
4
votes
2answers
6k views

Is it required to start a business to sell Android Apps (US)?

I know you can sell apps using your own personal tax information, but what if there are several people working on the app? Our plan is to just have one of us register for the Google Merchant account ...
4
votes
2answers
6k views

How to sync the data from the same user across multiple devices

I'm working on a small fitness app in which the user (whom is authenticated with the a server) could create their own workout plan which will be synced with a server. The problem with this is that ...
4
votes
1answer
287 views

Register user in mobile app without e-mail

We are currently developing an app for Android and iOS which requires the user to perform a registration. However we don't want the user to go through all this e-mail and password activation link ...
3
votes
3answers
5k views

Why use XML in Android?

From what I understand, isn't XML used for layouts and to setup how an activity looks? My book says that XML files are converted into Java code but then, why not just write everything in Java?
3
votes
3answers
637 views

How to keep Activity navigation logic generic enough to be reused in different workflows

I structure my Android application following Uncle Bob's Clean Architecture which basically comprise of at least following relevant layers:- Presentation - Using MVVM approach. This layer contains ...
3
votes
3answers
1k views

Using JDK in Google Android Studio License Issues

I'm new to android developing and maybe my question is strange. If I want to make commercial apps, libraries, or services for android and use Google Android Studio + Oracle JDK (not OpenJDK) is there ...
3
votes
1answer
344 views

Architecture recommendation for Android

Recently I developed an Android application which is very difficult to maintain. We are stuck in a complicated situation. We developed Android Apps which contained 500k LOC and another team developed ...
3
votes
0answers
666 views

Multithreading in Android

Looking for resources that teach multithreading in Android and list best practices. I want to do some image processing on the preview frame of the camera (already have this part set up) but want to ...
2
votes
2answers
1k views

How to check if app is offline

I am developing internal Android apps for the company I work for. In various places in the apps I need to connect to an internal server. This server is shutdown for maintenance for a period of time ...
2
votes
1answer
2k views

Android Application(Client) and Server(C#.Net) Communication

I am confused which approach to choose - Poll (which waste battery), GCM or any other approach which suits best? Scenario is: my client is Android and server is C#.Net. Server sends Invitation to ...
2
votes
1answer
157 views

Best practices for app-cloud synchronization of database representation

I'm planning a cookbook-like Android app that would let users store/add/edit their e-juice recipes, keep track of the ingredients, etc. Internally, I'll be storing the data in a database on the user's ...
2
votes
1answer
620 views

Can you help me understand this design pattern made by Java expert?

I inherited the project from a very experienced Java developer. The project is Android app and the guy who coded is is very experienced in coding regular Java apps. He introduced some file structures ...
2
votes
2answers
385 views

Android: Not able to experiment on own? [closed]

I have just started learning Android App Development a few days ago, with prior knowledge of C/C++, HTML and CSS. This is the situation I am facing Repeatedly: I am learning from a Video Tutorial ...
2
votes
1answer
61 views

Preloaded/Starter Data in an Android App when installing?

I'm working on my first android app. It's a companion app for a video game, and it should come with preloaded data. I'm not entirely sure how to best go about this. I apologize if this has been asked ...
2
votes
1answer
630 views

Is IntentService an implementation of Command Pattern?

According to Wikipedia: In object-oriented programming, the command pattern is a behavioral design pattern in which an object is used to encapsulate all information needed to perform an action or ...
2
votes
1answer
725 views

OnClickListener good practice

Which one of the ways has better performance, or is a good programming practice, making the holder activity extend OnClickListener and make a Switch() clause for getItemId() or making one ...
2
votes
1answer
567 views

Android design advice - services & broadcast receivers

I'm in the process of learning the Android SDK and creating some projects to get a grasp on the system. The current project I'm working with works just fine but I'd like to get some advice about ...
2
votes
0answers
636 views

Handling account roles in Android app

I'm building an Android app where different "types" of users can log in - lets say User and Admin are the two roles (there could be more than two). User can access some views in the app, by pressing ...
2
votes
0answers
365 views

Gradle Flavors vs. App Projects

I've inherited a pretty big and old project with a tiny bit of technical debt which is still under active development. A couple of months ago we made the jump from Eclipse+Ant to Android Studio+Gradle....
2
votes
1answer
607 views

Building a news app for both phones and tablets

I am building a news app. In phone mode it should have a navigation drawer which slides out when you tap on a hamburger button or slide your finger. That navigation drawer has a fragment with static ...
2
votes
0answers
80 views

Android Development: Styling the application

How do you approach theme and styling of an Android application? I have all the functionality and I'm now styling and dealing with colors, etc. This is my first big time Android app, and it seems like ...
2
votes
0answers
92 views

How to limit users of a service to a specific program

I have built an android game - I would like to add a "high score" leaderboard to it, such that people can show off how high they managed to score. How should I design it so that people can't "hack" it ...
2
votes
0answers
65 views

Android network Lib development

I have to develop an Android library that should frequently communicate with a server in the background. Access to the lib Object should be guaranteed everywhere in the Apps that will use it, so I ...
2
votes
0answers
384 views

Are Calls to a WCF Service via JSONP Secure?

I am looking at developing a complete HTML5/JS mobile app that can be deployed to Android, iOS and Windows platforms. I am using DevExtreme tools to help me do that. I already have a WCF service that ...
1
vote
1answer
592 views

Understanding application licenses when using third party libraries in an android project

I'm developing an app for the 2nd time but it's the first time i'm using third party libraries in my application. One of the libraries seems to have an MIT license and the other is the android ...
1
vote
2answers
617 views

What should I do if I published an app with a wrong package name?

I found out that the package name should follow the web domain you own for this application / developer Id. I published an app starting with com.health... (example) because I didn't know better at ...
1
vote
1answer
100 views

Are “I'm writing android applications” and “follow open-closed principles” reasons to allow global state?

For example, suppose I have an android application, in simple, there are 3 activities : MainActivity -> Main2Activity -> Main3Activity ,which user can visit them in sequence (eg: by button ...
1
vote
1answer
337 views

Android application to RTL (Arabic)

I have an Android application (E-commerce) in English, Now I want to change language to Arabic and RTL(Right to Left) I am new in that, where and how much efforts it take? What specific problems ...
1
vote
1answer
272 views

Unicode Telugu language characters

I am developing a mobile app in android in which I use Telugu (Indian language) texts. On my mobile Telugu language alphabets are available. Therefore, I am not facing any problem for testing my app. ...
1
vote
2answers
1k views

Managing multiple versions of the same Android Library Project

I have an Android Library Project which I intensively used in a few projects. I started a new project in which I am also using this library. I want to improve some things in library (method signatures\...
1
vote
1answer
104 views

Why using ViewModel when using also Repository?

I read this guide about recommended app architecture for Android. Here is a graphical summery: The role of ViewModel is clear, but I don't understand why we need it if we use Repository. The purpose ...
1
vote
1answer
48 views

Database structure for an app used to capture data in warehouses

I am in the process of creating an android app for our clients that would replace the paper-trail in their facilities with electronic inspections. Although I have coding experience, I have little ...
1
vote
1answer
131 views

Some questions on mobile push notification?

I need to work on android mobile push notification. I have recently gone through some of the tutorial on google. I would like to summarize the my understanding first Developer registers the app with ...
1
vote
2answers
1k views

Build a realtime chat app which stores messages in a MySQL database

I'm thinking of making a realtime chat app that would allow me to store user messages into a MySQL database. So far these are the two ideas I have. 1) Create and API which the message is sent to and ...
1
vote
1answer
54 views

Storing mutliple selected values in DB

In my Android app, there is a question like "Which of the following foods did you eat today?" (not the actual question), with a fixed list of foods (e.g. "Apples, Banana, Pizza, Burgers") from which ...