Hi everybody. Those of you who have windows mobile SE might miss the good old start menue from first edition featuring more links than the new one. The old version had those tiny little symboles at the very top. Far more handy than these big "last used" symbols now from my poit of view.
Perhaps one reason of this restructure is the landscape mode. Here the "last used" symboles become the litte symboles ontop like in first edition.
now wouldn't it be nice if you could also define the lower sectioin of the menue with permanent links in stead of these changing ones?
So far I found out that the registry folder containing these shortcuts is to be found at: HKEY_CURRENT_USER\Software\Microsoft\Shell\TaskSwitch
(at least at my Himalaya).
Within here you got
(Default) (value not set)
"1"="\\Windows\\Startmenü\\Programme\\SlovoEd.lnk"
"0"="\\Windows\\Startmenü\\Programme\\Resco Registry.lnk"
"10"="\\Windows\\Startmenü\\Programme\\Spiele\\Jawbreake r.lnk"
"11"="\\Windows\\Startmenü\\Programme\\Astor.lnk"
"9"="\\Windows\\Startmenü\\Programme\\Internet Explorer.lnk"
"8"="\\Windows\\Startmenü\\Programme\\Messaging.lnk"
"7"="\\Windows\\Startmenü\\Programme\\Alex.lnk"
"6"="\\Windows\\Startmenü\\Programme\\Eval.lnk"
"5"="\\Windows\\Startmenü\\Programme\\Notizen.lnk"
"4"="\\Windows\\Startmenü\\Programme\\movianVPN.lnk"
"3"="\\Windows\\Startmenü\\Programme\\Sprite Backup.lnk"
"2"="\\Windows\\Startmenü\\Programme\\Suchen.lnk"
for example while values form 0 to 5 are the 6 items that are displyed.
Now changing a value to a link (.lnk) that is located in the windows/start menue/program folder and a softrest brings this new item up..
The only thing that one would have to do to permanently set one's links is to stop the device from changing that folder.
unfortunatelly I have no idea how to do that... maye sombody of you can help?
Thanks alot
Alex
I've tried everything. Delete single values within taskswitch. delete taskswitch...
I added Dwords to Shell and taskswitch as follows:
NoRecentTaskHistory = 1
NoRecentTaskSwitch = 1
NoRecentTaskSwitchHistory = 1
NoTaskHistory = 1
NoTaskSwitch = 1
NoTaskSwitchHistory = 1
non of them works.
Actually I'm not into inventing new regestry vlues.
Perhaps someone of you knows...
Thanks a lot. I think a lot of people would appreciate this.
Greets Alex
Hi,
Can someone please confirm the regedits that I need to make on a wizard to enable date and time at the top of the today screen and also point the mp3 ringtones to a storage card. Are they the same as for 2003SE?
anyone ? can it be done?
They should be the same...
quick how-to :
1. Download PHM Regedit
2. Install to your device
3. Run PHM Regedit
4. Navigate to HKEY_LOCAL_MAHINE\Software\Microsoft\Shell
5a1. You see the TBOpt value
5a2. Select the TBOpt value - this will open the editing screen
5b1. You do NOT see the TBOpt value
5b2. Click Edit
5b3. Choose "New DWORD Value"
6. Switch to Hexadecimal mode in the editing screen that now appears
7. Set the value to :
10 = Neither time nor Date
11 = Time only
12 = Date only
13 = Date & Time
8. Click OK
9. Click tools
10. Choose Exit
Play some game here or something, as the device needs to actually write the registry out. 1 minute should be plenty of time.
11. Soft-reset your device
Done. You should now see the date/time setting you wanted.
However, you may now notice something else. E.g. the date today is 06/01/13 - but all you can see is "06/01/1". This is because the date string is getting cut off by the program OK/Close button. You can fix this by padding the Short Date Format.
1. Run PHM Regedit
2. Navigate to HKEY_LOCAL_MACHINE\nls\overrides
3. Select the value "SSDte"
4a. Add a bunch of spaces to the end (depending on your date format, 1 to 3 may be needed) - this shifts the date/time display to the left.
4b. You can also change the format of the date presentation itself. I use "ddd d " which today results in "Fri 13 " (eek!)
For an overview of the date strings you can use, see :
http://msdn.microsoft.com/library/d...ide/html/cpconcustomdatetimeformatstrings.asp
( note that you can't use the time strings, as it's a date field )
5. Click OK
6. Click tools
7. Choose Exit
Play some other game, watch a commercial on TV, blabla
8. Soft-reset your device
Done. Do note, however, that this affects -all- programs that make use of the short date formatting calls. So if some application looks all quirky due to the use of extra spaces and/or different format; well, tough. Can't have both
With thanks to:
http://wiki.xda-developers.com/index.php?pagename=Universal_Registry
Can anyone tell me what "exactly" HTCColdBoot.exe does on a cold boot? Copies files? Runs provxml's? I'm trying to troubleshoot a homescreen layout issue that only occurs after HTCColdBoot.exe runs on my Cavalier.
Thanks in advance.
This is the best explanation I have seen floating around. It is here in one of the threads, but this excerpt is taken from Willem Jan Hengeveld aka Itsme.
this is a description of all the files which are relevant to coldbooting a windows ce device.
databases, filesystem, and registry are initialized by filesys.exe based on the following config files
default.fdf
this is the registry information, as generated by regcomp.exe from the platform builder.
struct header {
DWORD signature; // 0x1d8374b2
DWORD size; // size of entire file
struct entry entry[];
};
struct entry {
WORD entrysize;
WORD entrytype; // 1 = path, 2 = key,value pair
union {
struct pathentry;
struct keyvalentry;
};
};
struct pathentry {
WORD hive; // 0 = HKCR, 1 = HKCU, 2 = HKLM
WORD pathlen; // in nr of wchars
WORD zero; // always 0 !!! this field is not present in wince4.x
WCHAR path[];
};
struct keyvalentry {
WORD valuetype; // 1 = string, 2 = empty, 3 = binary, 4 = dword, 7 = wbinary
WORD keysize; // in nr of wchars
WORD valuesize; // in bytes
WCHAR key[];
BYTE value[];
};
key/path size is including terminating NUL
the key 'Default' is the '@' default key.
initdb.ini
this initializes all databases
initobj.dat
this initializes the filesystem
calibrate + cut-paste tutorial
the program that does this is 'welcome.exe'.
initobj.dat contains a line that links 'welcome.lnk' into the startup folder. causing it to run as soon as the shell starts up.
welcome.exe deletes this link when it is finished
welcome.lnk contains 'MSWELCOME', which refers to the 'HKLM\SOFTWARE\Microsoft\Shell\Rai\:MSWELCOME' key in the registry, which points to "\Windows\Welcome.exe"
other things that welcome.exe does:
ImmDisableIME(0)
InitRichInkDLL
RegisterWindowMessage("SHWMappNotify")
ShowWindow("Taskbar", 0)
make \My Documents\Templates\*.psi, *.psw, *.xlt, *.pxt ro_hidden
for all in Comm\DefaultConnections, set ras some params
do more stuff to device.
pass 'defaultconfig.xml' to configmanager.dll
call method that does something with 'voicemail.lnk'
SHSipPreference(6)
load imgdecmp.dll
fload, coredll:2043
SHSipPreference(2)
ShowWindow(?, 1)
TouchCalibrate
ClockDll ...
run 'clocknot.exe' at later time.
deletelink
oeminfo.xml
contains public keys for HTC, and microsoft
.rgu files
since pocketpc 2003, many registry settings have moved from default.fdf to .rgu files. these files are processed by regupdater.exe, but I have not yet researched how and when exactly.
AutoConfig.exe
AutoConfig is loaded via a 'startup' item set by initobj.dat.
it locates the operator rom data, and presents a list of supported configurations found in the customtab.dat file.
Click to expand...
Click to collapse
GSLEON3 said:
This is the best explanation I have seen floating around. It is here in one of the threads, but this excerpt is taken from Willem Jan Hengeveld aka Itsme.
Click to expand...
Click to collapse
It's too bad that information (while good!) doesn't help him at all as it has nothing to do with htccoldboot.exe.. Notice the HTC in the file name ?
Htccoldboot.exe processes all provxml's among other things. So you assumed right You could try trimming them one by one, until your issue goes away...
NRGZ28 said:
It's too bad that information (while goog!) doesn't help him at all as it has nothing to do with htccoldboot.exe.. Notice the HTC in the file name ?
Htccoldboot.exe processes all provxml's among other things. So you assumed right You could try trimming them one by one, until your issue goes away...
Click to expand...
Click to collapse
Thats what I figured. Thanks. The main issue is that after about 10 minutes of "idle", you go back to the home screen and it's white saying "The layout cannot be loaded". Sometimes the Start menu will work so I can get back into Settings\Home Screen and change it. When I do, it comes back.
Any idea what can be affecting that? Happens with HTC Sliding Panels, regular Sliding Panels, and both CPR's. Also, regardless of what color "scheme" I choose. It's like there is some background service that times it out!?
Any ideas?
I am hoping/asking for someone who is familiar with the ppc code to convert this VBA code. I use it to retrieve the daily calvin and hobbes comic on my desktop, but it would be GREAT if something like this could save an image file on my Touch Pro2!
I've never used mortscript, but I don't think it can do this type of thing.
What I'd like to have happen is a little app on my touch pro2 that I could run that would retrieve the daily calvin comic, and save it in a folder, My Documents/My Pictures/Calvin/
...which in turn I could set as the default folder on the Photo & Video Manila Tab. Presto, I now have a Manila tab that gives me my daily dose of Calvin!
...It could save the image as the same filename time it's run, so as to delete yesterdays image, or it could have options, ...Or something else? I'd be happy for anything that would help this little project!
Sub GetCalvin()
'Used to paste the current Calvin & Hobbes comic in the word document.
Dim intStart As Long 'start of comic address
Dim intEnd As Long 'end of comic address
Dim strComicAddress As String 'URL of comic
Dim dataObject As MSForms.dataObject
Dim strSource As String 'Webpage Source Code
Dim strSearch As String 'Beginning of image string
Dim MyDay As String, MyMonth As String, MyYear As String
Dim MyDate As Date
MyDate = Now
MyDay = Format(MyDate, "dd")
MyMonth = Format(MyDate, "MM")
MyYear = Format(MyDate, "YYYY")
strurl = "http://www.gocomics.com/calvinandhobbes/" & _
MyYear & "/" & MyMonth & "/" & MyDay
'Locate the webpage source
Set my_obj = CreateObject("MSXML2.XMLHTTP")
my_obj.Open "GET", strurl, False
my_obj.send
strSource = my_obj.responsetext
'Search the source for the image
strSearch = "http://imgsrv.gocomics.com"
intStart = InStr(1, strSource, strSearch)
Debug.Print strSource
intEnd = InStr(intStart, strSource, ">") - 3
strComicAddress = Mid(strSource, intStart, intEnd - intStart) & "&w=900.0"
Debug.Print strComicAddress
'Load the image into IE
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = False
.navigate strComicAddress
' Loop until the page is fully loaded
Do Until .ReadyState = 4 And Not .Busy
DoEvents
Loop
‘Put the image on the clipboard
ie.ExecWB 17, 2
ie.ExecWB 12, 0
End With
ie.Quit
ie.Visible = True
Selection.PasteSpecial
End Sub
I'm by no means a good java developer, but i've had to search ALOT for some of these java examples and i thought others might benifeit from them.
For someone starting out in android app developing (especially someone with no prior Java background like me) it can be a very tedious and irritating process.
Hopefully this thread will help some people
This list is not very complete yet, but over the next few days i will be adding more examples (especially more Basic Java examples) and will be generally improving everything.
This is all written from my own memory and in my own words, but i can't remember where i learned it all from. If i'm using your or someone else's code please let me know so i can add credit where it's due!
Basic Java (general java examples)
All these 'Basic' tutorials are taken from my lectures at Manchester Metropolitan University where i'm taking Software Engineering. More will be added week by week!
Please be aware that these should be viewed in order, as any tutorial will assume you understand the ones before it.
All the files are included in a zip file attached to this post.
ALL CREDIT FOR THESE GO TO NICK COSTEN AND MMU UNIVERSITY!!
Those in RED are the latest tutorials.
******************************
Contents
- Lecture 1 - Values, Variables and Expressions
- Lecture 2 - Integers and Floating Point Numbers
- Lecture 3 - Casting and Type Boolean
- Lecture 4 - Object Types and Strings
- Lecture 5 - Input and Selection
- Lecture 6 - Complex Decision Making
- Lecture 7 - The 'for' Loop
- Lecture 8 - The 'while' Loop
- Lecture 9 - The 'do while' Loop
- Lecture 10 - Methods 1
- Lecture 11 - Methods 2
- Lecture 12 - Methods 3
- Lecture 13 - Test Case Design
- Lecture 14 - (OUTDATED. USE LECTURE 15)
- Lecture 15 - Applets 1
- Lecture 16 - Applets 2
- Lecture 17 - Applets 3
- Lecture 18 - Methods 3 (continued)
- Lecture 19 - Applet Test
- Code for 19 - Applet Code
- Lecture 20 - Objects 2
- Lecture 21 - Inheritance
*******************************
Android Java (Android specific examples)
******************************
Contents
- Root Access
- Buttons
- Exit Button
- Intents (next screen)
- Writing files to SDcard
*******************************
- Root Access
If you're developing an application that requires root access this is something you will need to know.
There are a few variations and diferent ways of acheiving this, but in my opinion, this is the most stable and problem free way i've found.
Simply insert this bit of code after the 'setContentView'.
Code:
try {
Process process = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(process.getOutputStream());
{
os.writeBytes("mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system\n" +
"exit \n");
os.flush();
process.waitFor();
}
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
What does this do?
Well, not only does it attempt to gain root access, it will pause the application untill the user grants it SU access. Without the "process.waitFor();' line (and the second 'catch'), your application can get a little messy because the screen will be displayed underneath.
The 'os.writeBytes' statement is, as you probable guessed, holds the command you want to execute as SU. In the above example, it will remount the filesystem as Read/Write and then exit. Remember, whatever commands you use, you will need to put a '\n' to signify the end of a line.
Warning: NEVER leave this bit completely blank, as your application will lock up. This is because you're opening up a command line and not closing it.
Simply chaning it to "exit\n" would not issue any command, but would still ask for root access, so this could be quite useful.
- Buttons
Perhaps one of the most important parts of your application; buttons are very simple to implement but can be a little confusing at first.
First of all you will need to place one on your "main.xml", or whatever yours is called, or type in the code below (which i prefer, as dragging it across from the Views list messes up the indentation and makes it hard to edit).
You don't have to bother with code for the button layout if you don't want to, as it can all be done from the properties menu, but i wouldn't advise you do it this way.
Type this in your 'main.xml':
Code:
<Button
android:text="Button01"
android:id="@+id/Button01"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</Button>
As you probably guessed, "wrap_content" can be replaced by either "fill_parent" or a numerical value in either 'px' or 'dp'. You should also give your button a more relevent name than Button01. For ease, i will call it ExampleButton.
Now that's done, move across to your .Java file. For your button to work we will need to implement a 'click listener', but first you will need to add the following to the top of your java file (before the Public Void bit).
Code:
private Button ExampleButton;
and then, in the main body add:
Code:
ExampleButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {;
*/ code goes here /*
}
});
Then your button is ready for code! (see below!)
- Exit Button
This one stumped me for a while, but as it turns out, it's incredibly simple to do. First you will need to create a button (see above) to act as the Exit button.
Once you've done that, add the following before the public void (this code can be added directly to the button, but i prefer doing it like this so it can be called from anywhere instead of typing it all out again).
For example:
Code:
public class Example extends Activity {
[B]public void killActivity() {
this.finish();
}[/B]
public void ...etc
Once done, this will allow you to simply insert "KillActivity();" to close your application!
So here's my exit button:
Code:
Exit.setOnClickListener(new OnClickListener() {
public void onClick(View v) {;
killActivity();
}
});
Easy!
- Intents (next screen)
When your app starts getting a bit more advanced you may want more than one screen. This is quite easy to acheieve but can be quite messy if not done right.
Ok, first you'll have to create another .xml file (just copy and paste main.xml and delete all it's contents, that's the easy way! We'll call it screen2.xml).
Now, in your main.xml add the following code:
Code:
Intent a = new Intent(main.this, screen2.class);
startActivity(a);
You'll notice it will kick out a few errors. That's because your new screen2.xml hasn't been given an activity yet.
Open up your AndroidManifest.xml and add the following under your main activity (After the </activity> tag, but before the </application> tag!):
Code:
<activity android:name=".screen2"
android:label="@string/app_name">
<intent-filter>
</intent-filter>
</activity>
This should open up another identical activity over the top of the original one. If you want to close your original one instead of having both open you can just add your 'KillActivity();' after the code above!
- Writing files to SDcard
This little tutorial will tell you how to store files in your program and then on a button press, move them to a directory on your SDcard.
First of all, this tut requires you to create an additional folder for your app, so locate where the project is stored and under the folder 'res' (where you have drawable, layout, etc.) create another folder called "raw".
Now, whatever files you wish to store will have to be renamed.
For the files to be accepted you must remove any capital letters from the file name, any symbols and you also must remove any extension. So, a text file called 'Text1.2.txt' would have to be renamed to 'text1'. You must remember the extention though, as this will have to be restored manually later.
once your file is in place, you can create a directory for your files to go in. Using the command we learned for the 'Gaining Root Access' tutorial, we will create an 'Example' folder on your sdcard:
Code:
try {
Process process = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(process.getOutputStream());
{
os.writeBytes("mkdir sdcard/example\n" +
"exit \n");
os.flush();
process.waitFor();
}
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
Once that's done, you can add the code to move the file (usually to a button press):
Code:
try {
InputStream ins = getResources().openRawResource(R.raw.text1);
int size = ins.available();
// Read the entire resource into a local byte buffer.
byte[] buffer = new byte[size];
ins.read(buffer);
ins.close();
FileOutputStream fos = new FileOutputStream("/sdcard/Example/Text1.2.txt");
fos.write(buffer);
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
More to come!
Thank you thank you thank you!!!!! I am learning java for android apps right now and I really needed a quick source for some extra info. If u have any tutorials on learning java for development outside of android that would be great also.
Thanks a bunch,
Ljbaumer
Meltus said:
Once done, this will allow you to simply insert "KillActivity();" to close your application!
So here's my exit button:
Click to expand...
Click to collapse
That will only kill the activity that calls it. If your application has many activities you need to call finish() on all of them individually.
jgittins said:
That will only kill the activity that calls it. If your application has many activities you need to call finish() on all of them individually.
Click to expand...
Click to collapse
Yeah, but i'm writing it from the perspective of a basic android app with only 1 activity.
These are only proper basic tutorials to help people starting out
i've just started developing in general, with the hope of one day being a rom developer. These are the kind of resources that I need thanks!
Basic Universal java tutorials added to the first post.
ALL CREDIT FOR THESE GO TO NICK COSTEN (whoever he is!) AND MMU UNIVERSITY!!
[UPDATE]
Universal Java tutorials 'Methods 1' and 'Methods 2' added.
[UPDATE]
Universal Java Tutorials "Methods 3", "Test Case Design" and "Applets 1" added.
Good stuff...
I will def have to take a look sometime...hardware +...software/programming...D+ lol
[UPDATE]
Universal Java Tutorials "Applets 1" and "Applets 2" added.
Note: Lecture 14 has been replaced by a more up-to-date and concise Lecture 15.
Hi Meltus, just started on Android not long ago I'm still new to coding as well.
Would you assist me in how to code this part for my Android App?
I have a list of Name & Number both stored in String[] phoneNumbers, name.
How can I make a ListView with Checkbox and then upon clicking a button it does a check on those checked and add their position into an int[] ?
+-----------+----------+----------+
| Checkbox | Name | phoneNumbers|
+-----------+----------+----------+
Would be great if you could do up the code I'll definitely donate as a token of appreciation.
You could PM me if you prefer.
Cheers!
Cool,
Thanks for the tuts! You can never have enough material. I am a beginner, but i'm picking it up pretty fast.
Hehe. I took the easy way out and just use ListView with Multi Choice option.
Awesome man thanks for sharing. I'm not a dev but I can see how helpful this could be to someone who is starting out, because I know how much of a pain it can be searching for very specific things sometimes.
Thanks for the contribution!
Universal Tutorials added.
- Lecture 17 - Applets 3
- Lecture 18 - Methods 3 (continued)
- Lecture 19 - Applet Test
- Code for 19 - Applet Code
- Lecture 20 - Objects 2
- Lecture 21 - Inheritance
can u make a video tutorial pliz3?i realy bad at reading english and when i translate it on google translate its going wrong..