[Q] imaginary project error + programming help - Android Software Development

As I mentioned in the previous thread (which may be deleted now), I'm playing with the snake sample game. I was trying to create a menu following this guide (the XML way). I did exactly as the guide says but when I tried to run the project, the console said "main.out.xml: Error parsing XML: no element found".
Now there's an error in the project, but all files seem valid (there's a red cross sign next to the project, but not next to any one of the files). When I try to run the project, it tells me to fix the errors. WTF ? This is driving me crazy
Of course I tried googling, but I found nothing that could help me.
Another thing I wanted to do with the Snake app is change the way the snake is controlled - instead of keyboard I want it to be controlled either by swipe or by the accelerometer. Can any1 help me with that ?
I already got swipe, now off to accelerometer movement.
And any help with the menu thing would be appreciated too.

Guys help me out here. I'm trying to make a menu for the snake app, so one could set up things like max. apples at a time, move delay decrease rate and stuff like that. How should I do this ?
I thought of creating a new activity for the options which will be called from the menu (this menu will be shown after pressing the menu button). Is that a good solution ?
Seriously... WHAT THE **** ?!?!
I create a folder under 'res' named 'menu'. I create a file under 'menu' named 'menu.xml'. I instanly get an error message : 'error: Error parsing XML: no element found'. Now I can do whatever the **** I want (I put some menu items in it), I will NEVER EVER launch the app again, because it says there's an error in the project even though there are NO ****ING ERRORS ! FFFFFFFFFFFFFUUUUUUUUUUUUUUUUUUUUUUUU

grandioso said:
I did exactly as the guide says but when I tried to run the project, the console said "main.out.xml: Error parsing XML: no element found".
Click to expand...
Click to collapse
Are you sure you didn't try to run the .xml file instead of the whole project? When you do that you get an error, a 'main.out.xml' file and your app wont run until you delete it

For the first time I did. But the app didn't run even after I restored everything to the previous state. I had to delete the whole project and create it again.
Now I didn't even press the run button - I got the error right after creating the xml file.
But now I get it - I can create a menu, but I always have to delete the project (keep the files) and create it again. Kinda sucks.
Now please could any1 give me advice on how to handle the snake by tilting the phone ? I googled my ass off, but didn't find anything I could use.

grandioso said:
For the first time I did. But the app didn't run even after I restored everything to the previous state. I had to delete the whole project and create it again.
Now I didn't even press the run button - I got the error right after creating the xml file.
But now I get it - I can create a menu, but I always have to delete the project (keep the files) and create it again. Kinda sucks.
Now please could any1 give me advice on how to handle the snake by tilting the phone ? I googled my ass off, but didn't find anything I could use.
Click to expand...
Click to collapse
Next time you get an error, try simply deleting it from the error log. Eclipse is buggy as hell and sometimes that can fix things (if not the error will just appear again).
As for using the accelerometer, i can't really help you but it looks pretty complicated!
Try looking through the source code of "Amazed" - http://code.google.com/p/apps-for-android/source/browse/#svn/trunk/Amazed/src/com/example/amazed - It may be of some help!

Well if it's complicated then screw it, I don't have much time to funk around.
I'll try the menu, but I'm still not sure if I shoul create an extra activity for the menu. How do I save the settings if I do ?

Meltus said:
As for using the accelerometer, i can't really help you but it looks pretty complicated!
Click to expand...
Click to collapse
That's an overstatement. It's a lot simpler to do than implementing your own listview adapter, for example.
Anyway, all you need to is just let your class implement SensorListener. Then you will need to override two methods; onSensorChanged and onAccuracyChanged. Each are pretty explanatory. Inside onSensorChanged however you will need to check the sensor type, and before you can listen to the sensor you need to register it with the SensorManager (system service). Remember to unregister when you don't need it any more else it will just pointlessly suck battery.
There are many tutorials, but it is really easy to do. Just Google them if unsure, the link posted by Meltus doesn't make it easy to see how it's meant to be used.

