Midlet programming and the XDA2 Camera - MDA II, XDA II, 2060 General

Hi,
Has anyone had any luck with writing Midlets for the XDA2? I'm trying to write one use the camera as a webcam (Yes, I know, a bit ambitious for my secomd midlet!)
I'm using this line:
Code:
Player vPlayer = Manager.createPlayer("capture://video");
I get a MediaException, meaning '...a Player cannot be created for the given locator.' (quoted from MMAPI JavaDoc).
Also, calling the Manager.getSupportedProtocols() method for 'mpeg/video' returns an empty list, as does calling Manager.getSupportedContentTypes() for 'capture://video'.
Has anyone else managed to access the XDA2 camera from a Midlet? If so, what is the trick?!!
cheers
Paul

I don't think anybody's managed to get access to it from native eVC++ let alone midlets, and IA style aren't revealing anything about how their app does it, so I wouldn't hold your breath for a solution... Bloody closed APIs.

Knackers!! :evil:
Cheers anyway! I'll keep poking and see what happens....
Paul

i suspect that their applications take pretty much control direct without using the winCE api
because when i start the cam my clock which it still display stop being 24h and turn to the AM/PM confusement

Related

Where can I get SDKs for XDA II?

I saw a lot of programs developed for XDA II, and they are for XDA II only. So it must be a SDK documents somewhere, otherwise no-one can write codes specific for XDA II, Am i correct?
If so, could anyone tell me where can I get the XDA II's SDK?
Thanks in advance
SDK is the PocketPC2003 SDK available free from Microsoft.
It really needs embedded Visual C++ 4, also available free from Microsoft.
http://www.microsoft.com/windowsmobile/default.mspx
They'll also send you all the tools on DVD for a small handling fee, as they are huge downloads.
andyclap said:
SDK is the PocketPC2003 SDK available free from Microsoft.
It really needs embedded Visual C++ 4, also available free from Microsoft.
http://www.microsoft.com/windowsmobile/default.mspx
They'll also send you all the tools on DVD for a small handling fee, as they are huge downloads.
Click to expand...
Click to collapse
Sorry, I didn't make myself clear.
I have the generic SDK from MS, what I need is the SDK for XDA II, it should come from XDA II's manufacture.
Thanks
well there are not xda2 stk
but there are a collection of stk's
one of them is ms's
another is the one which the cam program uses
another is the stk of the ati 2d chip
i think ati will give you their sdk if you reg at their site or something
dont think the cam's sdk is something they would let people get their hands on
a xda2 sdk would be like having a dell Latitude sdk
it dont work like that
Rudegar said:
well there are not xda2 stk
but there are a collection of stk's
one of them is ms's
another is the one which the cam program uses
another is the stk of the ati 2d chip
i think ati will give you their sdk if you reg at their site or something
dont think the cam's sdk is something they would let people get their hands on
a xda2 sdk would be like having a dell Latitude sdk
it dont work like that
Click to expand...
Click to collapse
Thanks, where is the website for ATI? could you post a link please?
BTW, what I need to do is to develop GSM related applications specific for XDA II, say, timed SMS sending. It is best if I can plug my apps into their build-in apps like SMS (it does not have timed SMS sending options)
Aha you're after the device SDK for the XDAII. You want to know what drivers are supplied and how to use them to control the specific hardware at the lowest level, e.g. ATI graphics, Radio hardware, Camera, Bluetooth, Buttons, comms, etc.
... unfortuantely HTC are an absolutely closed shop. Getting any information out of them is like getting blood out of a stone. A particularly hard and bloodless stone.
This site is really the closest thing we have, although as mentioned above you might have some luck with the specific hardware manufacturers such as ATI (although they are also notoriously unforthcoming). There's also sourceO2, who have similar level of knowledge about supporting low level development on the XDAII as a particularly stupid earthworm.
Usual rant follows... If only the device manufacturers would properly open up their products to developers, they'd see a wealth of applications developed that'd make their hardware a real "must have". They probably think it'd eat into their profits on the next device they produce, which is all they're interested in really.
Incidentally, you can both send SMSs, and use the notification subsystem to schedule an app to run at a particular time via the PPC2003 API. So it'd be fairly simple to knock up a client-side SMS timed sending application wihtout hacking RIL.
Hi, andyclap
Thanks a lot for your informative reply.
I am not actually developing very low level applications. What I planned to do is to develop some value added little programs that could be a plug-in or such a kind.
To make myself clear, I can use an example to explain what I might want to do:
The build-in SMS program does not have the feature the let you send a timed (scheduled) SMS. I am wishing to do is:
insert a menu item into its original context menu (tap-and-hold on SMS message body), you can choose to send at specific time
Anyone have an idea?
build in sms programs are not something which would make it a special xda program
all pocketpcs would be able to use that
that is unless you want to block your application somehow from being used on other pocketpc's then the xda then i suppose you need to access some reg indentifier or something
you want me to give your the link to ati ?
well if you are too lazy to type it then i suppose I must
http://www.ati.com/products/handheld.html
Hmm this may be quite hard to do, as I the messaging system is quite unextensible. It's fine if you want to create a new format from scratch, but extending an existing form handler is, I think, impossible.
Some low level dirty tricks (subclassing windows etc) might work, but would be pretty tricky to do, and very hacky.
I just wish somebody would give the PocketPC team a Symbian SDK, Symbian really got it right when it comes to messaging.
Yes, i can write a new SMS program, but it will need me to deal with Contacts object. I mean, I have to write code for fetching data stored in the build-in contacts database. If I can just plug my function into its contextmenu, I will only need to implement a simple function program (setting date/time, save phone number and message text, create a notification, etc).
Using SetWindowLong can hook into the *****, but this program model is some kind of fragile, very easy to crush the system or the apps itslef, not really stable if not tested thoroughly

