Everything Motorola Q  
Home Motorola Q Store Moto Q Software News Motorola Q Reviews Moto Q Forums FAQs Wiki Contact Us Everything Q RSS feed


Go Back   Motorola Q Forum | Everything Q > Q Software Developers > Software Developers

Reply
 
Thread Tools Display Modes
Old 07-18-2007, 10:34 AM   #1 (permalink)
 
Join Date: Jun 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
BobH42 is on a distinguished road
Default Need Help Creating Home Page Plug-Ins

I'm using Visual Studio 2005 and while I could conceivably code in C++ or C# I'd much rather stick with Visual Basic if at all possible since that's my primary language I use.

I've got everything set up to develop on the Q...the skins under Visual Studio, etc. I've even able to compile and deploy a simple application to the phone (parsed a web site and popped up a line from it). Unfortunately, I can't seem to find a simple, step-by-step guide to taking a program that last step from being an application to being a plug-in that can be included on the home page. I've never developed a plug-in for any program let alone the Motorola Q's home page so I don't have the background to decipher a lot of the sites I've found that assume you've done this before.

Thanks in advance!
BobH42 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 07-24-2007, 05:41 PM   #2 (permalink)
 
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
elacksjr is on a distinguished road
Lightbulb

haven't programed in a while, but what you need to do is register your app as an XML app. the home screen is an XML page, and so you can call anything yo have a Class ID for. Hope that helps. You can even pass arg that way.
elacksjr is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-05-2007, 11:23 AM   #3 (permalink)
 
Join Date: Sep 2007
Posts: 12
Thanks: 3
Thanked 24 Times in 1 Post
machx0r is on a distinguished road
Default

Visual Basic is my preferred language as well. While I haven't attempted to write a homescreen plugin I think you'd be better off using C++ to avoid any performance hits on your homescreen.

Microsoft provides a sample C++ homescreen plugin solution with the Windows Mobile 5.0 Smartphone SDK. At least I believe it was installed with the SDK and not seperately. The example is installed at "C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Smartphone SDK\Samples\CPP\Win32\Homescreen" on my PC.
__________________
-- Cory

www.charltonfamily.net
machx0r is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-05-2007, 02:56 PM   #4 (permalink)
 
qwho's Avatar
 
Join Date: Oct 2006
Location: Pittsburgh, PA
Posts: 298
Thanks: 2
Thanked 21 Times in 14 Posts
qwho is on a distinguished road
Default

Quote:
Originally Posted by machx0r View Post
Visual Basic is my preferred language as well. While I haven't attempted to write a homescreen plugin I think you'd be better off using C++ to avoid any performance hits on your homescreen.

Microsoft provides a sample C++ homescreen plugin solution with the Windows Mobile 5.0 Smartphone SDK. At least I believe it was installed with the SDK and not seperately. The example is installed at "C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Smartphone SDK\Samples\CPP\Win32\Homescreen" on my PC.
Sortof off topic....
It looks like in the same area of the directory there are VB examples, not of homescreen plugins, though. The one is some sort of message intercepting application... maybe we could use that to create a new text threader app, or a way to have customized alerts per certain messages, or flash the camera light when a message comes in...(someone at qusers made a free copy of pocket light, with the source code downloadable)
__________________
qwho is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-05-2007, 03:08 PM   #5 (permalink)
 
Join Date: Sep 2007
Posts: 12
Thanks: 3
Thanked 24 Times in 1 Post
machx0r is on a distinguished road
Default

I wrote Moto Q Flashlight :-)

The PhoneFinder sample is pretty slick if you ask me. The only flaw I see is that MessageInterceptor class only seems to work with text messages. I couldn't get it to read my email messages. If you do build and install this sample be careful who you give your pin too. Sucks to have your phone start screaming "I'm over here" during a meeting :P

There is also some CF.NET samples in the "101 Samples for Visual Basic 2005" packages at http://msdn2.microsoft.com/en-us/vba...89075.aspx#net
__________________
-- Cory