OK, first I need to make the menu work.
So first I need to create an activity that extends PreferenceActivity. Then I create a preferences.xml file and an arrays.xml file, that's more or less clear to me.
What bothers me is that I only found 4 types of Preferences - List Preference, EditText Preference, Checkbox Preference and Ringtone Preference. Is that it ? A ****load of apps uses a number choosing preference, where you have a text input a + and a - button - did they all have to create a custom preference type ?
And I have one more dumb question - I just can't for the life of me call the damn preference activity. How do I do that ?
OK, preferences are all done.

Related

I want to ask "How to cook a shortcut"?

Hi
Is there some convinient way to create shortcuts on wm5 ppc? some app with
-browse for file
-cmd line params
-browse for icon-dll
-insert icon number into cmd line
if there is no, one should be developed immediately
………
Turist said:
Hi
Is there some convinient way to create shortcuts on wm5 ppc? some app with
-browse for file
-cmd line params
-browse for icon-dll
-insert icon number into cmd line
if there is no, one should be developed immediately
Click to expand...
Click to collapse
i cant believe everybody makes it manually
Come on! You help is needed!
thanks for the idea!
OdeeanRDeathshead said:
thanks for the idea!
Click to expand...
Click to collapse
i quess its irony... ;(
nevertheless i found one _ttp://www.s-k-tools.com/sksmgr/sksmgr.html
its almost free for ex-USSR so i`ll give it a try.
Turist: you might want to read some of OdeeanRDeathshead's posts. I don't think he was being ironic.
Frankly, I've never found it difficult to write shortcuts by hand, but the sktools app is great, as ever.
V
There was no irony. As I was reading your post I was coding my app to check on startup its current location then generate a new shortcut to replace its existing one in the startup folder. One reason i use a shortcut done by hand is to get the command line arguments in it. I use the command line to tell my program if it is being started after a soft reset. If it is it minimises itself after a couple of seconds. Of course I don't need to look up the icon because my shortcut is for my executable, from memory it was just trial and error getting the correct icon for things like poutlook. I think any shortcut generator would have to be able to copy the info from existing shortcuts to make it useable over different versions/os etc.
vijay555 said:
Turist: you might want to read some of OdeeanRDeathshead's posts. I don't think he was being ironic.
Frankly, I've never found it difficult to write shortcuts by hand, but the sktools app is great, as ever.
V
Click to expand...
Click to collapse
not really difficult, but i`d like a little bit more comfortable way.
yep, sk-software is really good. paid yesterday for sktools, skshems, skshortcut manager.
OdeeanRDeathshead said:
There was no irony. As I was reading your post I was coding my app to check on startup its current location then generate a new shortcut to replace its existing one in the startup folder. One reason i use a shortcut done by hand is to get the command line arguments in it. I use the command line to tell my program if it is being started after a soft reset. If it is it minimises itself after a couple of seconds. Of course I don't need to look up the icon because my shortcut is for my executable, from memory it was just trial and error getting the correct icon for things like poutlook. I think any shortcut generator would have to be able to copy the info from existing shortcuts to make it useable over different versions/os etc.
Click to expand...
Click to collapse
you`ll never know what could happen with those little apps designed "for my internal use only"
ps: got myself vs2005, msd, wm5 sdk. would like to try to make an xml-parsing/registry-editing engine for universal registrytweaking tool. I really like the idea of RegistryWizard-tool, but not very much its design and functionality. will see...
I just finished updating my file open dialog. It can now create shortcuts that have command line arguments and it can extract the icons and their id from any file that contains them (exe dll). This will be available shortly as part of my almost (really) finished project.
OdeeanRDeathshead said:
I just finished updating my file open dialog. It can now create shortcuts that have command line arguments and it can extract the icons and their id from any file that contains them (exe dll). This will be available shortly as part of my almost (really) finished project.
Click to expand...
Click to collapse
Great! And please notice - i`m not chraging you for this brilliant idea
will it be available as standalone utility too?
The shortcut functionality will not be limited in any way on the program, but no, it will not be stand alone. I tested on jamin today (wm2005) and the handle htc give for the port is good, unlike the atom. I spent the last week converting my lists in the file open dialog to owner drawn to try and cut the display time on the windows directory. It has 1300 items and was taking 23 seconds, I have cut that to 7 seconds. Resco take 3.

"Wrap" a Today plugin

I have a little project in mind, but would like some input from the pros to cut research time:
Is it possible to "wrap" a Today plugin dll with another, providing a "pass through" for operations (such as screen taps, etc)?
What I'm trying to accomplish is this: Add selectability and other one-handed d-pad operation to an older plugin that is not selectable.
What do you think?
it's possible but the problem is that the plugin have to keep track on what plugins it include and which handles it have to pass to them
could end up big and slow
Rudegar said:
it's possible but the problem is that the plugin have to keep track on what plugins it include and which handles it have to pass to them
could end up big and slow
Click to expand...
Click to collapse
This is specific to a single plugin - it would only keep track of one.
Perhaps plan B would be easier - a plugin that manipulates another plugin. Such that it would "appear" the older plugin was selected, etc. I guess I'd better go study some more...
Actually its really simple.
Any plug-in DLL exports a function called InitCustomItem. In this function the plug-in does all its initialization, and creates its window. The return value is the handle to this window which you can subclass to add functionality.
as for selection, there is a value in the registry for each plug-in (HKLM\Software\Microsoft\Today\Items) which controls whether the system passes selection events to the plug-in or not.
it has three settings:
0 - non selectable, item will be skipped by the system.
1 - Automatic, the system will paint the item and handle selection on / off
2 - Manual, the system will pass the selection event to the item and the item will take care of the rest. In this mode the return value of the WM_ACTION determines whether the selection is moving on. This is good for multiline plug-ins that don't want to give up focus when arrow keys are pressed.
levenum said:
Actually its really simple.
Any plug-in DLL exports a function called InitCustomItem. In this function the plug-in does all its initialization, and creates its window. The return value is the handle to this window which you can subclass to add functionality.
as for selection, there is a value in the registry for each plug-in (HKLM\Software\Microsoft\Today\Items) which controls whether the system passes selection events to the plug-in or not.
it has three settings:
0 - non selectable, item will be skipped by the system.
1 - Automatic, the system will paint the item and handle selection on / off
2 - Manual, the system will pass the selection event to the item and the item will take care of the rest. In this mode the return value of the WM_ACTION determines whether the selection is moving on. This is good for multiline plug-ins that don't want to give up focus when arrow keys are pressed.
Click to expand...
Click to collapse
Hey, thanks for the response! I've set the Selectability registry item for the older plugin, and it's ignoring it - that's what started me on this little project.
I'm a software developer by trade, but not with C++, so I don't want to waste people's time here asking a lot of dumb questions. If you could point me in the right direction on a couple of things, I'll go off and learn:
1. If all I have is a dll and nothing else (no .defs, etc), can I determine all of the functions it exports (other than InitCustomItem)?
2. Process check: My custom plugin's InitCustomItem would call old-plugin's InitCustomItem, snagging old-plug's hwnd. New-plugin would then initialize it's own window - transparent(?) and pass that hwnd back to windows. Also, my custom plugin would pass all messages to old-plugin, etc. Theoretically, old-plug would look and operate like normal?
If this is already written, just sent me the code!
Well I am afraid it will be difficult to do all this without C++. As far as WM based devices are concerned you need to use something that translates in to native code to create system components like the plugins son ,no .NET languages, and embedded VB doesn't do well on anything never that WM 2003 (not even SE), plus I am not sure if you can make DLLs with it at all.
To your questions:
1) There is a tool which comes with VS 6 called Dependency Walker. It shows you what functions a given DLL exports, what it imports from other DLLs and what DLLs it is link to. Woks on EXE files as well.
If you can't get that, download a demo of IDA 5. It's the most powerful disassembler for WM devices out there.
2) Not sure, I never tried anything like that. The thing is, the system resizes the plugins, on initialization (it controls height) and when screen rotation changes so if you pass back HWND for a window other than the one visible, it might cause some problems.
I think what you should do is learn about subclassing. It's when you replace the procedure of an existing window with your own (just replace the function, not create new window). You then get all the messages for that window, you can do what you want and call the original function when you done.
By the way, if you want to learn about writing plugins there is an article with code samples on this site: www.pocketpcdn.com and a lot of other interesting stuff.
Good luck.
What plugin is it? It might be easiest just to rewrite the plugin if you've got the code.
V
levenum said:
Well I am afraid it will be difficult to do all this without C++.
Click to expand...
Click to collapse
I should have been more clear - I am using C++, I'm just have to learn how to program with it first!
vijay555 said:
What plugin is it? It might be easiest just to rewrite the plugin if you've got the code.
V
Click to expand...
Click to collapse
I don't have the old-plugin source code. My little project is to add some sort of d-pad operation to the WeatherPanel plugin, which you're probably familiar with.
Progress: I've written and deployed my first little plugin - based on the source code samples available in the internet.
Next step: In my InitializeCustomItem, I thought I'd try to call WeatherPanel's InitializeCustomItem (instead of creating my own window). Thing is, I don't yet know how to properly link the WeatherPanel dll to my project. As expected, it only exports two functions: InitializeCustomItem and CustomItemOptionsDlgProc (I used dumpbin.exe)
I'll keep plugging away - any input would be appreciated.
Thanks for your help!
It's real easy:
Use LoadLibrary and GetProcAddress functions to call functions in other DLLs without linking them.
levenum said:
It's real easy:
Use LoadLibrary and GetProcAddress functions to call functions in other DLLs without linking them.
Click to expand...
Click to collapse
What a coincidence! My studying led me to the same functions.
From within my plugin's InitializeCustomItem, I was able to successfully load the dll with LoadLibrayl, GepProcAddress of its InitializeCustomeItem (at ordinal 240) and call it. But it whacks the Today screen so that none of the plugins load.
Next I thought I'd try FindWindow and EnumChildWindows to find it and all it's children. Then manipulate them by sending messages...
storyr said:
What a coincidence! My studying led me to the same functions.
From within my plugin's InitializeCustomItem, I was able to successfully load the dll with LoadLibrayl, GepProcAddress of its InitializeCustomeItem (at ordinal 240) and call it. But it whacks the Today screen so that none of the plugins load.
Next I thought I'd try FindWindow and EnumChildWindows to find it and all it's children. Then manipulate them by sending messages...
Click to expand...
Click to collapse
Update: So far, so good. As it turns out, EnumChildWindows doesn't work on the PPC, so I used GetWindow to find the plugin's handle. I can successfully send messages to it and initiate various actions.
Question: I'd like to visually indicate (on the old-plugin) what's being clicked (such as drawing a box around it). Is it possible to draw things outside of my own window?
It is, but it's tricky.
You can always use the GetDC function to retrieve the DC for another window and paint on it, but the problem is that unless you subclass the window you have no way of knowing when it repaints it self and all your changes are erased.
levenum said:
It is, but it's tricky.
You can always use the GetDC function to retrieve the DC for another window and paint on it, but the problem is that unless you subclass the window you have no way of knowing when it repaints it self and all your changes are erased.
Click to expand...
Click to collapse
I tried that exact thing (GetDC) and drew a rectangle in it, but it didn't do anything. I realized the reason was the WM_Paint event wasn't firing on old-plugin, and when it did, my stuff was erased (just like you said).
Next idea - open my own dialog window than overlays old-plug. The entire window needs to be transparent - except for the visual indicators that I position where I want. When the user ok's, I close the window and send the click to old-plugin...
Thanks again for keeping tabs on my progress..
No offence, but with all these rather advanced programming tricks you are attempting just to "sup up" an old weather plugin it looks to me like you would be better off just writing the whole thing from scratch.
It you are familiar with WinInet and / or sockets this should be pretty easy and it will look and work much better than the hack you are attempting now.
Plus you can make it exactly the way you like.
levenum said:
No offence, but with all these rather advanced programming tricks you are attempting just to "sup up" an old weather plugin it looks to me like you would be better off just writing the whole thing from scratch.
It you are familiar with WinInet and / or sockets this should be pretty easy and it will look and work much better than the hack you are attempting now.
Plus you can make it exactly the way you like.
Click to expand...
Click to collapse
No offence taken. I thought of that, but I figured this would be a good way to cut my teeth a little. Once I complete this little project, I may pursue that route...
Question: Do you have a favorite forum (or forums) besides this site that you use for your research/programming questions?
This is my favorite forum
But here are couple more sites I found very valuable:
www.pocketpcdn.com - They have tips and tricks with code examples arranged in categories like how to make MFC dialogs not full screen or the one I used in LVMTime to put the clock back on the taskbar.
www.codeproject.com - It's not specific to WM development but has tons of interesting stuff including entire sources.
You should also check out www.buzdev.net If you're not familiar with the great work of buzz_lightyear you should see some of the stuff he did for this forum like grab_it - the invisible ROM dumper.
OT
Just a quick OT question:
If I would move some of the plugin-dll's from \Windows to \Storage Card, would it be enough to change the adress within the corresponding item in the registry entry HKLM/Software/Microsoft/Today/Items ?
Of course I'm not talking about plugins like tasks a.s.o but rather third party plugins
Cheers
hrb
It won't work.
The problem is that the SD card is mounted too late so if you put the plugins on it they will not be loaded when device boots up.
You can move them to the extended ROM this way or to a folder other than windows but there is no way to move start-up stuff to SD.
Thanks for the help with this "little" project. After many hours, the product is out for beta testing. When it's released, I'll post more info...
Finished!
It's finished. The app is called WP-Pilot and it provides one-handed operation of WeatherPanel. If anyone's interested, it can be found here. Here's how it ended up:
There's a plugin (WP-PilotPlugin.dll) with an options dialog, and an executable (WP-Pilot.exe).
When the plugin gets selected, it looks for Weatherpanel. If it finds it, it fires off WP-Pilot.exe
WP-Pilot.exe opens. It does this stuff:
Look for WeatherPanel, and get it's screen coordinates.
Read the registry and determine which layout file WeatherPanel is using.
Open the layout file and read it: Record the coordinates of each "clickable" item found. This was a real PITA because of Unicode.
Sort the coordinates for left-to-right, top-to-bottom order.
Select the first coordinate and position a tiny window (10x10) at that x-y position.
Draw a "pointer" in the window (the type and color depends on what's selected in the options).
Show the window and process input:
[*]Left/right pressed - selected the next/previous coordinate and move the window to that location.
[*]Up/down pressed - close WP-Pilot and tell the plugin we're done.
[*]Center button pushed:
[*]Send a mouse click to the WeatherPanel plugin at the coordinates
[*]Close WP-Pilot and tell the plugin we're done.​
Thanks again for your help!

Unknown process slows Jasjar to 10% speed

I had an installation of Odyssey GPS software go horribly awry last night. Ever since then, a process called "Installation" runs with a blank white screen (between top & bottom blue menu bars) after every soft reset, and the machine slows to about 10% speed.
The process is NOT visible in Settings/System/Memory/Running Programs, nor can I find "Installation" on the device. Killing the process via Magic Button (is there an easier way?) speeds the machine up to about 40% speed, but it's still DEAD SLOW, and it will run again after the next reset.
Clearly, something is auto-launching and running, but what tool can I use to find and destroy it? Thanks for any insight! Cheers,
gibhenry said:
[...snip...]Clearly, something is auto-launching and running, but what tool can I use to find and destroy it?
Click to expand...
Click to collapse
Well, evidently no one else knew any more than I did, so I researched it the pains-taking way (reviewed every file with a modify date/time >= the installation date/time) and determined that the installation had left an alias to Wceload.exe in the \Windows\Startup folder...removing that alias resolved ALL the problems!
Y'all should be ashamed...I'm a Mac guy, and I figgered it out myself! Cheers,
glad you got it fixed, man.
this is a forum though, you need to give it some time, especially as people from loads of different timezones are members. for example, in my timezone your original post was at 10:36pm and your second at 7:24am. you need to give people a chance to wake up!
r3bel said:
glad you got it fixed, man.
this is a forum though, you need to give it some time, especially as people from loads of different timezones are members. for example, in my timezone your original post was at 10:36pm and your second at 7:24am. you need to give people a chance to wake up!
Click to expand...
Click to collapse
No, no! You need more Java, you need to drink more coffee so you can keep up with ALL time zones!
Interestingly, the installation of Voice Command (and I notice you have it too) did the SAME THING, and it's fresh (1.6, November 2006) from Micro$loth! Any idea what that file is, why it's put there, and why it locks up my device? Must I expect this problem with EVERY install? (Haven't tried it yet, so don't even know whether it will work....)
Oh, and thanks for your response! Cheers,
MSDN says this about WCELOAD.EXE:
The Wceload tool (Wceload.exe) runs on your target device. You typically use this tool to install a .cab file to a location that you select on the target device. Most .cab files are configured to enable the user to select the destination volume where the .cab file will be installed, either \Device or \Storage Card. However, you can choose to suppress the destination volume selection prompt and install the .cab file to a default location, specified in the .inf file used to create the .cab file.
Typically, you do not directly call Wceload. Instead, Wceload is called programmatically by other programs to install .cab files. For example, if you use File Explorer to view and open a .cab file, Shell automatically invokes Wceload for installation of the .cab file.
Why WCELOAD.EXE was put into your Startup folder is anyone's guess, but I'd hazard that it's there to do a "cleanup" of sorts after the first reset.
Why it's still there, and causing a slowdown, I don't know. Perhaps you have some other previously-installed someftware that clogged up the WCELOAD.EXE cleanup-works, and each successive installation is just being held up by that?
Did you reset with the stylus, or a software reset?
Bear in mind, the above are just idle thoughts going through my mind.
gibhenry said:
No, no! You need more Java, you need to drink more coffee so you can keep up with ALL time zones!
Click to expand...
Click to collapse
Coffee or even strong cola makes me shake. No, seriously, it's unpleasant. My body DOES NOT like caffeine! Looks like normal sleep patterns for me!
snorbaard said:
[...snip...]
Why WCELOAD.EXE was put into your Startup folder is anyone's guess, but I'd hazard that it's there to do a "cleanup" of sorts after the first reset.
Why it's still there, and causing a slowdown, I don't know. Perhaps you have some other previously-installed someftware that clogged up the WCELOAD.EXE cleanup-works, and each successive installation is just being held up by that?
Did you reset with the stylus, or a software reset?
Bear in mind, the above are just idle thoughts going through my mind.
Click to expand...
Click to collapse
I appreciate your insight! I agree it's probably there to clean up; however, the odd thing is that the "swimming in glue" problem shows up at the end of the install, the install appears NOT to complete, and innumerable stylus-induced soft resets still cause "Installation" to launch and produce the glacial slowdown. The file itself lives in \Windows; it's the link to it in the Startup folder that seems to be the key. Perhaps it's it's being called twice...?
There's a a review of the Odyssey GPS software with which I first encountered the problem, and the reviewer ALSO encountered the problem (he didn't identify Wceload.exe as the problem, just said that only a HARD reset fixed it). Meanwhile, I've found one or two other instances of folks having a problem with this file, yet presumably the majority of folks do not. Something to do, perhaps, with the device itself--firmware version or configuration maybe? It's a mystery! Cheers,

