Background trapping mouse events on WinMo.. posibble? - Windows Mobile Software Development

Hey developers,
Believe me, I tried searching quite a lot but couldn't find an answer, never tried this kind of developing ever.
Let's say that my point is to disable part of screen - eg below 400px will not work - my app will catch those mouse events and stop them.
I tried speaking with Chainfire on IRC but he went for gaming or so and he offered me injecting dll's. I'm not sure if that would be the best idea since I'd prefer to do it on background rather than loading it with all apps.
I was thinking another few minutes and how about loading it as driver or some kind of touchscreen filter and running inside device.exe or any other kernel process (or just as background process, doesn't matter those few kB in memory).
Thanks for any push in any way of doing this, believe me, you won't regret the result . OndraSter

Not sure this is possible with the Win32 HWnd stuff, you can catch and handle Window Messages only within the Window said messages are posted to. Never seen a way to do it system wide. Would probably involve replacing some fairly fundamental components. Same sort of thing we are looking at to get multi-touch working correctly on the HD2.

I heard someone got it working with keyboard, but mouse not because of lack LL_MOUSE stuff etc

maybe develop a driver, like i.e. Touch response does.

Yep that was one of two things that came to my mind - driver or service...
But I have no idea where to start with it though...

Related

Transparent/Translucent Forms & Controls

So I have been searching these forums a bit each day for the past week, and I have yet to see a working solution for SmartPhones AND PPC's alike. I have tried P/Invoking AlphaBlend, SetBkMode, etc. but to no avail. I am not a great coder, so I may be using them wrong.
If anyone knows how to get this to work on SmartPhone's and PPC's, could they please share their knowledge
Thank you!
Cyclonezephyrxz7 said:
So I have been searching these forums a bit each day for the past week, and I have yet to see a working solution for SmartPhones AND PPC's alike. I have tried P/Invoking AlphaBlend, SetBkMode, etc. but to no avail. I am not a great coder, so I may be using them wrong.
If anyone knows how to get this to work on SmartPhone's and PPC's, could they please share their knowledge
Thank you!
Click to expand...
Click to collapse
What exactly do you want to do?
I want to be able to make forms / controls that have Opacity less than 255 ... (I want to do this in C#) ... take, for instance, SMSBubbles, it displays a small bubble at the bottom of the screen about a new text message...how would i be able to achieve that and still maintain the background to be transparent. Also look at SmartToolKit, when you pop open the Start Menu, the back (what is not covered by the menu) remains updating (etc.) but you still get the menu..
I want to do something along those lines...
any help is greatly appreciated
Have you checked out this blog entry?
blogs.commentor.dk/post/Transparent-Controls-in-NETCF.aspx
Or a library: http://beemobile4.net/?sitecateg=products&productID=5
Thanks for the replies, the first I tried implementing, but it didn't work as I would have hoped (The second, well I don't want to pay 45+$ for it...heh)
So I re-tried P/Invoking SetBkMode in the onPaintBackground method:
Code:
protected override void onPaintBackground(PaintEventArgs e)
{
setBkModeCE(e.Graphics.getHDC(), BkMode.TRANSPARENT);
}
I also made sure to P/Invoke
Code:
SetCursor(IntPtr cursor)
...main loop starts here...
SetCursor(IntPtr.Zero)
to get rid of the wait cursor.
While this works perfectly in terms of eliminating the background, it doesn't actually make it transparent. What it does, i can do by taking a screenshot and applying it as the bg (It doesn't update). I suppose I can use a timer and have it update the background on Events of all sorts, on user-activity, and every minute, but that seems like it is a hassle.
That may be the only way to actually do it, I don't know, but it just seems that there is a better way to do it (and be able to conserve RAM).
I used this library in one of my apps: http://code.msdn.microsoft.com/uiframework
Sourcecode is available, written in C# so its easily adaptable to your needs too.

How does Android protect itself from rogue apps?

