Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

SystemState library for WM 5.0 and later

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-16-2008, 03:47 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default SystemState library for WM 5.0 and later

Windows Mobile 5.0 introduced an API known as the State and Notifications Broker for querying many device settings and raising events when these settings change.

This library enables Basic4ppc to use that API. A list of the settings available is in the help file together with a link to the Microsoft online documentation.

This library requires WM 5.0 or later and .NET 2.0. For technical reasons this library cannot at the moment be merged so there is no source code included with this initial release as putting the source code in the Libraries folder would raise compilation errors.

EDIT :- Source archive added for merging on device compile. See post #5 for how.
Attached Files
File Type: zip SystemState1.0.zip (22.2 KB, 341 views)
File Type: zip SystemState1.0_Source.zip (1.1 KB, 61 views)

Last edited by agraham : 09-15-2010 at 09:00 AM.
Reply With Quote
  #2 (permalink)  
Old 11-17-2008, 01:02 PM
Basic4ppc Veteran
 
Join Date: Feb 2008
Location: Hilversum, The Netherlands
Posts: 295
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi Agraham,
I was just playing around with the same lib using SharpDevelop :-)

This was/is my first attempt in creating a DLL and
I got the BatteryState, Strength and DLL version working so far.

then I noticed your post when I was searching for systemstate...
Could you post your .cs file, just for me to see what you did differently

Thanks
:-)
Reply With Quote
  #3 (permalink)  
Old 11-17-2008, 01:17 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

@Mr_Gee - Here it is.

@everybody - Don't put this in your Libraries folder. It would cause compile errors as it can't be merged due to missing references at compile time.

EDIT :- Source removed. See first post.

Last edited by agraham : 09-15-2010 at 08:57 AM.
Reply With Quote
  #4 (permalink)  
Old 11-17-2008, 01:21 PM
Basic4ppc Veteran
 
Join Date: Feb 2008
Location: Hilversum, The Netherlands
Posts: 295
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Great thanks!
Reply With Quote
  #5 (permalink)  
Old 09-15-2010, 09:17 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

You can now merge the this library in the device executable. Download the source archive in the first post, unzip it and copy the source file to the Basic4ppc libraries folder. Usually it is C:\Program Files\Anywhere Software\Basic4ppc Desktop\Libraries

As this library references two "non-standard" libraries you also need to have these files in the Basic4ppc libraries folder. They are

Microsoft.WindowsMobile.Status.dll
Microsoft.WindowsMobile.dll

You should use the WM5.0 files for preference.

If you have the Windows Mobile 5.0 SDK
- Copy those two dll files from C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Designtimereferences to the Basic4ppc libraries folder:


If you have the Windows Mobile 6.0 SDK
- Copy those two dll files from C:\Program Files\Windows Mobile 6 SDK\Managed Libraries to the Basic4ppc libraries folder:


If you don't have Visual Studio you may not be able to install the SDKs to get the dlls so you can get the WM5.0 files from Taximanias website www.taximania.net Look for the line "If there's a download you require that's not available, Look here", click it and download WindowsMobileFiles.zip.


After compilation a message will say that Microsoft.WindowsMobile.*** should be distributed with the executable. However there is no need to distribute these files.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #6 (permalink)  
Old 09-15-2010, 08:30 PM
Junior Member
 
Join Date: Sep 2007
Posts: 18
Default

Hi agraham,

Really, great work. Thanks!

I'm off to find out how to get SystemState can tell me ACLine is connected

Cheers,
/Cacti
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Door library (Beta) - Special library Erel Official Updates 60 01-13-2011 11:23 AM
Merging Outlook library and Phone library Erel Official Updates 11 09-15-2010 09:22 AM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 07:46 PM


All times are GMT. The time now is 06:37 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0