WMP plug-in

Hi all,
This is my first post in this forum and I hope that I will find some help here :wink:
I am a c++, c# and vb programmer, and I am very good in VC++, DLLs, ..., you know that stuff..
I want to develop a plugin for pocket windows media player but I dont know where to start!!
can anybody shade some light please :wink: , any references , articles ,examples, tutorials, anything you might find useful is welcome :lol:
Thank you,
Mohammad Gdeisat
mohgdeisat said:
Hi all,
This is my first post in this forum and I hope that I will find some help here :wink:
I am a c++, c# and vb programmer, and I am very good in VC++, DLLs, ..., you know that stuff..
I want to develop a plugin for pocket windows media player but I dont know where to start!!
can anybody shade some light please :wink: , any references , articles ,examples, tutorials, anything you might find useful is welcome :lol:
Thank you,
Mohammad Gdeisat
Click to expand...
Click to collapse
Salam Brother,
I am not interested in the WMP plug-in but I can give you a suggestion.
Why not develop a Plug-in behind the plug-in...?
Hmmmm.... what is that.
What is that...!
Hmmm. There it is...
Develop a Clock Plug-in but instead of ordinary today plugin... This plug-in is displayed behind the other today Plug-in...
See my attached image for some idea......
Thanks..
rmercado: that would be quite difficult, because the Windows API has a built in routine to make today plugins "transparent", which basically paints the today wallpaper through onto the plugin.
In order to do what you say, I think you'd have to subclass every today plugin and intercept its WM_PAINT, monitor screen draws and then squirt in your background plugin at the end of the screen draw. But this would still not account for different screen draws by the various plugins, so you would also have to force a syncronised refresh every so often, otherwise bits of the background would be out of sync.
There are much easier ways to achieve what you want, basically by writing a replacement for the today screen with today plugin emulation.
mohgdeisat: download the sdk. There are good examples in there.
Also check out PocketPCDN, and I recommend the book, “Programming Windows CE.NET” by D. Boling.
V
Thanx alot friends for ur replys,
Actually, I think I might have been missunderstood, I am not planning to write a "today plugin" to be displayed on the today screen, I am planning to write a plug-in for the WMP application, for example an equalizer for WMP.
I need to get the sound data that are being played, adjust them based on equalizer settings, then play the new data.
I dont know if Pocket WMP is designed to support such "functionalty extensions", and I really have no idea where to start my work, I can work with .NET or with C++, and I think I can learn it fast..
Any light can be shaded here?? waiting for your help guys :wink:
Mohammad
What would be really awesome would be to use the microphone of the phone to get ambient background noise, and then with some clever signal processing superimpose the negative waveform of the background noise over the audio output of WMP - effectively, a noise cancelling plugin that uses the microphone on the phone.
Not sure if the Wizard could handle it though, especially if it's streaming bluetooth audio!
Afraid I can't help on where to start writing a plugin...
Oliy
Thanx Oily,
It would be really a great idea, but I think that ourbeloved wizards cant perform heavy sound processing, maybe this would be more feasible on XDA Atom which has a faster processor.
Thanks for ur idea, but where should I start???????????? :wink:
Mohammad
Try the media player SDK.
V
thanx vigay,
I am taking a look on MSDN WMP sdk, seems to have good information, but still needs time to be understood well.
Just a note guys, I dont like to duplicate others work, so are there any plug-ins available for Pocket WMP, and what kind of plug-ins are out there?
Mohammad
Hi friends,
I really wonder what is the best approach with regard to performance when processing and displaying images:
1. is it DDBs??
2. DIBs?
3. OpenGL?
4. DirectX?
or maybe other??
plz provide me with ur advice.
Thank you,
Mohammad
mohgdeisat: you might want to open another thread in the development section for this question.
AFAIK - Microsoft is pushing DirectX, but it's WM5 only for now, not WM2003. Otherwise, depends on what you're working with. OpenGL is unlikely to be great, due to lack of good hardware acceleration.
V
I do not know if you have looked at this but it might help you.
http://msdn.microsoft.com/mobility/windowsmobile/howto/starterkits/default.aspx
I do not know if you have looked at this but it might help you.
http://msdn.microsoft.com/mobility/windowsmobile/howto/starterkits/default.aspx
Click to expand...
Click to collapse
Yes its great, and I will study.
Thanks,
Mohammad
I'm sure this has been mentioned but i thought id post a link to the media player 10 SDK
http://msdn.microsoft.com/library/d.../wmplay10/mmp_sdk/windowsmediaplayer10sdk.asp
Some useful info on plugins.

