Architecture of Android app to display data from WS - android

I want to build an Android app to display a list of different music singers with some data on each row and a small photo of album. Should be small navigation after selecting an artist, you can go to his albums and then to his songs...
1 - what would be the best architecture design for this kind of app? I tough about implementing it in this way:
When splash screen appears I call to a web service to download the information and save it on device DB.Then I use Loaders to load all this data from DB, after load is complete I remove the splash screen and display the list. For each item click I bring the data from WS and display it. my question is do I need to involve actually DB for this? and is it good to fetch data for each item selected (singer), if I go back and then press again the same item, do I have to bring again all the data from WS?
2 - Anybody can recommend site where I can learn about architecture of apps, not the linux-android architecture but real apps.

Ok I'm not sure if it's the best approach, but give this blogpost a try. It helped me a lot, because it gives you kind of a convention how to design android applications (I'm coming from rails^^).
http://blog.joanzapata.com/robust-architecture-for-an-android-app/

Related

creating android text-based game

I am thinking about creating a text-based game (similar to gamebooks) for android device. In this moment only theoretically. Do you have some advice please, which way to go?
You probably know how gamebooks works, but the gamebook I want, will be very easy, should work like this:
User has shown some image, text and 3 options (questions), he decides which option to click, then a new page is showing (according to the clicked option) with another image, text and another 3 options. Then again, the user clicks one option, another page opens, etc.
My question is not how to do it programmatically, but how to start with this in Android Studio, what system to use for such game on android or which way to go.
Because I think it has no sense to create intents after each click, as there might be hundreds of clickable options.
I have already created such game on my website with php/html/js, but I want to create it also offline for android.
Intents implies one activity per page - unmaintainable.
You should work with a database and load based on user interaction. So you'll need to learn about Databases and Asynchronicity (working in the background while updating the UI so the user knows)

Android Multiuser DIsplay Different Templates

I have a question that I am struggling to find the answer to. What I am looking to do is create an app that will show a different template depending on the user that signs in.
For example, two users A and B. When A logs in I am hoping for them to see a tabbed template that will have features x,y and z but when B logs in I am hoping they will see a simple activity with feature c.
Ideally there will be a point of contact for the admin that will allow them manage the different templates and who sees which ones.
Is this something that can be achieved at all or is it a waste of time?
Can you please tell me exactly how you wanna show templates to the user like in listview or something else.
Secondly the thing which you want is achievable this has to be done from the server end suppose if you are showing your template in a listview so server will send you data accordingly like if user A logs in the db will give you value of the templates which your admin wants to show to your user and later you can open the templates according to the listview item selected .
Happy Coding .

App Inventor query

I have a simple four button menu on my opening screen of my tentative road safety application on the App Inventor. What do I do with the 'screenName' and 'startValue' variables?
The first button of my app directs you to a plain tips screen with numerous simple text tips in driving.
The second button of the opening screen will give a searchable list of applicable fines to traffic violations. How do I implement these lists. Do I use an internal DB, fusion tables or Web DB?
The third button button gives us a list of emergency numbers wherein I plan to use the MakePhoneCall() feature.
The last one is a road sign quiz on the lines of the popular logo quiz.
This is what it looks like :) http://oi58.tinypic.com/mb1xja.jpg
So, how do I implement the lists using the DB and how do I link screens or rather, the buttons to various screens?
For multiple screen apps, see the Manager Screen Demonstration and Tribblehunter's Multiple Screen Method.
For Working with lists, see here.
Your data is static, which means, you could store it in global variables in lists and read it from there, in this case no database is necessary.
Btw, it also helps to do the tutorials first to learn the basics of App Inventor.

Design of list view lazy loading images component

I have a scenario which I think is pretty common in Android applications. I know partial attempts of solving the issue were made, but until now I have not stumbled upon the full implementation. I intend to try to implement such component and open source it afterwards, but I need your help in its design.
So basically my case is the following: I have list view showing image loaded from the web and text per each row. I want to lazily load the images, placing default for each image and substituting it with the real one only when the image is downloaded. I also want to keep image cache avoiding the need to download the images multiple times in short period.
Up to now I have found several implementations that are partially working including:
Tom van Zummeren's implementation of similar component with several well known problems
Jeremy Wadsack's refinement of the concept, which is more or less working
Lazy drawables source forge project.
I also saw several stackoverflow questions regarding the problem: 1, 2, 3
However I have one more requirement which makes my task a bit more complex: I allow the user of my application to affiliate himself with some of the images. I want to load the new images associated to the user whenever the user navigates to the home screen. From it he should be able to go see his images, even before they have all been downloaded and in this case again default placeholders should be visible (Note the cross screen transition). Such use cases are:
An app listing user's youtube videos
An app for facebook - consider the images of friends
An app serving news that supports user's favorites etc
Note that I want to start fetching the new data related to the user on the home screen to provide better user experience. I will keep the user-related data stored locally forever.
The question
So my basic question is what approach should I use for the implementation of the image downloading? I know that the Android manuals say Service should be used only when I want to execute task even when application is not running. On the other side I will start the image downloading on the home screen and link the downloads to UI elements just when the user navigates to the new screen (Activity) - user-related list view and I do not know how to achieve that with AsyncTask (not that I have a very precise idea how to do it with Service either).
Any suggestion will be greatly appreciated, including links.
Universal Image Downloader is a good library which helps you to do image downloading in background with your settings.
It has so many features that you can implement at your own way.

Searching within my own application

So im building an Android application and want to include a search feature to let users use it instead of having to look through the apps many activities and pages. Cant seem to find any info on the best way to do this anywhere else. Thanks in advance
Ok so im building an app that will serve as a game guide for a popular PS3 game. Within the app will be many subjects and topics and i would like to give users the ooption to just use a search bar on the main screen of the app to search throughout the entire application and then provide them with a list of results that are clickable and take them directly to the chosen activity or place in the application. (Say it was an app for making whiskey, i would want them to be able to search on the main page for Jack Daniels instead of hitting buttons that navigate from Mainpage>American Whiskey's>Bourbon>Jack Daniels. )

Categories

Resources