Hello everybody,
After searching without success a weather today plugin that meets my needs,
I decided to write a new application of my own, mainly because apart SPB Pocket weather (which shows very little information ie no moon data), no plugin allows to download data from a site of your choice.
I read all the documentation on MSND and from development forums, and I finally build the first version of the plugin, but I ran into a big problem.
Often the plugin disappear from today applet list, other times the plugin is not showed even if is active, and so on.
So, this is my help request: does anybody have a skeleton of a working today plugin? I really much appreciate some help!
Surely I will release my application on this forum, since I don't want to make money with it.
Thanks in advance!
There's a working today plugin in the sdk I think.
Also check here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/ppc_yapi.asp
There could be many reasons why your plugin is disappearing:
You're not trying to set its height to 0 or less are you? I've found that causes itself and other plugins to bugger up if you do that.
It could be disappearing from the today plugin list because it's causing a crash on being parsed by the today options dialog. ensure you've implemented any options dialog correctly, or not at all.
How are you parsing the weather data? I've got to write my own plugin to do this at some point... Are you parsing xml or hardcoded html pages?
V
First of all, thanks vijay for your reply.
As for your questions:
1) yes, I initially set vertical height to zero, then on the first WM_TODAYCUSTOM_QUERYREFRESHCACHE or when I need to resize, I set the cyp member of TODAYLISTITEM to my desired height and return TRUE. Are you sure that this could be the cause? Every sample I found uses this technic.
2) I've implemented an options dialog, but not via the specific exported function, so in the registry I set the "Options" key to zero.
3) The idea behind the weather data is: I read an XML file with certain keywords, wich is created by an external exe that reads weather data from internet and create the XML file. I have written code that reads from accuweather.com, but everyone who has some programming experience can write his own and read from his favourite forecasts site. Basically you have to read an internet page and create an XML file with my specification, then the today plugin reads and show data.
Bye!
Sounds like a good implementation.
1) is correct, that's how to set the size. I meant that if you try to fix the size to 0 at some point after first refresh, it causes it to screw up. But if you're always > 0 no problem.
2) If you've set the options registry to 0 it shouldn't be a problem. Presumably the options button is disabled in the today options settings?
3) Sounds good, looking forward to seeing it.
Hmmm. I know some of my plugins randomly used to disappear after changing the settings etc. I think it's really just some loose code somewhere, but they're hard to debug. If you get desperate you can send a copy over and I'll try to look over it, but I think if you just fill in the blanks around the today plugin in the sdk, hopefully you should have a working model.
Oh, one thing that does come to mind:
"Painting problems with a PocketPC Today Screen plugin"
http://blogs.msdn.com/windowsmobile/archive/2004/10/06/238856.aspx
V
http://forum.xda-developers.com/viewtopic.php?t=21786&highlight=today+plugin
Related
Hi folks,
You guys might already know about this but I just discovered how to do it after doing some heavy googling over the past couple of days. Many thanks to the guy at this link who made the discovery!
How to lock down the clock on Windows Mobile devices
I was reading through some of the messages on the microsoft.public.dotnet.framework.compactframework newsgroup when I came upon a real gem of a message.
The key piece of knowledge being, that there is a special registry key, that will disable GUI access for the clock on Windows Mobile devices.
Application State Registry Key for Windows Mobile Clock
HKEY_LOCAL_MACHINE\Software\Microsoft\Clock\
If this is set to 0x11 the clock is enabled, as by default. If it is set to 0x30, or probably anything not 0x11, it is disabled and ignores any attempts to run.
If you are writting any kind of salesforce automation applications, or route management software, then you can see just how useful this feature is. You just add a special admin feature to enable and disable the ability to set the time, or handle it entirely from within your application.
Now I just need to find out why this key even exists, since I hate to find out the OS likes to change it under circumstance X.
// disable clock
System.Byte[] offValue = new byte[1];
offValue [0] = 0x30;
OpenNETCF.Win32.RegistryKey registryKey =
OpenNETCF.Win32.Registry.LocalMachine.OpenSubKey(@"\Software\Microsoft\Clock\", true);
registryKey.SetValue("AppState", offValue);
registryKey.Close();
// enable clock
System.Byte[] onValue = new byte[1];
onValue[0] = 0x11;
OpenNETCF.Win32.RegistryKey registryKey =
OpenNETCF.Win32.Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Clock\", true);
registryKey.SetValue("AppState", value);
registryKey.Close();
Click to expand...
Click to collapse
And the link to the original source -
http://www.cjcraft.com/Blog/PermaLink.aspx?guid=0b590db3-cc90-45fa-822e-acf91f031052
I was pulling my hair out over that one the last couple of days!
Cheers,
Dav
Hi dav!
I am sorry to burst your bubble, but I tried this registry hack, and found there is an easy way around it, with out editing the registry.
If you hold the OK hardware button (in the center of the joystick, on those devices that have it) then tap and hold the clock (in the task bar) you get a little menu with 2 options: Run and Clock.
If you choose clock from this menu, the app will start and the registry setting will automatically be altered so you will be able to open clock settings normally from now on.
Further investigation showed that the lower 4 bit of the AppState walue (ones digit) simply selects on what tab the clock app will open. Legal values are 1-3. Any illegal value (like 0) will jam the app preventing it from opening by tapping the icon in settings. I suspect that if a command line switch is specified it overwrites the registry value and the app opens any way. (that’s how the menu works)
Just thought you should know.
Hi levenum,
Thanks for the insights! I just tried it too and sadly that is the case ;-( Mmmh, I wonder if there is a way to hide 'Clock' from the Run\Clock thingy? or disable the Clock in some other way?
mmh, back to the drawing board...
Dav
Here's what you might try:
Create a cab that deploys an empty clock.exe to windows directory on the device.
Clock.exe is a ROM file, but a cab should be able to overwrite it (it won't work manually). This way no matter who calls it (menu or control panel) they will see the empty exe and nothing will happen.
Sounds like a good idea to me! I'll give it a try and see how it goes. Thanks for your continued help
Dav
Worked nice Thankyou!
btw, do you think that overwriting the Clock.exe would have any effect on the 'displaying' of the date in the Today Screen? By clicking the date we launch the Clock.exe program, but something else other than Clock.exe must control what shows the current date, right? I mean, the current date wouldnt just stay on the date on which we delete Clock.exe?
Cheers and thanks again,
Dav
Actually, if the exe was responsible for the date on the today screen, you wouldn't see anything once you overwritten it. Today date is just another plug-in. I think its clockdll.dll but I am not sure. Whatever the file name, it takes the date directly from the system clock.
As I understand it clock.exe is just a little GUI utility for setting system time, and alarms.
That sounds right and what i was thinking, always good to have a second opinion for confimration.
All the best,
Dav
seems like you guys might know what your doing, so do you know how to get the battery removed and the clock back on the today screen of WM5 latest rom releases....
levenum said:
Hi dav!
I am sorry to burst your bubble, but I tried this registry hack, and found there is an easy way around it, with out editing the registry.
If you hold the OK hardware button (in the center of the joystick, on those devices that have it) then tap and hold the clock (in the task bar) you get a little menu with 2 options: Run and Clock.
If you choose clock from this menu, the app will start and the registry setting will automatically be altered so you will be able to open clock settings normally from now on.
Further investigation showed that the lower 4 bit of the AppState walue (ones digit) simply selects on what tab the clock app will open. Legal values are 1-3. Any illegal value (like 0) will jam the app preventing it from opening by tapping the icon in settings. I suspect that if a command line switch is specified it overwrites the registry value and the app opens any way. (that’s how the menu works)
Just thought you should know.
Click to expand...
Click to collapse
wow..thanx for this. worked like a charm on my wing (and 2 yrs after it was posted i might add =P). i thought my alarm clock was lost FOREVER!
Hi,
I found the following code in this discussion thread:
// disable clock
System.Byte[] offValue = new byte[1];
offValue[0] = 0x30;
OpenNETCF.Win32.RegistryKey registryKey =
OpenNETCF.Win32.Registry.LocalMachine.OpenSubKey(@"\Software\Microsoft\Clock\", true);
registryKey.SetValue("AppState", offValue);
registryKey.Close();
It looks pretty useful to me but It has some OpenNETCF keyword.
Please suggest me what is OpenNETCF? Is it an additional third
party compact framework and how can I get this?
Also, if it is inbuild reference by Microsoft, from where to get it?
-Abhishek Maitrey
OpenNETCF is an extra SDK for WiMo devices. Search for it....
In this situation it's not needed.
I built a Today plugin (with a little help from folks on this forum) originally for WM5 devices (you can see it here). Everything works great.
Based on user requests, I re-targeted it to work on PPC 2003 SE devices also. Here's the problem: Now, the Options window won't open until the plugin is actually loaded. In other words:
1. After a fresh install, go to Today settings, highlight plugin, click options - nothing happens.
2. Check plugin, close Today settings, re-open Today settings - Options now work.
Any thoughts an why it behaves like this? I've compared the two versions ad nauseam, tweaked this and that to no avail. (this was built using VS 2005)
The options + the today item code are in the same dll and it dose not get loaded until after the items window is dismissed. This is normal behaviour and there is not much you can do about it. If you watch the task bar you will notice a flicker at this exact time (ie closing items window). I think a system-wide message is sent at that time to indicate a setting change. Find that message and you may have something to work with but there is no garantee that your item will get loaded even if you send that message during the installation.
OdeeanRDeathshead said:
The options + the today item code are in the same dll and it dose not get loaded until after the items window is dismissed. This is normal behaviour and there is not much you can do about it. If you watch the task bar you will notice a flicker at this exact time (ie closing items window). I think a system-wide message is sent at that time to indicate a setting change. Find that message and you may have something to work with but there is no garantee that your item will get loaded even if you send that message during the installation.
Click to expand...
Click to collapse
Hey - thanks for the help! Similar to your suggestion, I implemented a post-installation step (another first for me) that executes SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0); This refreshes the Today screen, causing my plugin to load immediately.
Perhaps version 1 always did this and I just didn't notice...
Hi. I'm using cLauncher and I'm wondering if there was a way to get things like phone settings, display settings as an icon setting on the Today screen. Going through menus is a bit slow for frequently used functions. Thanks.
There is a thread somewhere around here that deals with making shortcuts for items on your phones "control panel" I wish I could find it, but it's going to be a bit of a ***** to do so probably. If I do find it, I will let you know.
Curious D said:
Hi. I'm using cLauncher and I'm wondering if there was a way to get things like phone settings, display settings as an icon setting on the Today screen. Going through menus is a bit slow for frequently used functions. Thanks.
Click to expand...
Click to collapse
This might help.
You can use this cab to create a link to the today settings and then add it to cLaunch. It creates a link to start>settings>personal>today.
In order to link to things such as the backlight control enter \Windows\Backlight.lnk (note lnk is LNK in lower case) into the 'File Path' field within the cLaunch settings. You can also add custom icons as well - search google for suitable 32x32 icons and then convert them to bitmaps. They work a treat.
To find out other useful info about shortcuts check the following posts by vijay555: http://forum.xda-developers.com/search.php?searchid=507575
This link does not appear to be working - use advanced search using the word 'completeness' and the user id vijay555 which will return the required links.
They are very useful and informative. Vijay555 is also a fan of cLaunch from what I gather.
cLaunch is a great piece of freeware! I'd recommend it to anyone!
I am looking for a resource to help me with custom theme development.
I would like an XSLT/API for the XML that defines themes -- I have been unable to find anything like this.
I do not know the tags I can use for each plug-in, their attributes or values.
Thanks
--------------------------------------
http://www.blackjack2.com
If there is no known resource (i couldnt find anything on MSDN for the microsoft plugins) does anyone know how to:
1) Make the Missed Calls plugin label invisible, but still take up the the space on the screen? When i have no missed called the "Missed Calls" plugin collapses to a height of 0px, shifting everything up.
2) How can i set a specific plugin to have focus when going to the main screen - currently the top-most plug-in receives focus by default.
anyone have any ideas on this?
why dont get a homescreen that support it and read....this is the way i learned how to make homescreens.
hello, i'm searching for a today plugin which is similar to the default messaging plugin in wm6. but i want it to show me also the messages itself on screen (for example the last 3 sms or email), is there someting? thanks!
Only use "infinite Today" but the lan of software is chinese.
unfortunately no eng. version of infinitetoday yet.
but you could manage this by pocket breeze.eliminate the other tabs than sms and all icons of settings etc. it gives what you want .
mobile101 said:
Only use "infinite Today" but the lan of software is chinese.
Click to expand...
Click to collapse
hmm could you give ma link to this thing? maybe hexedit or reshack is possible...
is this that app?
http://forum.xda-developers.com/showthread.php?t=444414
Hi there! Have you checked out wisbar advance desktop 2? The app itself does not contain this function, but in combination with mortscript its an easy setup. Wisbar desktop gives you full controll over your todayscreen as in your desktop pc.
If this is the solution you decide to go for, I can help you getting started ;-) If so, PM me
The app itself does not contain this function, but in combination with mortscript its an easy setup.
Click to expand...
Click to collapse
tell me more, i am interested, what ms script can display sms content.
it would be easy to use this in hs++, freeware app then.
i was WAD user in 2005-2006.
here's few shots to prove it:
http://pdaclub.pl/forum/index.php?topic=50666.0
nothin said:
tell me more, i am interested, what ms script can display sms content.
it would be easy to use this in hs++, freeware app then.
i was WAD user in 2005-2006.
here's few shots to prove it:
http://pdaclub.pl/forum/index.php?topic=50666.0
Click to expand...
Click to collapse
Sure m8! But for the ease of it I will just copy a post from lakeridgesoftware.com. The reason why I copy it over here is that this forum should contain it all. This is the work of a guy called allanlsmith and here it goes:
alanlsmith lakeridge forums said:
Script Updated 30 Jan 2009
With improved method of splitting lines, hopefully to stop the odd message disappearing off the right hand side of the screen.
The only script that has changed is 'ReadSMS.mscr' & it now puts all the lines of the message into one registry value, so you need to change your registry text in WAD to point to 'HKLM...\Messaging\SMS\Message' rather than Line1, Line2, etc.
As before you can adjust the length & number of lines by altering the appropriate values at the begining of the script.
__________________________________________________ _______________
An earlier question from Neodd70 prompted me to look into being able to preview message on a virtual page, I've come up with what seems to be a viable solution for SMS, I have used a component(s) from ThrottleLauncher www.throttlelauncher.com which the author APBilbo has kindly allowed the use of as a standalone application.
As you can see from the screenshot I've ended up with it looking like a sort of copy of the message page from Manila 2D, I've included the images if you want to use them.
It allows a preview of the first 7 lines of a message & adds "..." at the end if the message is longer. the included shortcuts are 'SMS Next' which moves to the next newest message, 'SMS Previous' which moves to the next older message, 'SMS Details' which shows the whole message in a HTML window, 'SMS Refresh' which should be used as the page entry script, as this will display the most recent message on the page & 'SMS Reply' which, well, allows you to reply to the message sender.
The Registry entries that are created / updated when the shortcuts are run, are as follows, All under 'HKEY_CURRENT_USER\Software\My_Utilities\SMS' :
'Line1' to 'Line7' this splits the text into individual lines, 'Read' indicates if the current message is read or unread, 'Selected' is the number of the current message, 'Total' is the number of messages in the inbox & 'Sender' is the sender.
As neither the application or WAD do textwrapping the Mortscript 'ReadSMS.mscr' parses the message into lines, currently set to 25 chars long to suit my QVGA screen & the images I use, but if you change the value of 'linelength' at the begining of the 'ReadSMS.mscr. script then you can make them whatever length you want.
To actually use this, all that is needed is to copy the folder 'Message2Reg' (which contains the applications, DLLs & scripts) to '\Program Files\' & the 'Messages' folder (which contains the shortcuts) to '\Windows\Start Menu\Programs. Then on your selected page assign 'SMS Refresh' as the page entry script & the Next, Previous, Details & Reply shortcuts to appropriate buttons to suit your chosen layout.
Oh, & if you don't want to use the HTML preview you can delete 'template.html & 'OpenNETCF.DLL' which will save about 220Kb.
Note: opening the message in the HTML preview will mark the message as read, whereas viewing in the 'envelope' will not.
It should all work reliably, but no guarantees.
Edit: Throttle Launcher does not need to be installed, but you do need to create the registry key 'HKLM/Software/ThrottleLauncher/Messaging' then the first time the program is run it will create the necessary subkeys below this.
Click to expand...
Click to collapse
For all non english devices: You have to make a folder in your units root called "Storing Card" to make this work.
nothin said:
i was WAD user in 2005-2006
Click to expand...
Click to collapse
Then you shold check out WAD2! I cannot imagine myself owning a WinMo without it! There is NOTHING developed here at XDA that can touch this. (No guys .. all your work are great! But this is the king of the hill..)
thedaniel said:
Then you shold check out WAD2!
Click to expand...
Click to collapse
Well there are two crucial problems here(and few lesser ones):
- sipicon that pop ups on wm6.1 in bottom-center of screen, reported, but not solved.
- no tray at all, 1.x.x. had it.
Believe me, i do know, what WAD is...
here it goes:
Click to expand...
Click to collapse
thanks, thedaniel, gonna check this later.
You can make your own tray in WAD2
anyways: hope this gets you somwhere
I use SPB Diary. It's not free, but it's a very powerful program. You can view all of your emails and sms right on the today screen, as well as ALOT of other cool stuff. Check it out.
Point UI's Home 2 is just the ticket!
http://www.pointui.com/
You can choose your sms as your today screen, its amazing!