how to make the phone vibrate from a c# application? - Windows Mobile Development and Hacking General

I am trying to make a wizard to vibrate from a c# code. i am using the NLedSetDevice native function, but it seems to not have any effect neither to the vibra motor, neither to the leds. Did anybody managed to achive this, and willing to share the code/give directions?
Thank You

a program called LEDup can do this.
Maybe check in to that app...

Check my simple tool (source code available) LEDUp - simple LED control program: http://forum.xda-developers.com/showthread.php?t=283302

Related

Switch Radio on&off from .NET

Hi, I'm a .NET developer and I want to start to develop mobile apps.
My last device is a KJAM that need pen-tap to toggle radio on & off and this is a little frustrating for me (especially when it rains). So I decided to develop a simple (!) app so I can switch my phone on and off simply pressing the "red" button (for example).
Now I found how to bind the red-button-press event to my app but I really not yet found the (damn) method that let me to switch the phone (radio) on and off.
Can someone give me PInvoke samples to use in my C# app?
thnks
At least I can point you to an application, that does what you want.
read the thread http://forum.xda-developers.com/viewtopic.php?t=34831&highlight=
See my posts there (Conchas), and the .exe turned available by Koksie.
The same .exe toggles between enable/disable.
It is really great
thanks a lot ...
even if I wish to develop this app by myself (to start to "surf" the PInvoke hell) of course your advice will help me to reduce my frunstration switchin on my phone
You can always PM Koksie, asking for the function call he used.
I'll do it but he downloaded the program ... in the meantime ... the hardware button "4" now switch my radio on and off

today screen Plugin ?