I'm expecting delivery of the Desire soon, having had a range of WM5, WM6 and WM6.1 handsets so far. Now one of the big problems I experienced with WM was the inability of the OS to protect itself from deep-level rogue code -one app from the Windows Marketplace screwed the last phone considerably, leading to a series of crashes, black screens with ominous warnings about not powering off correctly and so on. Thankfully I had Sprite Backup to haul back a working fileset. On the whole it felt as wobbly as a Win98 install with the wrong version of several core files.
How does the Android OS protect itself from rogue stuff? (especially the newest 2.1 release in the Desire, if it's any different from earlier versions). Does it sandbox the apps and do some heavy brokering of any multitasking? There are thousands of apps to try and I'd rather not knacker things up if one turns out to be a bit flaky...
I've used Linux for years (have mostly had Kubuntu for the past 2yrs, though used to run Suse, Slackware and ZipSlack) and have busted a Linux install just by adding the nVidia kernel drivers - I think that was within a minute of first boot in that case. I know that root access is needed for these sorts of mods - what's the score there on Android handsets?
BTW - couldn't find anything about this on the Search, and am dropping it here because I'm getting the Desire - apologies to Mods if it belongs somewhere else!
- in the market you will see bad ratings and comments if an app is really malicious (obviously the developers can't edit/delete comments from the market)
- apps don't have root access so they can't alter data on the system partition.
- apps need to have permission declared in order to have access to some functions, for example if an app is sending text messages, or modifying contact data you will see this when you install the app
Thanks. I always treat the user ratings with a pinch of salt - the one that messed my Raphael up was a 4*-rated app! I think the thing there was that WM doesn't protect the OS in any special way, and I'm glad that Android is using partitions. Sounds just like a standard Linux distro in that respect, most of which will create 3 partitions unless told otherwise.
Yeah I guess if the app has no root access, then no serious harm can be done to the phone.
Also, try to create a habbit of checking what permissions the app has before installing it. That shows just before installing, or press Menu and then Security. For example, a Game will not need access to contacts, or make calls... etc.
Before I install something I heard nothing about, I always scroll users comments and look for low ratings and see what they have to say about it. But remember that old comments (good or bad) sometimes don't count as apps get updated.
The Market should show when the application was last updated by the developer. I think Apple store already shows that.
Cheers! I'll check it out just as soon as the new phone gets here! Normally I'm dead paranoid about stuff, and don't let anything out to play unless I'm sure - maybe I'm letting one bad installation colour things a bit too much...

What can be done to get open gl working

I am aware that this has been asked many many times, but i don't see a thread for this issue. I would like to know what attemps have been made to get some sort of support. I am by no means a developer, but i will try my best to get things running. Would it be something as simple as taking a a file out of a current android phone with the same specs and modding for use with a touch pro.
I'm simply curious if there is a thread or website around that discusses this and other issues in more detail.
I'm no kernel hacker, but I am...curious.
That's what i would like to know. facts about how far the development is. Maybe we could start a thread that has such progress stated. Where only the devs would be able to post, so we can have us a look.
The best you can do is read the IRC logs from #htc-linux. I think I recall reading in the logs that klinux had gotten OpenGL working on the Pro2, even with applications like Neocore (thought they're apparently slow).
You have to be a little bit more clear on what you mean by "open gl working".
I'm the developer who was working on the open gl for the klinux build. Bottom line is that open gl is working, but not with hardware acceleration. We used then nexus one drivers (adreno200) to enable things a live wallpapers. But it's so slow its not even worth it.
Now to get hardware 3d working 100%? a lot more work and testing. lol.
Well is hardware 3d working for any of the current android ports in any capacity?
Also, I'm so used to reading hardware specs in Desktop computer form. But with these phones, the only thing I know about them is the CPU manufacturer, model number, and speed.
Is there a separate chipset that handles audio graphics etc, or is it completely SoC.
I read about recent Android ports on the iPhone, and it seems they already have things like external audio working. Is this because the hardware on the iPhone similar to another HTC Android phone, more so than the hardware in the Rhodium?
awesome thread... actually informative and supportive.
i think what the OP is saying is how can us lowerscale highend users be more involved, perhaps in the debugging, data gathering... we could start a -sub group dedicated to each corresponding issues... bill gates didnt invent windows, him and his crew did. the more the merrier eh?
I have a long running reverse engineering thing going on. I have been looking for more info other than IRC. I would like to put my good skills to work w/out starting from scratch. Any info?
EDIT: I did find this, It has some helpful starting info: http://www.androidonhtc.com/wiki/Get_Involved
This is a great thread! I've been wanting to get in on some of this action. Hopefully this will reduce some of the clutter in Reefer's thread.
I meant to get hardware acceleration working. How far has this come along since i posted this??
Only Diamond / Raphael has hardware 3D enabled so far.
Very limited 3D for "low resolution" could be enabled in blackstone or other devices with workaround but that is somehow meaningless.
phh has tried different combinations of memory allocation but in vain.
so am I... given up at the moment.
mcdull said:
Only Diamond / Raphael has hardware 3D enabled so far.
Very limited 3D for "low resolution" could be enabled in blackstone or other devices with workaround but that is somehow meaningless.
phh has tried different combinations of memory allocation but in vain.
so am I... given up at the moment.
Click to expand...
Click to collapse
Phh recommended to trace down mem locations used by wince and that has been done but it still refuses to fire up once pmem.c is modified.
Recently i got the wince dmesg from my rhod in hopes that a cold boot would show as to how the 3d is being activated but that also showed no results. I get this crap when Manila is launched.
[ManilaToday](34156): ### Launching manila ###
23:20:09 [DISP] DrvEscape::HTC_SET_3D_LAUNCHING_FLAG.
I'm not sure what HTC_SET_3D_LAUNCHING_FLAG is.
The next step would be to make an android app and trace down what the hell the libgles_qcom driver is actually doing to see if it is working properly. If you load up ahi2dati.dll on winmo you can actually use the functions to show crap on the screen so i'm hoping the same can be done on android.
Not sure what else can be done at this stage.
[ACL] said:
Phh recommended to trace down mem locations used by wince and that has been done but it still refuses to fire up once pmem.c is modified.
Recently i got the wince dmesg from my rhod in hopes that a cold boot would show as to how the 3d is being activated but that also showed no results. I get this crap when Manila is launched.
[ManilaToday](34156): ### Launching manila ###
23:20:09 [DISP] DrvEscape::HTC_SET_3D_LAUNCHING_FLAG.
I'm not sure what HTC_SET_3D_LAUNCHING_FLAG is.
The next step would be to make an android app and trace down what the hell the libgles_qcom driver is actually doing to see if it is working properly. If you load up ahi2dati.dll on winmo you can actually use the functions to show crap on the screen so i'm hoping the same can be done on android.
Not sure what else can be done at this stage.
Click to expand...
Click to collapse
Ok, i would love to help out as i have never rly done anything like this b4. What exactly are you doing. How do you get HTC_SET_3D_LAUNCHING_FLAG?
How would i open a .dll, i dont think these can just be opened up to see what they are doing. I am on the dark side of the moon here. I know whats going on, but have no clue what to do to help.
garage_man said:
Ok, i would love to help out as i have never rly done anything like this b4. What exactly are you doing. How do you get HTC_SET_3D_LAUNCHING_FLAG?
How would i open a .dll, i dont think these can just be opened up to see what they are doing. I am on the dark side of the moon here. I know whats going on, but have no clue what to do to help.
Click to expand...
Click to collapse
I actually found HTC_SET_3D_LAUNCHING_FLAG on the wince dmesg. You can do this by doing a pwf dump.txt 0x16a00000 0xFFFF0 in haret. I did it after a cold boot to see if anything is done to the gpu once wince boots.
Loading the dll is easy. just make a simple win32 app and do a loadlibrary. This part works but it's not helping on android. I'm interested to see what mcdull thinks since i think he has ventured a lot into this as well. Right now if we can make a simple app in android to load the libgles_qcom.so directly and trace every step, i think that would be helpful to see where we are failing. I'm close to giving up..lol i already took 2 sick days from work to get to where i am now so i could use some help.
Here is what i got out of the chip in wince.
name: ATI HandHeld Interface
versions: 2.07.05110.34681
Revision: 0
ChipID: 1362104322
revisionid: 0
TotalMemory: 15990784
BusInterfacemode: 2
InternalmemSize: 262144
ExternalMemSize: 0
Surface info: 800x480
surface total bytes 768000
dwFrameBufferPhysical=0x14c00780 m_dwFrameBufferVirtual=0x57e00000 dwFrameBufSize=0xbb800
Most people here could probably not help with the hardcore kernel dev stuff, but I guess if you need memory locations or so (be it for opengl/sound etc) I think there a a LOT of people that are willing to run some apps that dump a txt file with debugging info & mem locations to their SD-card and send you that
I would love to help with developing, even if it means that I have to boot into winmo and android all night long and gather certain information, memory-adresses, try different versions of programs with all kinds of parameters etc.
Star-Lite said:
Most people here could probably not help with the hardcore kernel dev stuff, but I guess if you need memory locations or so (be it for opengl/sound etc) I think there a a LOT of people that are willing to run some apps that dump a txt file with debugging info & mem locations to their SD-card and send you that
I would love to help with developing, even if it means that I have to boot into winmo and android all night long and gather certain information, memory-adresses, try different versions of programs with all kinds of parameters etc.
Click to expand...
Click to collapse
We need more devs in general. I ran a trace on a basic app that runs 3d. So there is still a lot of crap to examine.
I'm willing to kill my touch pro 2 and remove the CPU to trace the JTAG locations but I only have the datasheet from the MSM7200/7500, not sure if it will be the same locations. I bet if I hooked up my Segger I could see exactly what is failing on the OpenGL and sound side since alot of hardware debugging is done this way...just sucks I dont know for sure if the pinouts are the same. I'm done it on quite a few different phones and boards over the years so its not a big deal. Omap3430 was simple to trace and the OMAP3530 had the exact pinouts.
BinaryDroid said:
I'm willing to kill my touch pro 2 and remove the CPU to trace the JTAG locations but I only have the datasheet from the MSM7200/7500, not sure if it will be the same locations. I bet if I hooked up my Segger I could see exactly what is failing on the OpenGL and sound side since alot of hardware debugging is done this way...just sucks I dont know for sure if the pinouts are the same. I'm done it on quite a few different phones and boards over the years so its not a big deal. Omap3430 was simple to trace and the OMAP3530 had the exact pinouts.
Click to expand...
Click to collapse
Sounds crazy.. i love it.
I was messing around today and made a small app to load the libgles_qcom.so directly to see if i can replicate my winmo success. Most of the ahi functions are included in the android driver as well except for AhiDispSurfGet which made it impossible for me to draw anything on screen.
The chip did pump out the same info as i posted before and it matches so thats a step in the right direction. Means we can recognize the chip with no problems and all 15.25 memory is reporting as well. If i had more documentation on those functions exported im sure i can get the chip to try to display something directly.
Interesting bit of info I read and perhaps someone can clarify this here. The Sprint Touch Pro 2 uses the Qualcomm MSM7600 processor. The AT&T Tilt2 (GSM phone) uses the MSM7201A processor. The "A" refers to the smaller 65nm die size (I believe).
From what I've read, some changes occurred on the MSM7200 -> MSM7201 due to patent infringements. The next question is, is the MSM7201A and MSM7600 essentially the same chip, just different hardware for CDMA/GSM?
I guess the "libgles_qcom.so" library is used in many other HTC Android phones, but for some reason it's failing on the touchpro2/tilt2, and we're not sure why (although logically it sounds like the library should work as it's used by other android phones with the same chipset)? I'm no kernel dev (I write .NET/c# apps which are much easier than kernel stuff), but am somewhat familiar w/ linux and perhaps can assist in development..
NewbTrader said:
Interesting bit of info I read and perhaps someone can clarify this here. The Sprint Touch Pro 2 uses the Qualcomm MSM7600 processor. The AT&T Tilt2 (GSM phone) uses the MSM7201A processor. The "A" refers to the smaller 65nm die size (I believe).
From what I've read, some changes occurred on the MSM7200 -> MSM7201 due to patent infringements. The next question is, is the MSM7201A and MSM7600 essentially the same chip, just different hardware for CDMA/GSM?
I guess the "libgles_qcom.so" library is used in many other HTC Android phones, but for some reason it's failing on the touchpro2/tilt2, and we're not sure why (although logically it sounds like the library should work as it's used by other android phones with the same chipset)? I'm no kernel dev (I write .NET/c# apps which are much easier than kernel stuff), but am somewhat familiar w/ linux and perhaps can assist in development..
Click to expand...
Click to collapse
learn haret/haretconsole and take a look a the kernel. good place to start. Feel free to come into the irc board if you have any questions

Keyboard.

While I like the whole Android series, I seem to be stuck by 1 thing and I'm surprised nobody has thought to mock up an app that functions like this:
SwipeSelection
Someone made something for the Android that's quite similar. However it's still in beta phase and doesn't seem to be receiving anymore progress.
It's called Tyype.
While Tyype works almost identical to SwipeSelection, it does have it's faults. The big one that I'm curious about is whether or not swiping your finger through the actual keyboard in order to move the cursor is possible on android? If so, why hasn't anyone really thought about copying? It's immensely intuitive and handy feature for those of us who mess up spelling on the keyboard; even to those who don't misspell it's quite useful to changing searches, texts, script files, etc...
This has been on my mind for a while and I just wanted to throw this out there.

Did an external CAPACITIVE screen just get easier?

I have long since dreamed of a car-puter or workstation that simply my phone expanded. All apps and files would automatically travel with you and the whole system would automatically get upgraded, for free, every time you upgraded your phone.
Mirroring images and sound can be done many ways, but the problem has always been inputs from the larger screen making their way to your phone. There are a few work-arounds with resistive screens, but they look junky, have low sensitivity and don't allow multitouch.
The holy grail has always been full 2-way comm with an external capacitive screen. This is the first time I have ever seen a capacitive screen that lists 10-point capacitive touch as a feature for Android and that has Android drivers downloadable in the 'documents' tab of their product page.
http://lilliputweb.net/capacitive-touch-screen-monitors/7-inch-multi-touch/779gl-70np-c-t.html
Does this really mean what I think it does?!? I know that drivers in android are far from as simple as an executable file in windows. But does this mean that with a little work any of us could make this monitor play nicely with our own devices? Or ideally could a person or two (with more skill than I have) make this monitor plug and play with a common distro like cyanogenmod or the like?
Any thoughts from any of the more experienced minds in these forums would be VERY appreciated. PS. I love this forum and wish I had the time and the chops to add more to it myself, but in the meantime thank you to all contributes. Cheers.

Categories

Resources