Tutorial: Android Activity Component Basics - Android Software Development

I would like to share a simple tutorial that covers the Android Activity component.
Its not as basic as a 'HelloWorld', but it covers some simple but useful getting started like usecases such as:
* Activity component callbacks during launching an App and quitting an App
* App State persistence across re-starts
* Activity component callbacks for Menu creation and event handling
* Navigation from the main screen of the Activity to another screen within the Activity
The tutorial with source code is available at: openmobster.blogspot.com/2010/10/android-activity-basics.html
Since I am new to this community I was not allowed to post the link, so I had to use a workaround. I hope this is not considered spam.
My intention is to help the Android developer community learn more about the platform and also learn more myself from others in this community.
Thanks

Thanks for this! I always start learning a new environment using a 'getting started' book and online tutorials, and a tutorial like this, from the trenches as it were, is always a great place to get some tips and tricks!
-edit-
Uhm...your blog doesn't seem to exist?!?

I check it out, your link is fine & to above does work .
link
Jug6ernaut

Related

Lets Built OpenSource Projects for PPC. 6 Projects Posted. Updated 7th Feb 2008.

NOTES:
The projects if developed will become a generic code baseline for each and every developer seeking codes.
This means projects in this thread is just to give everyone a basic working conceptual code which can be used anywhere in similar projects.
Just think people has great ideas to work on, but they dont have baseline code from where to start as most of them might be learning.
So this thread should help them out giving a working base code..
Any1 interested in building couple of OpenSource Projects for PPC? Ill post concepts.
Lets built next generations of applications together as open source which people can use to learn things as well.
The reason open source is so that everyone can contribute code for a project, and work together to built the best.
Anyone Interested???
------------------------------------------------------------------------------------------------------------------
Project 1: File Indexer for PPC [FIndexer]
Not Sure if it exists or already available.
Added:
01 Feb 2008
Description:
To index each and every file on PPC with custom options on indexing.
Purpose:
In todays world where 1gb,2gb,4gb cards are available, we store tons of file on our PPC like ebooks, songs, music, videos.
Many times it is not possible to search using a search utility as it may consume battery and we need to wait till file is being search.
This is the place where this FIndexer comes in to picture, where we index our file either manualy or scheduled.
And then searching a file will just take 1 second to return the results.
Language:
C++ is best language for this kind of project because of speed.
Database:
Not sure, but either SQL or Access DB.
Type:
Open Source
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
Project 2: File System for PPC [PFS (Pocket File System)]
Not Sure if it exists or already available.
Added:
01 Feb 2008
Description:
Idea came from Microsoft new file system WinFS.
Correct me if i am wrong, this File system is a file table itself where it keeps track of each and every files in details in Real Time.
Purpose:
In todays world where 1gb,2gb,4gb cards are available, we store tons of file on our PPC like ebooks, songs, music, videos.
Many times it is not possible to search using a search utility as it may consume battery and we need to wait till file is being search.
This is the place where this PFS comes in to picture.
Why use any indexing software also?, let this File system handle it in real time.
Language:
C++ is best language for this kind of project because of speed.
Database:
Not sure, but either SQL or Access DB.
Type:
Open Source
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
Project 3: Tic Tac Toe (x & 0) Game (BlueTooth Enabled)
Not Sure if it exists or already available.
Added:
01 Feb 2008
Description:
This is a game which we always played for fun in good old days and still we play.
We might have wasted good amount of papers to play this game. Classic X & 0
Purpose:
We hardly see any bluetooth enabled games for PPC. Thats the purpose to built a very basic game with 2 players mode on bluetooth.
This may be a good code for all the developers round here who wants to start with some bluetooth code.
Language:
C++ is best language for this kind of project because of speed.
Database:
Not sure, but either SQL or Access DB or XML
Type:
Open Source
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
Project 4: Multipurpose Single Line Marquee Scrolling Today Screen Plugin [Like Stock Tickers]
Not Sure if it exists or already available.
Added:
01 Feb 2008
Description:
A today plugin which scrolls like a stock ticker in 1 or 2 lines, and provides useful configurable information like battery info, world time, live money rates, notifications, one liner quotes, jokes, appointments, bluetooth status, and much more, in 1 or 2 scrolling lines.
Purpose:
Many might have noticed too many of today plugin gives a scroll bar to your today screen which dont look good.
This is where this plugin comes in to picture.
This should be completely customizable right from scrolling speed to colors to information to flashing colors speed, bold and much more.
Language:
C++ is best language for this kind of project because of speed.
Database:
Not sure, but either SQL or Access DB.
Type:
Open Source
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
Project 5: Application Specific Backup Tool (Can be a great tool)
Not Sure if it exists or already available.
Added:
04 Feb 2008
Description:
There are several backup tools which takes backup of PPC as a whole and can be restored easily, but:
How many times you feel that you had installed tones of applications and had taken a backup of those, and now when you get a new PDA, you feel like you dont want to again install all the applications installed previously due to certain reasons. By restoring the backup you end up again with all unrequired applications again.
This tool will help you to eliminate those problems by taking backup of each and every application configurations seperately with version informations. Yes now you can backup configurations of your games, your theme managers, your music player configurations and everything and have choice to restore them back again seperately as required.
Yes people who develope tools with configurations involved may have to coporate to tell us where they save the data of their application so we coders can add a plugin code to backup that particular application.
You can say that this tool has a builtin database information of most of the application to backup the configs.
Purpose:
Description above says it all
Language:
C++ is best language for this kind of project because of speed.
Database:
Not sure, but either SQL or Access DB or XML
Type:
Open Source
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
Project 6: Application data which synchronizes with Web Services.
Not Sure if it exists or already available.
Added:
07 Feb 2008
Description:
Again this is an application which most coders are going to like who are learning mobile codings. This application mainly shows how to communicate with mobile device application with web service to keep data in sync. Data can be either contacts, games scores, or any text based details.
Yes a today screen plugin would be nice to show some information on sync or other details.
Purpose:
To provide generic code to each coder seeking this kind of communication.
Language:
C++ is best language for this kind of project because of speed.
And either .Net or Java for Web Services.
Database:
Not sure, but either SQL or Access DB or XML
Type:
Open Source
------------------------------------------------------------------------------------------------------------------
All Projects should be easily skinnable by anyone.
People willing to part of this project, than please post your details as follows:
Name:
Skills:
Comments:
Once we have a team than we will go ahead and create documents like
RUD (Requirement Understandings Document)
SRS (Software Requirement Specifications)
What do you guys say??
Wanna work together as one, and built a new world for everyone?
Wait for everyone's view, either good or bad.
I am not sure how good above to projects are, but this thread mainly wants every coder, designer, tester to work together and built something.
List of Contributers (Coders, Designer, Tester, Others)
This place will list all the Contributers (Coders, Designer, Tester, Others)
Screen Design for each Projects goes here
Screen designed by contributers goes in this post.
NOTE:All screens designed will be copyright of the designer and should not be distributed or used without a permission.
Attached a Screen for an idea for Project 4
Notice the first Plugin in Yellow border.
Created by me.
List of Features and Request for Features and Suggestions
List of Features and Request for Features and suggestions goes in this post whomsoever wants. Then the team can make it happen.
Builts / Releases
Builts / Releases Goes in this section.
Technical Disscutions
Important Technical Disscutions will be posted and collected in this post.
Intentionally kept blank 1
Intentionally kept blank 1
Intentionally kept blank 2
Intentionally kept blank 2
Intentionally kept blank 3
Intentionally kept blank 3
Intentionally kept blank 4
Intentionally kept blank 4
Intentionally kept blank 5
Intentionally kept blank 5
zbop has done something similar to what you are looking for in number 4. You place info in reg. keys and then update that info via Mortscript (or however you want) and then it gets scrolled on a today screen line. Check out http://discussion.treocentral.com/showthread.php?t=141375 post #269 for the latest version.
more than 600 views but just 1 reply!
I wonder how does open source developers meets and work together
I decided to give this initiative a fighting chance so I am going to 'sticky' this thread for one week.
If there are no takers I will 'unsticky' it.
Unfortunately, I do not currently have time to take part in this project my self as I am learning to program for Linux and OpenMoko specifically.
greenhacks said:
more than 600 views but just 1 reply!
I wonder how does open source developers meets and work together
Click to expand...
Click to collapse
They don't, they start by making something, small, runnable, interresting, then share it, with the source.
This is more than i could expect from this forum. Thanks a lot.
This is a try to bring many great people in this forum and to develop something great for the forum.
Projects mentioned in this thread is just for start.
People can give their own new ideas so all work together and make something great for all the forum users.
i have no other intentions to start this thread other then bringing all together.
Starting this thread i thought i will also put my skills to help new guys.
Thanks again, and i hope this works out.
Here's a project idea that came up in the herald forums - use your touchscreen as a psudo-wacom tablet while tethered. Yes it would only be on/off and wouldn't sense pressure differences, but would still make for a cool project.
Heared of Android?
I guess you have heared about android,an all open-source linux based platform.And about the total of 10M bounty by Google as an award for the top 50 applications tha will be developed for the platform.So I'm guessing any developers with the skills to do such projects will have their hands full.
After all it sould be reasonably easyer to programm for an all opensource platform than for WM,a closed source platform.
Just my 2 cents.
nstamoul said:
I guess you have heared about android,an all open-source linux based platform.And about the total of 10M bounty by Google as an award for the top 50 applications tha will be developed for the platform.So I'm guessing any developers with the skills to do such projects will have their hands full.
After all it sould be reasonably easyer to programm for an all opensource platform than for WM,a closed source platform.
Just my 2 cents.
Click to expand...
Click to collapse
Count the number of applications developed in this forum by everyone for so called 'closed source platform of wm6'
I do agree with your thoughts and dont say you are wrong, but hey thats a whole different ball game.
Always remember
When a company runs out of concepts, then company organises a competition with great prices. At the end company gets thousands of new concepts. winner gets the price, company gets new product.
same thing happens in open source world as well as close sourced.
If all think in this direction then i can bet, xda will run out of members.
not trying to defend, but this is something which simply cannot be debated or this is not a right place.
tene said:
They don't, they start by making something, small, runnable, interresting, then share it, with the source.
Click to expand...
Click to collapse
Then lets make something small, runnable, interresting, and share with the whole world!
It was very dificult to find this kind of groups, thats the reason internet became so famouse, where we can find different people with great skills from different country and make things possible.