hi
any one know how to code my own Today Screen Plugin?
i m a programmer.
i want to create my own usefull Today Screen Plugin like Clock.
short cuts. and timer..
i can only develop application for O2, but i dont know how to make
Today Screen
Hi tinkyawoo!
I assume you program in c++?
Today plug-in is basically a DLL that exports two functions with fixed ordinals.
InitCustomItem - the important one, and another (don't remember the name) for options dialog (if you want one).
There is an article on this at www.pocketpcdn.com.
You can also use my code published here for reference:
http://forum.xda-developers.com/viewtopic.php?t=45084
Good luck!
thanks. i will check it
tinkyawoo: if you're a programmer, I suggest checking out the SDK; it has a good example framework for a plugin, although watch out for the repainting bug in the sample.
Otherwise, read levenum's source code as well. It's excellent. You can learn a lot.
V
Would it not be possible....
Would it not be possible to write a small dll which can be controlled from VB.NET or C#.net to display certain things?
If this was released (under BSD or another permissive licence) then we could all use it to develop stuff, which would help those of us who's first language is Basic
Today Plugin
Unfortunately you can't write today screen DLLs in .Net.
There is a lot of info on the microsoft web site - if u care to search.
They do - however - give you a means of writing a EVC DLL that calls a .net application for the today screen info , but I haven't tried it.
Charlie Grillo
Re: Would it not be possible....
What do you mean by "controlled from". Do you want a .NET app to be able to effect the plug in somehow? If so, it is possible...since .NET is managed code and the plug-in is a native dll, the simplest way to have the two communicate is via windows messages.
You can do the following:
-Register a custom Message that your .NET app will broadcast to your plug-in(s)
-in your DLL WndProc procedure, listen for that message and act accordingly
Alternatively, you can have the dll do the same thing, but ofcourse, your .net app would have to be running to recieve that message (unless you have the dll launch it directly).
JonTheNiceGuy said:
Would it not be possible to write a small dll which can be controlled from VB.NET or C#.net to display certain things?
If this was released (under BSD or another permissive licence) then we could all use it to develop stuff, which would help those of us who's first language is Basic
Click to expand...
Click to collapse

Managed API for Special HTC Buttons

Hi Guys
Does anybody have a way how to stop Hardware Buttons doing the Job they have to do by OS settings from their Compact Framweork Applications?
e.g. I would like to use the Volume Controller on Wizard/Magican within my Application - an no Popping up?
Anybody done this? - I know it is possible on C++ Apps (like Screenshot Applications) - nevertheless I would like to use it in C# - yes I can Pinvoke so if anybody points out the DLL's it should be ok for me
BR
Daniel

Hook CreateProcess() function call

Hey,
is it possible to make a hook on the CreateProcess() function call
under WM5?
I want to develope a process blocker app. Currently I poll the process list
with CreateToolhelp32Snapshot() every second but this will
make to much cpu load and drains battery.
Has anybody experience in hooking functions on WM5?
Thanks!
Houser
Hi houser.
Sorry I don't have a link but if you look up mamiac's posts here you should find a source code for hooking CreateFile and some other functions.
I am fairly sure it can be adapted to hook other API as well.
I haven't seen mamiac on this forum for a long time, but he has his own site (once again sorry, I do not remember the address), check it out or try contacting him directly.
Thanks levenum,
have found the post about CreateFile hook from mamaich.
I will try to adapt this to CreateProcess.
Houser
I have found W32_CreateProc definition in psyscall.h and the API
set is SH_WIN32. But the API set has no server process where I can
inject my dll to. How can this work? Has anybody a hint for me?
Thanks!
Houser

How to control or disable LEDs for T-Mobile Wing / HTC Atlas (includes source)

I spent a good week or two hacking my Wing to figure out how to get rid of those obnoxious blinking LEDs while preserving the vibrate feature. I have not gotten low enough level control to do the fun things I want with the LEDs, but I did succeed enough to accomplish two of my objectives:
1. Disable the blinking LEDs.
2. When a notification is received, light the LED continuously instead of blinking.
I decided to share the fruits of my labor at this point. Attached is a device driver that acts as a proxy and filters IO control signals to accomplish the above objectives. It includes the source code so you can see how to do this yourself if you wish.
This is not a complete software package. It requires manual installation including editing the registry (instructions are included), so it is only for advanced users. I plan to eventually release a complete solution.
I have only tested this on the Wing, but theoretically it may work on some other HTC devices. Please examine the source to understand how it works and check your device for compatibility before attempting to install it on a device other than the Wing.
And for legal considerations: USE AT YOUR OWN RISK.
Enjoy!
P.S. I will subscribe to this thread, so if you have any questions, post a reply.
Hey this sounds great!! !! !!
I tested this on my Herald and it worked fine. Tested it on my Kaiser aswell and it works there!
Keep up the good work!
Tested it on a HTC TyTN, but there is no HKLM\Drivers\BuiltIn\Peripheral
Thanks for testing this on other devices.
Just a note, if there's a HKLM\Drivers\BuiltIn\AllLEDMgr key, then nueLED would work. In fact, it says it will work for the Titan on the nueLED home page. http://www.weienterprises.com/nue/nueled.html I did my project because there was not a solution yet for the Atlas.
registry change?
hmm, this sounds good, but how do i make the registry change described in the instructions?
You need a registry editor. Google "Pocket PC Registry Editor" and you'll find a ton of them. I personally wrote my own, because I wanted to be able to edit it using the device itself and I refuse to pay money to edit my registry. But it's not finished enough to release...
Awesome. This works perfectly on my T-Mobile Wing.
Works very well on my TMobile Wing. I do get the solid orange light when i get miss calls. However, when I get sms messages, no LEDs turn on. I am using ThreadedSMS. Any chance I can make the LED turn on when I get new sms message?
Thanks!
My proxy driver simply intercepts control signals that are already being sent from some program to the driver that controls the LEDs. The code that indicates the notification light (faster blinking orange) is changed before it is forwarded to the code normally used when charging (solid orange).
What most people probably don't know is that there is actually normally a change in the LEDs when you have a notification... It's just not very effective at notifying you lol. The left LED changes from blinking green every 1 second (indicating reception) to blinking orange every 0.5 seconds. My driver changes the notification signal that is already being sent to the LEDs normally.
When I receive a text on my Wing, it illuminates, so I'm thinking it's a problem with ThreadedSMS, which I'm not familiar with. It is very likely that the programmers either didn't implement LED signals or failed to realize that the Wing (and other HTC devices) actually had any normally lol.
There seems to be multiple threaded SMS clients when I do a web search. Could you give a link to the exact one you're using? They may have made it extensible where a plug-in could be written. Or if the programmers wanted to add that functionality, I'd be happy to help them if they can't figure out from my source code how it works.
Thx for the fix! Worked like a charm!
(T-Mobile Wing)
Wow this thing is awesome!! Is there any way you can make it stay a solid blue instead of orange? Or blink blue instead of solid orange and blink green like normally...?
I've been looking for a way to change the LEDs... thanks man.
Well since I'm not getting a reply... can someone at least tell me what would I use to compile the source after I attempt to edit the file(s) to make the LED stay a solid blue?
led alerts
I'm looking for an app that I can set the LED's on a wing. I had a BB and used a app called "Blackberry Alerts". Does anyone know of anything like it???
buru898 said:
Well since I'm not getting a reply... can someone at least tell me what would I use to compile the source after I attempt to edit the file(s) to make the LED stay a solid blue?
Click to expand...
Click to collapse
Sorry I missed your posts. I iterated a ton of LED codes to try to see what all I could do with the driver, but unfortunately, the only ones that did anything were the modes that are used by the device. Solid blue and solid red were not among them... I am not sure if the functionality invoked by the peripheral.dll driver is on some kind of microcontroller chip or another lower level driver. In the latter case, you might be able to find said driver and reverse engineer it the same way I did peripheral.dll.
It has been so long since I did this, I forget what exactly you need to compile it... I did a quick search, I believe this is the right SDK:
http://www.microsoft.com/downloads/details.aspx?FamilyID=06111a3a-a651-4745-88ef-3d48091a390b&DisplayLang=en
You'll need Visual Studio 2005 Standard (or better) or 2008 Professional... I programmed the driver as native, not managed, so you shouldn't need to install .NET Compact Framework on your device. Also, Windows Mobile will not execute the driver on startup unless it's signed. So you'll need to do that and install the root certificate that the driver was signed with on the device...
jroc453 said:
I'm looking for an app that I can set the LED's on a wing. I had a BB and used a app called "Blackberry Alerts". Does anyone know of anything like it???
Click to expand...
Click to collapse
I'm not sure what you mean... My program alters the behavior of the LEDs by intercepting the control messages and altering them. It could be modified to alter their behavior in any way the device supports.
If you mean a program that can send appropriate control messages to activate LEDs on the Wing when different events happen, all the information you'd need for such functionality is in the source code.

Categories

Resources