start menu - programs, settings...

ok, question
we know goddamn start menu,
my main problem is to make "settings" field able to launch something ELSE than pseudolauncher named "settings"
i found app from unpacked winCE rom ,that is far way better ,than wmxx settings m$hit.
look @ this, and compare both...
http://rapidshare.com/files/43325355/control.EXE.html
what files are needed to be hexedited to change that current cretinal launcher to that fast, safe app?
sry for LQ language,
..
p.s. and jesus, do not tell me about smallmenus,etc.
uhm, how does your settings field launch "settings" and "programs"?
like i said, my english is not good enough to describe what i mean..
start menu is "app", that holds (let's say) links to "programs" and "settings"(which windows are another program - pseudolauncher-like) - and these entries are two things, that i need to remap to do somethnig else, than usual....
need any idea what can be done to override these menu positions behaviour..
i hope it is clearer now...
i do not want to use start menu replacement etc, i have wm5newmenu for useful menus;
lets say i am curious...how. as simpliest try i can imagine hexediting in some files....which ones...
in other words: i want to set under "Settings" this app from link.
i cant be clearer...
Hi,
have you looked in \windows\startmenu folder? There are files and folders
that are displayed in the startmenu. Maybe you can play around with
them to get what you want. You can add or delete folders, rename the
original settings folder and add your own folder.
Ok no exe is started then, but is this necessary for you?
Houser
Best thing is you use gsfinder (freeware file explorer). With gsfinder, you can make shortcuts to your favorite applications, then copy these shortcuts to \windows\startmenu (of course you can also rename these shortcuts). This way you have your own personalized launcher
it is nice, that you are trying to help me, but i know everything about shotrtcuts .
i just need to override menu start hardcoded "programs" and "settings" assign(e)ments.
i am not noob lol
Have you tried Wisbar Advance?
helterskelter said:
Have you tried Wisbar Advance?
Click to expand...
Click to collapse
you must be kidding
(no offece, just lolled while reading).
WA is not good way to do the things
i am minimalist, you know..
I think there are no responses, because its still not quite clear what you want to have.
How about describing step by step what you want to see (or not to see) when pressing start? Because all the answers sound good to me regarding your previously described problem....
Hope you get help soon ^^
i do not want to change start menu..:S
i just want to change "programs" and "settings" tap behaviour....
only thing i can imagine is hex editing, but i do not know where menu start coded is...
Hex editing????
You need to dissemble and rewrite a core OS component.
Which means:
a) Get a good ROM dump
b) Find the DLL responsible (not sure maybe coredll.dll or aygshell.dll)
c) Unsign it
d) Get IDA
e) Read and understand all its code
f) Rewrite the relevant portion
g) Sign new file with privileged certificate
h) Copy to device
The reason you did not get the answer you seek is because this kind of undertaking is far beyond the skills and knowledge of most people on this forum including my self.
Also its way easier (if maybe not as comfortable) to use start replacement apps.
(Oh, and if you are willing to take some friendly advice: Your English is just fine, but your first post is full of curses and is very aggressive. It deters people from replying because they might get a bang on the head for their trouble. A friendlier language next time may get better results)