[Tutorial] Smart List Adapters - Singleton Observable Lists can improve your app

I am not really sure what the guidelines are for linking to other sites here... so I hope I am not breaking the rules... but I wrote a tutorial today that I think could help alot of other Android developers when dealing with Lists and ListAdapters and I wanted to share it... I don't really want to rewrite my tutorial here... so I am going to link it.
Basically, this tutorial will show you how to make intelligent lists that only exist once in your app and inform the consuming object (such as a ListAdapter or Service) of any change that is made to the list. This will eliminate the need to call setAdapter everytime you need to change the contents of a ListView or get a new copy of the list before you need to do a loop... or whatever. This has really helped me to eliminate a TON of code dealing with the list in multiple activities and in my Service. I hope it helps you out as well.
Smart List Adapters - Singleton Observable Lists
I posted a second installment to this turorial today because the more I messed around with these Observable objects the more I realized that I had stumbled across a literal gold mine of functionality. Check it out.

Looking for bugs.

Im looking for bugs with the nexus 7 (4.2 software) that can be recreated and printscreened. Ive been looking through the forum and found a few but havent found ways to recreate them on my nexus. I need to do this as part of my Uni course so any help would be appreciated! Thanks
Use the screenshots provided by the users that are experiencing bugs (with there consent of course)???
Wilks3y said:
Use the screenshots provided by the users that are experiencing bugs (with there consent of course)???
Click to expand...
Click to collapse
I could try this, but its also preferable for my grade if I try and find ways to stop them happening too.
chrisftw92 said:
Im looking for bugs with the nexus 7 (4.2 software) that can be recreated and printscreened. Ive been looking through the forum and found a few but havent found ways to recreate them on my nexus. I need to do this as part of my Uni course so any help would be appreciated! Thanks
Click to expand...
Click to collapse
Of course it's for Uni... Not some pathetic little blog trying sensationalist journalism for some adsense cash..
CrazyPeter said:
Of course it's for Uni... Not some pathetic little blog trying sensationalist journalism for some adsense cash..
Click to expand...
Click to collapse
Twas my first thought as well. No Uni project would be set up like this, especially not a real research project.
Really?
"Module CPU4000 Core Skills
OSS Assignment
Interacting with an Open Source Software Development Community
Marks from this assignment will contribute 50% of the overall mark for the module.
Aims
• to develop awareness of the process of open source software (OSS) development.
• to develop confidence and initiative in interacting with an OSS development community.
• to display skills in verbal communications.
Task 1 Start and maintain a diary or blog
Start a diary or set up a blog for the assignment and continue to post entries throughout. Keep a record of everything you do towards the assignment and every response from the community.
Task 2. Find a suitable Open Source Software Development Project
Find an active open source software application in an area that interests you.
A few examples of areas where one or more sites have already proved suitable are given below, but you should not feel restricted to these areas alone.
personal finance package currency converter
music editor / mixer music instrument tutor e.g. guitar
music synthesis media player
image manipulation and tagging video editor / standards converter
text editor web development / web browser
game (various) game development environment
flight simulator desktop publishing
integrated office package social networking
language translation blog
code development environment architectural design package
mobile device app development operating system
virus checker screen grabber / recorder
voice over IP system project management
database management system email package
Some examples of where to look for OSS development projects are:
Sourceforge
Apache Software Foundation
Mozilla Foundation
Google code
Eclipse Foundation (also via Google code)
Ohloh
Search engine (any) search for <open source> followed by keywords
describing an applications that interests you.
To determine whether the development community is active, locate the forum or reporting part of the site and check the dates of recent postings and responses. Also check the analysis and metrics for the project at
If the application is clearly inactive, make a note of what you have found, but then STOP and look for something else. It is quite normal to find that your first choice of site is inactive, so don't leave it too long before you reach that conclusion and move on. If you post a question and nobody has replied after a few days, it’s time to move on.
Task 3. Do something to interact with the community
Here are a few examples:
• Work through a tutorial or some other documentation. Find something that is unclear, confusing, or is out of date, and write an amendment. Submit your improved version.
• Become familiar with the application. Then pick a question that has been posted on a forum, investigate the issue raised and post a comment either answering the query satisfactorily, or contributing in some way that will help others work towards a solution.
• Investigate an existing bug report and try to duplicate the circumstances that gave rise to the problem. Then make a change to something and see if the bug is repeatable. Try to narrow down the circumstances when the bug will / will not appear. Report your findings to the development community.
(This is known as 'reducing' a bug. For an explanation and an example of a list of known bugs in a project, see: )
• Download some software or some small element (e.g. a library function) and get it working properly. Devise some tests and write up the results. If the software doesn't perform exactly as described in the documentation, take action as appropriate: if you are unsure, post a question on a forum, but check for previous reports first. If you are quite sure, submit a bug report describing the circumstances, or amend the documentation and submit the revised version to the community. Follow up the response.
• Specify improvements or suggest one or more new features that you would like added to the software.
There are many possibilities and so you should not be limited by these suggestions. What is important is that you interact in a constructive manner with an OSS development community.
Task 4. Make a presentation
Make a short presentation to the class, describing what you have done and the nature of the interaction that took place. The presentation should last about 5 minutes, after which you should invite questions.
Describe what you have done and the nature of the interaction that took place. Include evidence of your contribution, either by linking to the website where your work is apparent, or by screen shots.
Explain the choice of package and the evidence that convinced you the community is active. If you started to investigate a project that subsequently proved to be unsuitable, briefly mention the details and the reason why you abandoned it.
Date of Presentations: Week commencing Monday 3rd December
The presentation may be recorded to show the External Examiner.
Marking Scheme
Nature and depth of the interaction 50%
Presentation 50%
Grade A: Substantial and serious interaction described in an exemplary presentation
Grade B: As above, but less of an interaction, or with some deficiencies in presentation
Grade C: As grade A, but the interaction was minor or there were some serious deficiencies in the presentation.
Grade D: Trivial interaction and/or serious deficiencies in the presentation.
Grade E or F: No interaction and/or very poor presentation.
Any Questions?
If in doubt, don’t struggle. Come and see me in room C2-7a. Roy Attwood
File: Core-Skills-OSS-assignment-Sept12.doc
Updated 16 Oct 2012 RA
"
For a blog ey?
chrisftw92 said:
"Module CPU4000 Core Skills
For a blog ey?
Click to expand...
Click to collapse
Haha - Robyr and CrazyPeter just got owned. :laugh::good:
We don't already have enough of these 4.2 bashing threads, now we have to help you with your homework?
closing this as if you want help with your homework you should be able to search and find the bugs and fins ss to use as well...OR pm users that report said bugs and ask for ss's maybe...

