Hi,
I'm programming a little soft that catch the movement of my phone, but I don't know the instructions for that.
I don't want the rotation of the screen but i want to know when the phone make a rotation of 360 degrees using for example HTCGsensor.dll!!!
Can anyone help me pllllz???
your app sounds similar to GSen:
http://forum.xda-developers.com/showthread.php?t=403939
Yes, but I want the code source writing in c# for catching the movement of the phone.
I want to do the same thing like : http://forum.xda-developers.com/showthread.php?t=422871 ( witch was open source but in c++ ) in c# ...
no idea???
anyone to help?
Sensor API
Related
So I have been messing around with windows mobile development (in vb, don't hate me, i have grown accustomed to vb because of work). Anyways I come to a point where i would like to use the graphics object to draw an image and rotate it on occasion based on the state of the program. My instincts told me to use System.Drawing.Drawing2D.Matrix object to create that rotation but as it turns out it appears .net compact framework doesn't support that object.
So my question then is, is there any other method for rotating an image as i draw it. I can program in other languages as well if that is what is required, I was really only using vb because it was easy.
Any ideas?
Thanks
don't know about vb but
in c# i would look for an event to subscribe to
which would be fired when the orientation changed
or the resolution changed or some control resized
Sorry the question isn't related to orientation or resolution. I know when I want to rotate the image.
I will give more information, the image is a compass and I want to rotate the compass image based on GPS data received (Calculating the angles is not the problem either). Once I know that say I am 10 degrees off of north, i want to rotate the image of the compass so that north is still pointing north.
In my desktop development this would be done in vb or c# using the System.Drawing.Drawing2D.Matrix class, using Matrix.Rotate and them applying that matrix to the graphics object before i draw the image using graphics.drawImage().
Now the problem comes when I move to the mobile platform where System.Drawing.Drawing2D.Matrix does not exist and is appariently unimplemented. So then my question is, are there any other API's on the Windows Mobile Platform that support Rotation of an image by an arbitrary angle, and if not does any one have any good ideas where to start looking for implementing the rotation manually myself.
Thanks in advance
That's one of the annoyances with the .NET compact framework, not all of the PC .NET framework is implemented, and sometimes it's the bit you really want.
Time for a different angle on the problem. Create 36 compass images 10 degrees apart and store them all in an ImageList object. Pull the one you require out of it when the heading changes. Not quite as elegant as the Matrix class, but it may have to do.
The other approach would be to use DirectX drawing. The coding to do it, would probably involve a very steep learning curve, but not having dabbled in this arena yet, I can't offer much help.
The ImageList object in the .NET compact framework does not support ImageList.Draw(), (darn!, see previous post), so you would have to create a PictureBox object or similar and use :-
PictureBox1.Image = ImageList1.Images;
Where i is the index of the image you want to use. (0 to 35)
Thanks for the suggestions, I did end up predrawing the images of the compass. At the moment I went ahead and made 360 images but I am surely going to cut that down quite a bit. The question then becomes smoothness vs space. But either way you shake it it is working.
What is the easiest way to program a gesture so it can launch an application?
If you understand VB.net
take a look here:
http://forum.xda-developers.com/showthread.php?t=375294
I just take the position of the mouse cursor, and then the next position after some time (or mouseMove event). then I can Get the direction/speed/length of the move, out of every direction you can create a string for example L=Left, R=Right, U=Up, D=Down
just compare the string with one you have saved.
I would like to create a config app for my tool, but due to lack of time and my Fuel Blaster this will come not in the next time
http://www.ftouchsl.com/
@style1: thx but i wanna make my own application
It is rather easy, was not my idea, i think I have found it in C# somewhere in the forum, maybe you find it, but It should be difficult to change it from vb to c#.
You will just to find a way to get the mousemove/-up/-down events of the screen even when you app isnt in the foreground, maybe the api can help you
Moved to Questions & Answers forum.
"i think I have found it in C# somewhere in the forum, maybe you find it, but It should be difficult to change it from vb to c#."
not at all one got all the same options in vb.net as in c#.net
vb.net just have a horrid syntax
Rudegar said:
"i think I have found it in C# somewhere in the forum, maybe you find it, but It should be difficult to change it from vb to c#."
not at all one got all the same options in vb.net as in c#.net
vb.net just have a horrid syntax
Click to expand...
Click to collapse
I wanted to say that it isnt be difficult
First question : Is there any accelerometer bublle level like the incredible android one for Jave J2M Samsung S5600 (Player Star) phone ? Or anyway, is there any solution to port this app from adroid to java Mobile ? I got the source jar if anyone is interested to have a look inside. It does not lauch on my mobile, certainly due to protection and very different Android OS...
Second question :
I would like to find a way for overriding the Exe/jave/games/folder to point it to my mmc sdcard ? Is there a way to do it via nv_default.ini without bricking the phone ? A better solution would be to offer both databse update search and and thos two path in ?!
I'm really not familliar with this phone OS, so if there anyone who can tell me if this system is modifiable or modable, just let me know...
Free Bonus Question : I also have a nice HTC touch P3450, wich has been succesfully updated to the latest avaible firmware. I dont know if this phone have an accelerometer ? Can anyone tell it to me ? I don't think so because none of the apps are hanging this feature, but i'm asking it also
hello
i am in the middle of developing an app, nothing special. just a converter for my use.
my main page has three buttons on it, but i want to link them to another page in my application
eg MainPage.xaml to page1.xaml.
i am using visual basic, and when i create windows applications i use
either:
me.visible = false
page1.visible = true
or
MainPage.visible=false
Page1.visible = true.
but this is not the same for windows phone coding, and its really confused me, i should also state i am a beginner in coding for windows phone, as this is my first decent app
if anyone can help, that would be amazing!!
I think this is what you're gonna want to use:
http://msdn.microsoft.com/en-us/library/ms591053.aspx
For C# you could do something like this:
Uri nav = new Uri("page1.xaml");
NavigationService.Navigate(nav);
but I don't really know about VB.
thanks
i dont really know anything about C# as i am still in school, and the language we learn there is VB.
if i were to add this, would i put this in the mainpage.xaml or would it go somewhere else?
i have just looked over the URL and it makes sense, but its just making it harder than it needs to be, i dont see why Microsoft couldnt keep the same language like your creating an application for windows 7. ahh well, i shall be trying this when i get home as right now im babysitting ;D
i want to complete my app by next friday as i am going abroad and want to test it out in a real life situation
Can someone help me, i cant progress with my app without this knowledge.
a fast reply will be good. thanks SlimShady322, but i dont really get it, can someone explain how to do it
Put these lines in a click event of a button:
Code:
Dim nav As New Uri("page1.xaml")
NavigationService.Navigate(nav)
Hell frnds,
I was just plain curious when a well known smartphone manufacturer started using the front camera for more than skype n photos. I wondered that my ICS tab has a front camera, a feature called face unlock which uses face features to unlock the device. So what if this camera and some code can be used to add features to the front camera n make it useful. I was also wondering can this data be utilized in other applications, this will open up then environment. Suppore a scroll,its done through touch n drag, our application can send this data to the foreground app i.e a document reader or a browser. The application can spoof it self as an input device in androids input menu. Thus it can do various things by sending appropriate data to apps. Im currently testing on windows using a webcam n some code to track eyeball n do actions through it. If im succesful enough Ill start coding an android app. But a healthy discussion and your views would be appreciated. So I hope ill see some replies. Tkcre.