Developing Auto-DisableRefresh-When-Dragging App [New Video Added]

I know some people have already discussed this in the noRefresh App thread.
But I got a new idea
I don't wanna create a module and embed that to applications
Instead, I created a new Input Device in the kernel
After that, I set the device ( dev/input/event3 ) permission to allow read / write for others.
Then, write an app using JNI to catch the Input Device and set the mode of refreshing.
The prototype proved that this idea works, as i worked out it already, but not very perfect, still in experiment
I am just in some problems of threading, as I am not a professional programmer
This is wt i have now:
http://www.youtube.com/watch?v=GkFyvRR6In8
NEW!! : http://www.youtube.com/watch?v=cucG03rg3tg
I know that my method is a bit dirty,
but at least it works XD
I hope that someone would like to help
Upload those code soon
By the way, why can't i change content of init.rc ?
It removes my changes after reboot..... How to solve?
wheilitjohnny said:
By the way, why can't i change content of init.rc ?
It removes my changes after reboot..... How to solve?
Click to expand...
Click to collapse
You need to modify uRamdisk to change init.rc.
Would you like to tell me how to unpack the uRamdisk? I use both Windows and Ubuntu, any methods on these two platform is ok. Thanks!
Try the script from this post http://forum.xda-developers.com/showpost.php?p=24135886&postcount=72
This is simply amazing. Since you already have it working, polishing it shouldn't take too long (I think, I'm still a beginner programmer).
I don't think /dev/input is a good place to park that.
There are any number of things that could show up there and affect order.
Why not put it in its own directory?
Maybe I'm missing something, but if we use your method you still expect applications to have to be modified to read/write from event3 to control display mode?
As it is now, you only need a single function call to switch display modes. Yes, there is a little bit of housework to do before that, but what could be simpler than a single function?
I think no place else is more suitable than /dev/input.
As /dev/input is the linux kernel's input system.
In the driver, I would only use the input report system but not use the I/O system.
Maybe even setup a input/event searching function to solve the problem later.
The case now is that, the touch screen originally just provide event2,
but if we need to extract move and fingerup information on upper level, it may waste some time.
In order to make the whole algorithm easier and faster, I added 1 more event in the zForce driver,
to only output FingerMove and FingerUp state.
As the reporting system is starting from the kernel, this hack would need to change uImage + uRamdisk + Add an App. The project is quite huge.
My final target is to make the application remembering your choice on what mode u need for the focusing application.
AlwaysOn / OnlyWhenDragging / AlwaysOff, so on.
Of coz the click-to-call function still work.
Isn't it a better workflow and more intuitive, isn't it the thing that we would expect?
I already have an dev/input/event3 on my system and sometimes event4, 5, 6.
That's why I don't think that whatever it is you are doing belongs there.
Is the point to allow coders for user applications to interface with your driver?
Is this supposed to work without modifying user applications?
What information would be going in/out of event3?
Clearly I am missing something here.
Actually not necessary to be event3, the system will auto-ly create a new eventx, just in normal case, without any extra USB devices, a nook should only have up to event2. So, I use event3 as an example here.
We can later make the program auto-ly search back which is the needed eventx.
Yes, u r right, we no need to modify any other applications and this is exactly the point y i am creating this!
Anyone know how to call a FullScreen Refresh in a service?
always on?
Look really great. Since blinking after scrolling is incomfortable is it possible to have also "always on " mode using your new ideas?
My final target is to make the application remembering your choice on what mode u need for the focusing application.
AlwaysOn / OnlyWhenDragging / AlwaysOff, so on.
Of coz the click-to-call function still work.
Also an Over-Ride mode, for more flexible using.
But the most basic part need to be handled well now, as it is not very perfect now.
I still don't figure out how to call the e-ink driver to refresh the screen =-=
wheilitjohnny said:
I still don't figure out how to call the e-ink driver to refresh the screen =-=
Click to expand...
Click to collapse
Have you tried
Code:
echo 1 > /sys/class/graphics/fb0/epd_refresh
?
wheilitjohnny said:
Yes, u r right, we no need to modify any other applications and this is exactly the point y i am creating this!
Click to expand...
Click to collapse
Are you saying that your idea does not require modifying user applications?
If it doesn't, then there is no need to have a public interface.
It will be only your code talking to your code.
What is the point of this /dev/input/event3? You say that it will be writable. What's going in and out?
Some apps will be using gestures, some dragging. How are you going to keep track of that all?
I have one application that works perfectly fine now, one activity uses swipe gestures to page up/down while another activity uses drag with a user choice of A2 and display while dragging or else only panning at ACTION_UP.
All this requires less than 10 lines of code.
With multitouch, many applications don't even need A2. Even normal panning in Opera Mobile works much better now that Opera doesn't try to display while panning.
Maybe my english is too bad, cannot express the idea well.
I know, we can make such an application with noRefreshDrag working on its own well.
But how about other applications, it is impossible for us to change all applications.
So, my idea is making it system based.
My prototype is very good now, after several adjustment.
Not limited to only 1 application, but the whole system.
The approach is like this:
1. zForce driver provide extra information to InputEvent
2. A JNI catch the InputEvent
3. A service get the data and set the update mode
We only need to write 1 application to handle the setting of this chain.
This is what i mean, hope that u get what i mean now.
mali100 said:
Have you tried
Code:
echo 1 > /sys/class/graphics/fb0/epd_refresh
?
Click to expand...
Click to collapse
Let me try it now!
wow, it works great
wheilitjohnny said:
zForce driver provide extra information to InputEvent
Click to expand...
Click to collapse
I guess that this is the part that I don't understand.
What is this extra information?
Renate NST said:
I guess that this is the part that I don't understand.
What is this extra information?
Click to expand...
Click to collapse
It created an extra Event, l called it Event3 before.
Driver reports only move and finger_up to Event3.
Just providing a channel to pass an information from driver to user-space.
You may ask why not directly using the existing Event, need to create another one.
That is because, the original one only have touch and position information, parsing them back to move information need a bit of work. As the hardware provided the move information, then don't waste it.
Code:
public boolean dispatchTouchEvent(MotionEvent event)
{
switch(event.getAction())
{
case MotionEvent.ACTION_DOWN:
break;
case MotionEvent.ACTION_MOVE:
break;
case MotionEvent.ACTION_UP:
break;
}
return(true);
}
}
Isn't that everything that you could ask for?

Categories

Resources