(LAST CHANCE TO VOTE) need some idea's

10/16/08--
It is 12:00 central time (17:00 GMT I think) and I will close voting at 5:00pm Central Time (22:00 GMT) today. So that leaves you just 5 Hours to make your vote. I will try and post the winner up here later tonight, or you can check yourself at www.gudensoft.com.
Thanks!!
10/14/08--
First, thanks for all the great ideas. I would love to develop all of these if I could, but we have to decide on just one of the programs! So, Since I couldn't add a poll to this thread, I added it to HERE.
CLICK HERE TO VOTE!​
I bet I know which will win, but who knows? The poll will end Thursday or Friday (depending on if it is a close race or not).
Thanks
Gudy
10/10/08--
Hey guys,
I want to know what cool program, functionality, or software you would like to see created. I am a .net programmer (among others) and would like some ideas of projects you would like to see. I would like to stay away from a graphic intense program and involved games, so think functionality, usefulness, fun, etc. If I get some good ideas, I will then add a poll, vote on the best one, then build it. I will release it under my donationware license which means it will be free. Right now I am finishing up my Golf Gps program (and will continue to support), but will start this project once we get it deceided. So Shoot me your ideas!
Gudy
cool a programmer who need ideas
I have proposed something here: http://forum.xda-developers.com/showthread.php?t=434925
though it would maybe not appear as a grateful program for a developper ( a toolkit for other programs), it could be a good way to have a large diffusion through many config panels in different programs
it was just an idea
Wishlist
Hi,
Maybe simple for .NET, but for me impossible to do (without performance/battery penaulty) with basic4ppc or mortscript. And thats all I can handle.
What I would like to have is a program that enables me to execute programs when specific events occur. I'd like to know when AC power gets connected/disconnected, when there is a change in screen orientation, and when a headset gets connected/disconnected and so on. Maybe even when an internet connection through WIFI is available/unavailable.
Also I'd like to know is a specific BT device is connectable/conneted. I'd like to know if a specific WIFI network is connectable/connected. I'd like to know if I'm at a specific location. All event driven, without a performance consuming programing loop or battery drain.
Yeah, all or even some of those options would make my digital mobile life so much easier
Good luck huntig for input, if you ever get bored contact me and make me happy
Cheers,
Cacti
le_cactus said:
Hi,
Maybe simple for .NET, but for me impossible to do (without performance/battery penaulty) with basic4ppc or mortscript. And thats all I can handle.
What I would like to have is a program that enables me to execute programs when specific events occur. I'd like to know when AC power gets connected/disconnected, when there is a change in screen orientation, and when a headset gets connected/disconnected and so on. Maybe even when an internet connection through WIFI is available/unavailable.
Also I'd like to know is a specific BT device is connectable/conneted. I'd like to know if a specific WIFI network is connectable/connected. I'd like to know if I'm at a specific location. All event driven, without a performance consuming programing loop or battery drain.
Yeah, all or even some of those options would make my digital mobile life so much easier
Good luck huntig for input, if you ever get bored contact me and make me happy
Cheers,
Cacti
Click to expand...
Click to collapse
Doable, handy, not a massive undertaking, I like it! Not sure I would go the .net route on something like this, as really a GUI is not required (except for settings maybe) and the overhead is large with .net. Certainly will add it to the list. Keep them coming!!
t0k0m0k0 said:
cool a programmer who need ideas
I have proposed something here: http://forum.xda-developers.com/showthread.php?t=434925
though it would maybe not appear as a grateful program for a developper ( a toolkit for other programs), it could be a good way to have a large diffusion through many config panels in different programs
it was just an idea
Click to expand...
Click to collapse
This would be pretty difficult unless all of developers used the same programming langauge/technique. The only real feasable way I see this working would be developers using a common set of graphics. That would be more of a graphic undertaking instead of programming. I do like the idea, but pretty hard to impliment.
Thanks
Gudy
I would love to see something like Launchy for launching apps and files etc. as well as quick search of various types online. I'm guessing the on the fly search would require too much processing power, but if it's doable it would be awesome.
http://www.launchy.net/
I'm interested in new ideas too. I also use B4PPC.
Here's a few ideas:
-A tamagotchi, really. I was about to try this out tonight but Paint hates me.
-An app launcher like PetitLaunch on PalmOS. It's something that can pop from any app (hardware button) and when you type in extra letters it filters which apps are shown. I got this started and I can give you the files if you want.
-Pursue the development for Tippy. The source is on Nicbou.com/downloads if you want it.
-A time clock. A friend of mine notes down how long he works to make sure he doesn't get screwed and it takes him several minutes every week. He doesn't have a Pocket PC but maybe someone would be interested in something that tracks the hours you work and calculate the salary. I almost did this too.
And don't forget to share the source! If you need any help with B4PPC I'm here
galt said:
I would love to see something like Launchy for launching apps and files etc. as well as quick search of various types online. I'm guessing the on the fly search would require too much processing power, but if it's doable it would be awesome.
http://www.launchy.net/
Click to expand...
Click to collapse
Sounds simular to the app launcher listed in the next post, seems like there is a theme going on here, you all need some sort of good app launcher.
Gudy
I'd like the Launchy features for search-on-the-fly off on board apps and file launching, but ever more for different site searches (google, maps, wikipedia, live, youtube, Amazon, etc).
N1c0_ds said:
I'm interested in new ideas too. I also use B4PPC.
Here's a few ideas:
-A tamagotchi, really. I was about to try this out tonight but Paint hates me.
-An app launcher like PetitLaunch on PalmOS. It's something that can pop from any app (hardware button) and when you type in extra letters it filters which apps are shown. I got this started and I can give you the files if you want.
-Pursue the development for Tippy. The source is on Nicbou.com/downloads if you want it.
-A time clock. A friend of mine notes down how long he works to make sure he doesn't get screwed and it takes him several minutes every week. He doesn't have a Pocket PC but maybe someone would be interested in something that tracks the hours you work and calculate the salary. I almost did this too.
And don't forget to share the source! If you need any help with B4PPC I'm here
Click to expand...
Click to collapse
I had to look up tamagotchi, either I am too old, or just out of the loop to know that 10 million of these things were sold! Wow! That could be fun, but would take a pretty fancy AI type system to really be fun.
A form of Tippy is already out there, 1-calc has some of the features built in already.
A time clock could be cool, maybe a stop watch type thing perhaps?
Never used B4PPC, I mainly use C# and Visual Studio. It looks like the old Visual Basic for desktops. And last but not least, depending on the project, I more than likely will release the source.
Thanks!!! Keep'em comin!
Gudy
File Explorer Needs Help
Has anyone wanted to see a preview image in explorer's folder??
I'm not talking about fexplorerext2. although it is a fantastic enhancement; it takes a long time to load the preview immages.
I have a better idea (well, actualy MS thought of it first)
THUMBS.DB
for every folder that has an image file, this dll is created to replace cache of images. this way ou do not have to load it everytime and scale them down for thumbnail view. it is already there specificaly for each folder.
This alows the explorer to show a preview of the first image in the folder (or last created/accessed)
This is whatt I think WinMo is lacking - windows. lol.
I do not care much for the tabbed browsing. it hurts my head. too much scroling and not enough info. Icons work better I think, and waste less space on an already small screen.
well, that's been on my wishlist for a very long time. a dll that ataches to the already existing explorer making it work better.
Thanks for workin g on something new
program that makes led lights flash when phone rings would be nice
Interesting...I will have to think about how to tackle that. It would basically take a new file explorer (like total commander). This might be a bit larger than I want to tackle, but will research it a bit before ruling it out.
GUdy
bedaweed said:
program that makes led lights flash when phone rings would be nice
Click to expand...
Click to collapse
This would be very difficult as not every device handles the leds the same. Also, not every device has the same leds (color, # of, etc). I think No2Chem has a int. driver, but think it is only for the titan. Would be cool though...
Gudy
a system-wide launcher dock program like that on the velocity 103 PPC..
here's the URL for the review and video of the app (and the phone)
-------------------------------------------------------------
a new top bar replacemeent/notification system much like the "android Notification Drawer" it can replace the bubble (multiple) notifications icon when you got multiple and simultaneous notifications.. and also make it finger friendly (unlike M2D, no need to go back to homescreen to check email/sms previes and also calendar events, calls, etc.. also unlike big taskbar - from the touch phones, this'll have previews)
video: http://www.youtube.com/watch?v=z7qbPa1O8Ys&eur (at the 2 minute mark) , http://www.youtube.com/watch?v=hy-YcGNyJds
mjg7876 said:
Interesting...I will have to think about how to tackle that. It would basically take a new file explorer (like total commander). This might be a bit larger than I want to tackle, but will research it a bit before ruling it out.
GUdy
Click to expand...
Click to collapse
Fexplorer2 is basically a dll that works with the original file explorer context menu. there is a small exe that overwrites the original explorer to make it think that the explorer"s context menu has already been opened.
in a way it maybe possible to write a new dll and two exe
EXE 1 to replace the file explorer
EXE 2 to make thumbs db
DLL (conte4xt menu that alows to view as thumbnails/list etc ; as well as launching the second exe to make a thumbsdb)
maybe you can get some help from Hou Ming, the guy that made that program before.
it would be cool if you could get some of the old emus like pocket gba and pocket snes with window 6.1 I know i would be happy.
le_cactus said:
... when AC power gets connected/disconnected, when there is a change in screen orientation, and when a headset gets connected/disconnected and ...
Click to expand...
Click to collapse
I have been looking for a program that would stop the music (S2P, Audio Manager, or WMP etc...) if during playback of the music the headset is removed. Or for instance, when the device is on vibrate and you connect headset, it automatically changes profile to normal or something.
Another one is when I dock my device (or connect AC basically), I'd like clock program (or home screen, or photo slideshow, etc...) to come up automatically.
A feature that I miss from my older phones is the ability to set them to beep every minute during a phone call.
Now these are very general and not specific features. If you have any questions, don't hesitate to contact me!
Thank you,
SiNAra
ytsejam_ said:
a system-wide launcher dock program like that on the velocity 103 PPC..
here's the URL for the review and video of the app (and the phone)
-------------------------------------------------------------
a new top bar replacemeent/notification system much like the "android Notification Drawer" it can replace the bubble (multiple) notifications icon when you got multiple and simultaneous notifications.. and also make it finger friendly (unlike M2D, no need to go back to homescreen to check email/sms previes and also calendar events, calls, etc.. also unlike big taskbar - from the touch phones, this'll have previews)
video: http://www.youtube.com/watch?v=z7qbPa1O8Ys&eur (at the 2 minute mark) , http://www.youtube.com/watch?v=hy-YcGNyJds
Click to expand...
Click to collapse
The launcher on the 103 looks a lot like manilla, I know it is diff, but to me it seems mainly by presentation, not functionality. I do however like the notification top bar like that on android. Not sure how difficult taking over the top bar would be. I will do some digging.
S.V.I said:
Fexplorer2 is basically a dll that works with the original file explorer context menu. there is a small exe that overwrites the original explorer to make it think that the explorer"s context menu has already been opened.
in a way it maybe possible to write a new dll and two exe
EXE 1 to replace the file explorer
EXE 2 to make thumbs db
DLL (conte4xt menu that alows to view as thumbnails/list etc ; as well as launching the second exe to make a thumbsdb)
maybe you can get some help from Hou Ming, the guy that made that program before.
Click to expand...
Click to collapse
Can you give me a link to this? The only thing I could find (quickly) was sketchy at best. Still seems a bit much, but would like to know more about this Fexplorer2 thing before nuking the idea.
Gudy

New audio switch program for skype and others.

This program is an evolution of the first I made. It will route the audio to the earpiece when an certain program is running.
I put the program here because I have test it in wizard, if people test this in others phones and it works, please post here and maybe move this this thread to an more "generic" forum.
the program MUST be under "\($program files)\audioswitch" folder, you must unzip the contents to this folder.
the configuration file (command.txt) is under this format:
1000
skype
fring
etc
the first line is the delay(in miliseconds) in witch the program will "look" if a program in the list is in the top level window, faster phone, smaller delays, I recommend 1000 ms.
the next 20 lines are the programs you want the audio to be routed to the earpiece(max 20 lines for now).
Again the program is under the "do it on your own risk" and "I am not responsible for anything" licence. And,of course, it is free!! Do not sell it!
It is manly intended for little expert users, as it is still in "beta" fase, hehehe.
How it works:
the program runs in an eternal loop and look for the title of the current window that is displayed for the user in a time interval.
When the program mach the title window with one of the names user configured it it will switch the audio, when the program is not running anymore, the audio will swich back.
Do not launch two or more instances of the program at the same time, could really mess things up. -- se the forum (thanks tucahara)
To stop the program, u must use a process manager.
it would be good if someone could make a cab to install it. -- done see the forum (thanks tucahara)
this is still a beta, I intend to make ajustments as people give feedback.
Thanks,
hope u like.
-----first update---
now, an file called "audioswitch_error.txt" in the root directory will hold the error messages.
------------ List - Working ------------
wizard - I tested
P3301 or P3300 - I tested
att tilt - I tested
touch 3452 and 3450
touch dual
touch cruise
touch HD
Sony Ericsson Xperia X1
BenQ E72
Titan --> see the forum
------------ List - NOT working ------------
T-Mobile Diamond
HTC Touch by Sprint
Samsung SGH-i780
------------------------------------------------------------------------------------
check the new thread at:
http://forum.xda-developers.com/showthread.php?t=502361
new aproach to do the switch and now open source, even with an class that others can improve and put in other apps...
Some people complain about me not openning the source of the app, I have just made this way because there was proprietary code inside and I had no time to rewrite it without the proprietary code.
I have made the best I could, and now I had some time and rewrite the app in open source, to those who only complain about it, get the code and make it better instead of complaining!
Thanks for all that encourage me to continue the work and helped the development.
will retire this project for while...
thanks u all.
Audioswitch for Skype
On HTC Touch by Sprint (CDMA, also known as Vogue), audioswitch does switch the audio in the Skype 2.5 windows mobile PPC from external speaker to handset. Unfortunately, the microphone is then also disabled. I hope you'll be able to tweak your audioswitch to resolve this.
Thank you so much for developing this wonderful applet. I'm sure you will have the gratitude of many frustrated Skype windows mobile users.
What really happens is that when the sound output is switched in some phones, the microphone gain changes too. This happens because the phone thinks it is a "normal call".
Most of the times the mic gain increases, but in your phone it must be decreasing. Try to figure out in registry where the mic gain controls are recorded and chage all of then to the same value. I had this issue with my P3301 and solved this way, but there is quite a time now and I do not remenber where are the reg keys to change, but I have found the information here in the forum.
I will try to figure out for other "hack" to solve this issue... thanks for reply.
doesn't work at T-Mobile Compact IV (aka Diamond)
Sound went to loudspeaker....
PS: fring last version working fine with sound at mine phone (without any additional programms). Sound is going to correct destination automatically
I just tried the latest version of Fring, which automatically switches audio to earpiece when call is connected.
The same issue occurs with the new Fring as I described above with your audioswitch program: I can hear audio through earpiece, but microphone doesn't work (or is inaudible).
I couldn't find a tweak or registry hack to correct this. Any help would be greatly appreciated.
MarceloFB said:
This program is an evolution of the first I made. It will route the audio to the earpiece when an certain program is running.
I put the program here because I have test it in wizard, if people test this in others phones and it works, please post here and maybe move this this thread to an more "generic" forum.
the program MUST be under "\($program files)\audioswitch" folder, you must unzip the contents to this folder.
the configuration file (command.txt) is under this format:
1000
skype
fring
etc
the first line is the delay(in miliseconds) in witch the program will "look" if a program in the list is in the top level window, faster phone, smaller delays, I recommend 1000 ms.
the next 20 lines are the programs you want the audio to be routed to the earpiece(max 20 lines for now).
Again the program is under the "do it on your own risk" and "I am not responsible for anything" licence. And,of course, it is free!! Do not sell it!
It is manly intended for little expert users, as it is still in "beta" fase, hehehe.
How it works:
the program runs in an eternal loop and look for the title of the current window that is displayed for the user in a time interval.
When the program mach the title window with one of the names user configured it it will switch the audio, when the program is not running anymore, the audio will swich back.
it would be good if someone could make a cab to install it.
this is still a beta, I intend to make ajustments as people give feedback.
If someone like this program and wants to make an donation...
https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=4WLQVA6LTKWSL&lc=GB&item_name=marcelofb&item_number=marcelofbxdadonations&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG_global%2egif%3aNonHosted
Thanks,
hope u like.
Click to expand...
Click to collapse
I have an idea. Rather than regularly polling to see what the current windows is, why not use a windows hook to monitor windows messages. When you see a message indicating a window has come to the foreground test it against your list of windows and enable/disable audio switch as necessary. Use SetWindowsHookEx and hook for WH_CBT messages. If you are unfamiliar with using SetWindowsHookEx I could supply you with the hooking code and all you would need to do is insert the code to check the window names, enable the audio switch, and disable the audio switch. Or you could send me the enable/disable routines.
Another tip, I noticed that skype places an icon in the notification area during a call. If there is someway of detecting the notification icon that could be another great way to trigger the switch.
Great program though. Works beautifully.
OOOH
If this program works on the new BenQ E72 I'm getting in a couple of days I'll certainly donate!
THANKYOUTHANKYOUTHANKYOU
hello,
it does not work on hermes (tytn).
by the way "troca2" does work on hermes! - maybe you guys want to work together?
baal_zebub said:
hello,
it does not work on hermes (tytn).
by the way "troca2" does work on hermes! - maybe you guys want to work together?
Click to expand...
Click to collapse
hehhehe, I made troca2, I will see if the switch code is the same or if I have made some mistake...
are u sure you have put the program in the correct directory?? I will make some modifications to have an error feedback. So u can see if something is wrong...
JKingDev said:
I have an idea. Rather than regularly polling to see what the current windows is, why not use a windows hook to monitor windows messages. When you see a message indicating a window has come to the foreground test it against your list of windows and enable/disable audio switch as necessary. Use SetWindowsHookEx and hook for WH_CBT messages. If you are unfamiliar with using SetWindowsHookEx I could supply you with the hooking code and all you would need to do is insert the code to check the window names, enable the audio switch, and disable the audio switch. Or you could send me the enable/disable routines.
Another tip, I noticed that skype places an icon in the notification area during a call. If there is someway of detecting the notification icon that could be another great way to trigger the switch.
Great program though. Works beautifully.
Click to expand...
Click to collapse
It is a good idea to use hook, I have not think of it!
I use a proprietary code included in a lib at the company I work for to make the "switch" but it is not different of what u find here in the forum.
Maybe we can make an effort to re-make it with hooks...
so this program must run all the time? after every softreset you have to start it?
is it not easier with mortscript (for example) to make an shortcut that opens skype as well as the audioswitch program? and closes the audioswithc program when you close skype?
I am using it right now and it seems to work perfect:
i used this script after installing mortscript (http://www.sto-helit.de/):
run( "\Windows\SkypeSoundSwitch.exe" )
runwait( "\Program Files\Skype\Skype.exe" )
close( "troca2" )
(see that in my case i downloaded your original program and renamed it to skypesoundswitch.exe and put it in the windows map)
I renamed it so i could remember what the purpose the file had.. changed nothing but the name!
Thanks for the program by the way! it always worked perfect!!
so to sum up the way i have it now (most files included) on my xperia x1:
1) installed skype
2) installed mortscript
3) add skypesoundswitch to \windows\....
3) add skype.mscr to \.... (root)
4) overwrite skype.lnk with the new skype.lnk in \windows\start menu\programs\..
in the way whenever i open skype(.lnk), it opens skype.mscr, this opens skypesoundswitch.exe and than skype.exe... when you close skype.exe it closes skypesoundswitch.exe...
it seems to work perfect.. but hey maybe i am doing something totally wrong here.. than just shout!
by the way, the .mscr and the .lnk files are offcourse edit-able .. so you can put the files everywhere you like..
madhijs said:
so this program must run all the time? after every softreset you have to start it?
is it not easier with mortscript (for example) to make an shortcut that opens skype as well as the audioswitch program? and closes the audioswithc program when you close skype?
I am using it right now and it seems to work perfect:
i used this script after installing mortscript (http://www.sto-helit.de/):
run( "\Windows\SkypeSoundSwitch.exe" )
runwait( "\Program Files\Skype\Skype.exe" )
close( "troca2" )
(see that in my case i downloaded your original program and renamed it to skypesoundswitch.exe and put it in the windows map)
I renamed it so i could remember what the purpose the file had.. changed nothing but the name!
Thanks for the program by the way! it always worked perfect!!
Click to expand...
Click to collapse
That works great too. The advantage of this new program is that it will only reroute the audio when skype is in the foreground. You could minimize skype and leave it running, and audioswitch will automatically restore your sound. Get a call and open up skype and your sound goes back to the earpiece.
I will create the code to do it with a windows hook when I get a chance MarceloFB. Please pm me your email address. All you will have to do is insert the code to read the config file, check the window names, and when necessary enable or disable the switch. Or please show me where to find details on how to code this myself. Thanks!
Hat off to both of you and really glad that we will have a much improved solution.
JKingDev said:
That works great too. The advantage of this new program is that it will only reroute the audio when skype is in the foreground. You could minimize skype and leave it running, and audioswitch will automatically restore your sound. Get a call and open up skype and your sound goes back to the earpiece.
I will create the code to do it with a windows hook when I get a chance MarceloFB. Please pm me your email address. All you have to do is insert the code to read the config file, check the window names, and when necessary enable or disable the switch.
Click to expand...
Click to collapse
okay! I only used skype to make calls and than get offline so this way did the trick for me! but i have to admit it would be much better when i can keep skype online!
this new program does the trick indeed! it changes the output back when i minimize skype!
But still my question above, you have to start this program on every startup isn't it? what does it do with the battery?
madhijs said:
okay! I only used skype to make calls and than get offline so this way did the trick for me! but i have to admit it would be much better when i can keep skype online!
this new program does the trick indeed! it changes the output back when i minimize skype!
But still my question above, you have to start this program on every startup isn't it? what does it do with the battery?
Click to expand...
Click to collapse
Yes it must be run at startup but placing a link in your startup folder will make everything transparent to the user. I don't think there will be an effect at startup. In it's current form it must check every second (or whatever you set the timeout to), but its only a little bit of code. I am not really sure if that will really have an effect. The more often it checks the faster it will switch when you open skype, but also the more processor use. Check less often and it uses less processor, but there might be a delay in switching the audio. I proposed doing it by hooks though because this would use even less processor. The app will only check when a new window takes focus, rather than just periodically checking. This way it only checks when it needs to and will always switch instantly.
I am glad u liked the program.
I will try to answer most of the questions...
1- JKingDev:
I have though in your idea of using hooks, but if I use a hook, the program will have a loop anyway to check for the messages(hidden loop ;-) ), and it would have to have an "fake window" or something to process the messages. This way we have only one loop, in a very simple command line program with high optimization, so we have to think what is really the best way of doing it... I will pm u as soon I have any time to "program" again. hehe
2- people that uses mortscript with the old "troca2"
I will try to make a way to make this program work the same way as troca2, maybe with an "argc argv", wait the next update.
3- the battery life??
if u notice any battery life decreasing with the usage of the program, configure a bigger delay, maybe 5000ms, it is a matter of adjust the "timming" for each processor. Post your results here so others can find the optimum value for the delay in their phones.
4- have to start the program every reset?
yes, just put it in the startup folder.
maybe someone can make an cab that put the program in the right place and a link in the startup, it would be cool! I dont have an easy program to deal with cabs, and the vs projects for cabs.... I really cant make that thing work!!
well it is only the batterylife i was worried about. but i'll try running the phone this weekend with the program running and doing some skype.. lets see how it turns out!
For folks who have issues of mic on using this program, there is a quick solution for this problem. You can try sjphone. It provides a internal mic volume control. However, the major setback is that it's only working in wm5.
my 2 cents
weekendli said:
For folks who have issues of mic on using this program, there is a quick solution for this problem. You can try sjphone. It provides a internal mic volume control. However, the major setback is that it's only working in wm5.
my 2 cents
Click to expand...
Click to collapse
will check this, but people reported that worked in xperia... and it is running in my P3301... anyway, will check and post an wm6 build if it is the case... check the error file and see if it tells anything.
Other thing, this program uses low level api`s, so your windows MUST be fully unlocked for it to work in wm6.

[C#/C++] Camera Access with DirectShow

Hi Guys,
Because the standard API's to use the camera aren't flexible enough I need to use directshow.
Unfortunately I'm not a very good C++ programmer (more C# ;-))
I found this solution. Wich compiles a C++ DLL and can be called from C#.
Perfect! Except the C++ code doesn't really do what I want to. (And I have no idea how to change it)
See attachement for the C++ project
Dll does: Capture one frame from the camera and store it as a file. (with 320x240 resolution, not great quality)
I'd prefer to use the best available quality, or mayby choose the quality I want.
Also I'd prefer not saving/storing the file but return a stream / bitmap / image
Because I only want to show it on screen (actualy let a mobile webserver respond an image with as much frames per sec as possible)
(Saves a step, storing and deleting everytime)
Any Help?
PS. I also tried Directshow.Net Library But it doesn't seem to work on Windows Mobile.
C# Code
Btw, this is the code I use in C# to create the functions:
[DllImport("CameraCaptureDLL.DLL")]
private static extern bool CaptureStill(string Path);
[DllImport("CameraCaptureDLL.DLL")]
private static extern bool InitializeGraph(IntPtr hWnd);
Just to keep y'all posted, I'm now looking @ this solution (CodeProject.com)
They rewrote the DLL file, and I think it's gonna do what I want, but I first need to install Windows CE 5.0 wich takes alot of time....
I met same problem with you.
I just want to show the camera sight, like the Camera app's Preview function.
I don't know if there is a HTC's Camera SDK.
Please keep contract, if I have any improvment, I will tell you.
I had fun with camera but not using directshow or the preview...I'm just launching the camera app (using sample camera in SDK).
If anyone find an easy way to have "embedded camera display" in an application I'm really interested!! (like a pictureBox having camera as image source)
If I found something I'll tell...
DarkAngelFR said:
I had fun with camera but not using directshow or the preview...I'm just launching the camera app (using sample camera in SDK).
If anyone find an easy way to have "embedded camera display" in an application I'm really interested!! (like a pictureBox having camera as image source)
If I found something I'll tell...
Click to expand...
Click to collapse
I found functions and its parameters by sniffig camera calls on my VOX
Captured data is stored as UYVY.
m32
m32 said:
I found functions and its parameters by sniffig camera calls on my VOX
Captured data is stored as UYVY.
m32
Click to expand...
Click to collapse
Could you provide the compiled version of the htccamera dll ?
Will try to build this later (@work don't have cc compiler, just VS2008)
Thanks!
An in-memory capture would almost certainly improve the live-scan mode in Barcorama also! I could really use that in-memory capable CameraCaptureDll.dll.
Many users seem to have successfully compiled the source at http://www.codeproject.com/KB/mobile/samplegrabberfilter-wm6.aspx, but I can't find the compiled dll somewhere .
I fail to compile it myself as it needs the WindowsCE Platform Builder and VS2008...
Anybody that comes across the DLL, please share!
have fun,
hypest
Hello,
working on it ^^ I will upload the dll here later today
Here you go : download (if fails : try here)
is the source code compiled (look in /bin/Release). Tested and works nice (deploy the dll then the sample app).
Hope this helps!
Thanx!!
will try it!
UPDATE:
The sample opens up but seems to do nothing on my kaiser. <-UPDATE: wrong! it works OK.
I have managed to use the DLL directly though. The capturing works fine but the capture-stop seems to fail: the Stop() function hangs. I use the Shutdown() that seems to be OK, but then I have trouble re-initializing the whole procedure. Also, there seem to be a sensitivity on manually using the garbage collector.
Thanks again anyway!!
Cannot seem to import the dll into another project
@DarkAngelFR
Thanks very much for the sample app for video streaming, was very helpful.
However I really need to use the dll or even the import the CameraCaptureDLL c++ code into our project. I have already read over the ReadMe text file but need further help on how to create this object? Have already tried the Ignore Input Library property and that does not work sadly. Any help would be great!
Thanks,
John
m32 said:
I found functions and its parameters by sniffig camera calls on my VOX
Captured data is stored as UYVY.
m32
Click to expand...
Click to collapse
I have build the camerasniffer dll (and called it htccamera.dll) with mingw32ce, but how do I use it?
I tried copying it to "/windows" and rebooted the phone (hermes) but I do not get a log file on the storage card. Any hints?
Thanks a lot!
Hi,
I got this error when I try to debug this application on my mobile (HTC HD2)
"An unhandled exception of type 'System.MissingMethodException' occurred in TestCameraCapture.exe
Additional information: Can't find PInvoke DLL 'CameraCaptureDLL.DLL'."
But it seem to works fine on the Emulator.
How can I test it on my mobile then?
EDIT
Problem solved, I just had to copy the 'CameraCaptureDLL.DLL' file to the folder where the application is running.

Categories

Resources