Wordpress intregration?

Needed information: -Currently I working on an my first app (besides Hello World) for a club that I am in on campus.
-I want to display the news feed of a closed group in a small window- but I have been lead to believe that I would need to make an app on Facebook.
-My current "solution" would be to link up the group with Wordpress and use Wordpress to displayed a "window" in the app.
-I am using Eclipse ( since netbeans lacks a gui editor)
- any other solutions need to be as basic as possible on the front end. Any possible president in the future would need to be able to work with it, and updates need to be kept easy to follow with or without much computer skills.
-help would be appreciated.
Background: -Originally I was going to display a window of the twitter feed from the app-and I found that twitter has a library to work with.
-Other app features are a calender that would be synced with one that the President works with.
-There will be a set of "themes" within the app for the members customization.
-I am new to developing and coding. I come from the world of designing and audio editing. I have been studying on my own, but have had little hands on. With the twitter I was able to find a tutorial that both walked me through and explained the concepts.

Need Suggestions

HI i have android app development experience for 2 years.
I understand the framework but when it comes to typical situation when i think it would have been better if more android internals were given or more documentation was available.
So my question is for app developers what is the next stage for learning in android development So that we have deeper understanding of the framework and solve typical issues as well. for eg
Activity finish() dismissis and removes the dialog in that activity but i could not find any docs regarding this. so i was in dilemna what to do?
Please help how to advance more into android and if possible please give links to study material or links where i can get a path
Thanks
So this was the question I got after my all app compiling and decompile for 3 months.
So I was just a app modifier,and I thought about being app developer,I mean creater.
So I googled and learnt the coding(toughest part) and iam now a good developer who is on the way of development.
And for ur question finish();
All those datas are in java format packed as class.dex,you must open that to see the source file as java.
However u can see .smali file wen u decompile any app which you/me/ can't understand....(those r derived from java)
Offff good question:thumbup::thumbup:
.........................................
visit www.fb.com/softcrush
RamachandranProgrammer said:
HI i have android app development experience for 2 years.
I understand the framework but when it comes to typical situation when i think it would have been better if more android internals were given or more documentation was available.
So my question is for app developers what is the next stage for learning in android development So that we have deeper understanding of the framework and solve typical issues as well. for eg
Activity finish() dismissis and removes the dialog in that activity but i could not find any docs regarding this. so i was in dilemna what to do?
Please help how to advance more into android and if possible please give links to study material or links where i can get a path
Thanks
Click to expand...
Click to collapse
My number one snag I would do, if I could go back to when I started, would be "Learn what a Context is, and the different types" which coincidentally relates to why a dialog hung of a context does disappear
Hi,
Stackoverflow.com is a good source of information to resolve doubts.

Categories

Resources