www.charltonfamily.net
machx0r is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-05-2007, 03:18 PM   #6 (permalink)
 
qwho's Avatar
 
Join Date: Oct 2006
Location: Pittsburgh, PA
Posts: 298
Thanks: 2
Thanked 21 Times in 14 Posts
qwho is on a distinguished road
Default

Cool, I was just playing with your source lol. Very nice. Any chance you found a way to use it with VB? My c++ skills are lacking.

Does the finder work? Have you tried it?

How does it manage to stay open 24/7? Is it always accessing the message intercept?

Sorry for all the questions lol.
__________________
qwho is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-05-2007, 04:11 PM   #7 (permalink)
 
Join Date: Sep 2007
Posts: 12
Thanks: 3
Thanked 24 Times in 1 Post
machx0r is on a distinguished road
Default

Quote:
Originally Posted by qwho View Post
Cool, I was just playing with your source lol. Very nice. Any chance you found a way to use it with VB? My c++ skills are lacking.
Thanks. That was my first Visual C++ and C# application. Some of the structures needed for the DeviceIoControl native function were not easily reproduced in VB or C# so I built the C++ DLL to wrap the native functions. If you want to use the camera flash in a VB or C# application do this:
  • Right click your project
  • Select Add -> Existing Item
  • Browse to "MotoQCameraFlash.dll" from my source and add it
  • Under the File Properties for "MotoQCameraFlash.dll" set the "Build Action" to "Content" and the "Copy to Output Directory" to "Copy Always"
  • Add "Imports System.Runtime.InteropServices" to your code or References
  • Setup DllImport calls to add CloseCameraHandle(), DisableFlash(), EnableFlash(), and OpenCameraHandle() from my DLL to your VB project.
  • To enable the flash call OpenCameraHandle() then EnableFlash()
  • To disable the flash call DisableFlash() then CloseCameraHandle()
It's easier for me to explain through code (and probably easier for you to understand) so here is a quick example VB project: http://www.charltonfamily.net/downloads/misc/For%20qwho.zip

In my Moto Q Flashlight I wrapped these functions into the CameraFlash class (CameraFlash.cs) to provide better control over when to open a handle and track the state of the flash.

A trick you might find handy for converting code from C# to VB or vice versa is to decompile the exe with Reflector (http://www.aisto.com/roeder/dotnet/) and then choose your preferred code language in the drop down. This has helped me immensly to transition from VB to C#


Quote:
Originally Posted by qwho View Post
Does the finder work? Have you tried it?

How does it manage to stay open 24/7? Is it always accessing the message intercept?
Yes it works well. The application does not run constantly. When you exit the application through MenuItem1_Click a new MessageInterceptor class is created. The MessageInterceptor.EnableApplicationLauncher() sub creates a rule (not sure where, registry probably) that launches the application if the MessageCondition specified is met.

Quote:
Originally Posted by qwho View Post
Sorry for all the questions lol.
No worries I'm happy to help.
__________________
-- Cory

www.charltonfamily.net
machx0r is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-06-2007, 09:26 AM   #8 (permalink)
 
qwho's Avatar
 
Join Date: Oct 2006
Location: Pittsburgh, PA
Posts: 298
Thanks: 2
Thanked 21 Times in 14 Posts
qwho is on a distinguished road
Default

Does the message intercept work with active sync emails as well?

I am editing the code now and trying a few things.
__________________
qwho is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-06-2007, 11:02 AM   #9 (permalink)
 
Join Date: Sep 2007
Posts: 12
Thanks: 3
Thanked 24 Times in 1 Post
machx0r is on a distinguished road
Default

Quote:
Originally Posted by qwho View Post
Does the message intercept work with active sync emails as well?
I could only get it to work with text messages. Let me know if you get it working on active sync emails.
__________________
-- Cory

www.charltonfamily.net
machx0r is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 10:38 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC8
Integrated by BBpixel Team 2008 :: jvbPlugin R1013.368.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31