Sample Code Archive [Developer Resource] - Touch HD General

All, As a developer I often develop routines that can help others in their efforts and by the same token I use code that others have developed in my projects when I can (why reinvent the wheel).
I propose this thread be used to both request and submit code samples for public consumption. For example, if you have a g-sensor routine that you want to share you can place it or a link to it here. If you need a routine to remap the HOME button you can look or place a request here (BTW-This is my first request!)
I would propose that any posts to this thread start with a language reference... e.g.
[PPL 2.0 - Request] Thumb Scroller Configuration Dialog (like iPhone, S2U2...)
or
[C# - Sample] Vibrate device... vib_sample.zip
Post #2 will be active requests
Post #3 will be samples
If this takes off then maybe we can request a WIKI be formed

REQUESTS
Reserved for requests
001, [C#] Requesting sample for remapping HOME key in code

SAMPLES
Reserved for samples

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.

mortscript scripts project

Hi all,
I propose this new thread to put together many of the scripts spread around in a way that anybody can benefit from it with easy an easy configuration.
The standard I propose is the following:
Split all user parameters from the code itself
Split part of codes wich are dependant on each one user configuration from the code itself
Put together scripts that make little use of system resources and battery
Each relevant post could contain a script with credits to the contributors and the wish list for additional code and this post could act as an index to the relevant posts.
My first attempt:
WIFI_ON
WIFI_OFF
I have created two notifications using dotfred taskmanager.
When I connect to my wifi at home it:
updates my gmail email
updates Spb Insight RSS Feed
downloads weather forecast pictures from my country (to use in my desktop theme)
downloads favourite stocks data and graphs (to use in my desktop theme)
updates quickgps info
updates gmail email
When I disconnect it copies weather data from one program to another:
[*]In this case it copies WAD2 weather info to S2U2. (thanks to alanlsmith at lakeridge forums)
In this example, somebody may share their code to update yahoo accounts or other RSS programs, etc. We could also share other ways of waking up the device. Any user could simply adjust the parameter files and be up and running.
My wish list now is:
* add log code that can be "plugged" to any of the scripts.
* add code to sync when connected to the PC
* give credit to all the people whose code I am using.
* create a include module of paths values so everybody can install this where they want, both the scripts and the registry values created.
* register when the info of each module was last updated so to decide if it should update it again or not: eg. a user may want to update email every hour but the weather or RRS info only once a day.
* create a structure for launching the desired tweaks (on/off), registry exports, registry imports, etc.
Hope some of you want to try and others find useful this scripts
cruiserrr said:
Hi all,
I propose this new thread to put together many of the scripts spread around in a way that anybody can benefit from it with easy an easy configuration.
Each relevant post could contain a script with credits to the contributors and the wish list for additional code and this post could act as an index to the relevant posts.
Hope some of you want to try and others find useful this scripts
Click to expand...
Click to collapse
Like this http://forum.xda-developers.com/showthread.php?t=289197
Not really !
I read this thread quite often because is full of good code and ideas.
My idea is rather to build something really easy to set-up for new users that can also save tons of times for advanced users. Is more a "sashimi" like, giving UI for tweaks, automation, backup, scripts & icon generation menu, links maintenance, set-up after hard-reset, profiles, backups, interaction for themes apps such as rl-today, s2u2 or wad...
The mortscript accumulation thread is simply great and people exchange lots of codes and ideas but each one has to take the bits and re-code. That's why I propose to build a small "application" so we can consolidate and reuse the code we generate... and have fun by doing so !
(In fact, similar ideas to split Q&A and scripts have been expressed more or less in the same thread several times)
Wombat's PhoneRoam Script
Here is my first attempt of writing a script with Mortscript
It keeps you connected to High Speed Data Only and disconnects if you stray onto G or E type networks to save on Roaming Charges.
I hope you enjoy
http://forum.xda-developers.com/showthread.php?t=462964

Tutorial: Android Activity Component Basics

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

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

Get Invited for ATOOMA SDK private beta

Hi guys
Do you know the Android app Atooma? It’s a framework that allows you to create rules to automate smartphone and app functions.
http://www.atooma.com/welcome
Now we've opened a “Developers” section to launch an Early Developer Program, that will include first 50 Developers to join the project.
Atooma SDK allows you to create a third party plugin. Installing your plugin, it will get visibility on more than 300K customers around the world. You will be able to add customized triggers and actions (and more) of Atooma and users will be able to create rules with your Plug-in (published under your name) and share them within our community.
To get invited you can enter your email here > http://www.atooma.com/home/pages/sdk and you’ll receive the url to download the SDK
For any questions we are here : )
Feedback is welcome!
"Svetius approved this"

Categories

Resources