Missing Sync for Mac & 2.1 ROMs - Hero CDMA General

After updating to 2.1 on my Hero, I discovered that Missing Sync for Android didn't work anymore. It just doesn't see the mounted SD Card! This was a deal breaker for me since i rely on it to keep the data in sync.
There is a fix! The only problem is that Missing Sync hasn't been updated yet for the Legend phones. Apparently the Product ID for the phone has changed from 0x0c02 (decimal: 3074) to 0x0c9a (decimal: 3226). This can be fixed by editing the DeviceList within the Missing Sync package.
Right click the Missing Sync.app to show contents. Locate the "DeviceList.json" file in the Content/Resources folder. Make a backup copy of it (Command-D) and open the original with TextEdit.
Locate the following code:
Code:
"VID":"0x0bb4",
"3074":{
"musicInfo":{
"playlistPath":"MarkSpace\\Playlists",
"exportPath":"MarkSpace\\Music",
"importPath":"Music"
},
"videoInfo":{
"exportPath":"MarkSpace\\Video",
"importPath":"DCIM",
"importPaths":[
"E:\\DCIM"
]
},
"mediaFolderPathInternal":"",
"ringtoneInfo":{
"exportPath":"MarkSpace\\Ringtones",
"importPath":"",
"fileExtensions":[
"m4a"
]
},
"cardDrivePrefix":"E:\\",
"deviceName":"G1",
"mediaFolderPathOnCard":"",
"photosInfo":{
"deleteFoldernames":[
],
"deleteFilenames":[
],
"exportPath":"MarkSpace\\Pictures",
"importPath":"DCIM",
"ignoreFoldernames":[
],
"importSubfolders":true,
"importPaths":[
"E:\\DCIM"
]
}
},
For now, simply change the "3074" to "3226" and save the file. Missing Sync will now see the phone. This should suffice until an update to support Legend phones is available.

Related

Why the basic OPENGL ES app can not run on my Touch HD?

Hi, all.
I find this perfect site through Google after I bought a Blackstone.
I want to do something on my phone, that's OpenGL ES.
When I download the sample code "7 OpenGL ES Tutorials for Win32/WinCE from TyphoonLabs" from khronos and compile them. The samples run well on the Windows Mobile 6.5 Emulator. (there is no libGLES_cm.dll file in the windows folder)
But, when I copy the exe files to my Blackstone, they failed to run. The Tutorials 1 only flash a title then over.
I can find a libGLES_cm.dll file in the windows folder of my Blackstone. It is 322KB, smaller than others I can get. (such as 491KB 10-10-2004). I can't replace it or delete it.
I think the 1st sample of TyphoonLabs is a typical and basic OpenGL ES app, it has not use any advanced ES feature.
however, VR HOLOGRAM runs well on my phone.
I installed "Ati d3d driver", and my app development environment is:
Visual Studio 2008
Windows Mobile 6 SDK
thanks
Have a look at the first post of my OpenGLES test app(check my sig) and try to run this app (take the latest one). There is also a link to a thread about a driverpack (v3 has just been released). Just to be sure that your device has some OpenGLES capable drivers.
AFAIK the hologram app uses d3d.
edit: The examples you mentioned create a rendering device using Red 8, Green 8, Blue 8 bits. Change them to 5, 6, 5 and try again. And don't copy their libgles_cm.dll to the device. Instead use the latest driverpack as described above.
Thank you, heliosdev
yes, i already tried your OpenGLES test app. it runs well also on my phone, but I don't understand C. do you have C code?
i try to modify the sample code following you instruction. but i failed. where am i wrong?
BOOL InitOGLES()
{
EGLConfig configs[10];
EGLint matchingConfigs;
const EGLint configAttribs[] =
{
EGL_RED_SIZE, 5, // i changed it from 8 to 5
EGL_GREEN_SIZE, 6, // i changed it from 8 to 6
EGL_BLUE_SIZE, 5, // i changed it from 8 to 5
EGL_ALPHA_SIZE, EGL_DONT_CARE,
EGL_DEPTH_SIZE, 16,
EGL_STENCIL_SIZE, EGL_DONT_CARE,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_NONE, EGL_NONE
};
hDC = GetWindowDC(hWnd);
glesDisplay = eglGetDisplay((NativeDisplayType)hDC);
if(!eglInitialize(glesDisplay, NULL, NULL))
return FALSE;
if(!eglChooseConfig(glesDisplay, configAttribs, &configs[0], 10, &matchingConfigs))
return FALSE;
if (matchingConfigs < 1) return FALSE;
glesSurface = eglCreateWindowSurface(glesDisplay, configs[0], hWnd, configAttribs);
if(!glesSurface) return FALSE;
glesContext=eglCreateContext(glesDisplay,configs[0],0,configAttribs);
if(!glesContext) return FALSE;
eglMakeCurrent(glesDisplay, glesSurface, glesSurface, glesContext);
glClearColorx(0, 0, 0, 0);
glShadeModel(GL_SMOOTH);
RECT r;
GetWindowRect(hWnd, &r);
glViewport(r.left, r.top, r.right - r.left, r.bottom - r.top);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrthox(FixedFromInt(-50), FixedFromInt(50),
FixedFromInt(-50), FixedFromInt(50),
FixedFromInt(-50), FixedFromInt(50));
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
return TRUE;
}
//----------------------------------------------------------------------------
void Render()
{
static int rotation = 0;
GLshort vertexArray[9] = {-25,-25,0, 25,-25,0, 0,25,0 };
GLubyte colorArray[12] = {255,0,0,0, 0,255,0,0, 0,0,255,0};
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatex(0, 0, FixedFromInt(-10));
glRotatex(FixedFromInt(rotation++), 0, ONE,0);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_SHORT, 0, vertexArray);
glEnableClientState(GL_COLOR_ARRAY);
glColorPointer(4,GL_UNSIGNED_BYTE, 0, colorArray);
glDrawArrays(GL_TRIANGLES, 0, 3);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
eglSwapBuffers(glesDisplay, glesSurface);
}
On your device there is no libgles_cm.dll at the place where your exe is, right?
Otherwise remove it from the directory where your exe is.
edit:
If it still doesn't start you could try to write out some messages during initialization (at the places before returning false).
Do you have libgles_cl.dll? In the code you have thes FixedFrom* calls.
You could try to remove all these calls, i.e. instead of FixedFromInt(i) just i and you'll have to change the x to i,f or d in the calls like Rotatex.
heliosdev said:
On your device there is no libgles_cm.dll at the place where your exe is, right?
Otherwise remove it from the directory where your exe is.
Click to expand...
Click to collapse
I copied the libgles_cm.dll file before from windows folder to Storage Card, where the exe file locates.
now I delete the libgles_cm.dll file , but nothing changes.
heliosdev said:
On your device there is no libgles_cm.dll at the place where your exe is, right?
Otherwise remove it from the directory where your exe is.
edit:
If it still doesn't start you could try to write out some messages during initialization (at the places before returning false).
Do you have libgles_cl.dll? In the code you have thes FixedFrom* calls.
You could try to remove all these calls, i.e. instead of FixedFromInt(i) just i and you'll have to change the x to i,f or d in the calls like Rotatex.
Click to expand...
Click to collapse
thank you again.
I find the error occurs during initialization,
BOOL InitOGLES()
{
EGLConfig configs[10];
EGLint matchingConfigs;
const EGLint configAttribs[] =
{
EGL_RED_SIZE, 5, // i changed it from 8 to 5
EGL_GREEN_SIZE, 6, // i changed it from 8 to 6
EGL_BLUE_SIZE, 5, // i changed it from 8 to 5
EGL_ALPHA_SIZE, EGL_DONT_CARE,
EGL_DEPTH_SIZE, 16,
EGL_STENCIL_SIZE, EGL_DONT_CARE,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_NONE, EGL_NONE
};
hDC = GetWindowDC(hWnd);
glesDisplay = eglGetDisplay((NativeDisplayType)hDC);
if(!eglInitialize(glesDisplay, NULL, NULL))
return FALSE;
if(!eglChooseConfig(glesDisplay, configAttribs, &configs[0], 10, &matchingConfigs))
return FALSE;
if (matchingConfigs < 1) return FALSE;
glesSurface = eglCreateWindowSurface(glesDisplay, configs[0], hWnd, configAttribs);
if(!glesSurface) return FALSE;
Here, it returns
Hy,
maybe this can be a workaround for you!
http://cegcc.sourceforge.net/docs/faq.html#DllDoesNotWorkWithWindowsMobile6.1
------------------
Memory management changes in Windows Mobile 6.1 cause some DLLs not to load. It has been suggested (see this blog that the underlying problem is a writable code section in the DLL, other reports suggest that the DLL size may be an issue.
The workaround or solution (I'm not sure what to call it) that we have is to restrict this DLL to Slot 0 by adding the following registry key:
[HKEY_LOCAL_MACHINE\System\Loader\LoadModuleLow] "MyDll.dll"=dword:1
Obviously you need to change "MyDll" into the name of the DLL that causes the problem.
Please note that using the this approach will force your entire DLL into Slot 0 and, it may prevent other modules from loading in that slot. Therefore, the above registry setting should be used with caution.
------------------
Greatz
mccoffein
mccoffein said:
Hy,
maybe this can be a workaround for you!
http://cegcc.sourceforge.net/docs/faq.html#DllDoesNotWorkWithWindowsMobile6.1
------------------
Memory management changes in Windows Mobile 6.1 cause some DLLs not to load. It has been suggested (see this blog that the underlying problem is a writable code section in the DLL, other reports suggest that the DLL size may be an issue.
The workaround or solution (I'm not sure what to call it) that we have is to restrict this DLL to Slot 0 by adding the following registry key:
[HKEY_LOCAL_MACHINE\System\Loader\LoadModuleLow] "MyDll.dll"=dword:1
Obviously you need to change "MyDll" into the name of the DLL that causes the problem.
Please note that using the this approach will force your entire DLL into Slot 0 and, it may prevent other modules from loading in that slot. Therefore, the above registry setting should be used with caution.
------------------
Greatz
mccoffein
Click to expand...
Click to collapse
thank you, mccoffein. that is a different idea.
But i think registry table is not the issue. Because the app can run on WM6.5 emulator, and heliosdev's OPENGL ES test app can run on my phone also.
I download glBenchmark 1.0 from glbenchmark.com, it can run also.
now I have no idea.
anyone can help me?
Got it
When I put my libgles_cm.dll in the same folder of my App, the App runs.
I think the libgles_cm.dll from HTC has some unknown problems.
Thanks
ak2009 said:
thank you again.
I find the error occurs during initialization,
BOOL InitOGLES()
{
EGLConfig configs[10];
EGLint matchingConfigs;
const EGLint configAttribs[] =
{
EGL_RED_SIZE, 5, // i changed it from 8 to 5
EGL_GREEN_SIZE, 6, // i changed it from 8 to 6
EGL_BLUE_SIZE, 5, // i changed it from 8 to 5
EGL_ALPHA_SIZE, EGL_DONT_CARE,
EGL_DEPTH_SIZE, 16,
EGL_STENCIL_SIZE, EGL_DONT_CARE,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_NONE, EGL_NONE
};
hDC = GetWindowDC(hWnd);
glesDisplay = eglGetDisplay((NativeDisplayType)hDC);
if(!eglInitialize(glesDisplay, NULL, NULL))
return FALSE;
if(!eglChooseConfig(glesDisplay, configAttribs, &configs[0], 10, &matchingConfigs))
return FALSE;
if (matchingConfigs < 1) return FALSE;
glesSurface = eglCreateWindowSurface(glesDisplay, configs[0], hWnd, configAttribs);
if(!glesSurface) return FALSE;
Here, it returns
Click to expand...
Click to collapse
Yes. Because hWnd now is not valid handle. Hands of tutorial programmers is from ass .
Simple, call InitOGLES() after you created window.

[MOD][SENSE2.5TAB] SenseUtil (Tab Control File Editor) [10 Aug 2011 New Release]

Project Open
Compiled Cab file attached to this post.
Code-Plex Page (source available):
http://senseutil.codeplex.com
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
======================
Project Status
======================
Initial development is completed.
The application does all the items defined in the Manifest!
Ideas and feedback are very welcome, particularly for the GUI (which is more functional than anything else).
Graphics etc are welcome, then I can add graphical controls etc and state icons.
Added example shortcuts
Shortcuts for use with installing and uninstalling tabs. See Shortcuts section of the manual below.
Release 10th Aug 2011 (meltwater_SenseUtil (9433).cab) - Thanks to mike2nl for gathering the extra tab details and corrections!
+Added (shortcuts & resource files):
1a9fc010_manila \windows\HTC\today.mode9
2c417551_manila \windows\HTC\GGorizont\GGorizont.mode9
04ca8df7_manila \windows\HTC\GPSTracker\GPSTracker.mode9
34C172FA_manila \windows\HTC\Manilatv\favorites.mode9
037D6881_manila \windows\HTC\GameFifteen\GameFifteen.mode9
0C3A0700_manila \windows\HTC\programlauncher.mode9
2CAADFCD_manila \windows\HTC\manilaradio\manilaradio.mode9
+Corrected document tab shortcut
+Language title files (6f286a05_manila_en-us_titlefixed.txt is template for others)
+Language title files added to cab (although most require translations etc)
Code:
[B]Release 22nd Feb 2011 (meltwater_SenseUtil (6952).cab) - 680views[/B]
+ Added fix for "Unable to update file"
+ Using Release instead of Debug build
[B]Release 26th Jan 2011 (meltwater_SenseUtil (6328).cab) - 189views[/B]
Code is the same, but added CabFile to package (with Shortcuts) and HQ icon for application.
- Cab will always install to Device "\windows\SenseUtil" regardless of user selection.
[B]19 Jan 2010 (SenseUtil_6026.zip)[/B]
Changed default position to after home tab.
Added shortcuts for more tabs.
[B]18 Jan 2010 (SenseUtil_6007.zip)[/B]
Updated softreset message for commandline updates.
[B]17 Jan 2010 (SenseUtil_5973.zip)[/B]
------------------
Added shortcuts.
Added option to reset device following command-line modification of tab control file (with prompt so user can wait to see if sense restarts without reset).
[B]2 Dec 2010 (SenseUtil_5021.zip) - 246+140views[/B]
------------------
Initial Release
Cab (thanks to Captain_Throwback).
======================
Additional Work
======================
Missing Available Tabs:
===============
If there are any missing tabs from the available tabs list, then send me the details so I can generate a resource file.
Extra Features (To Do):
==========
At some point I will update the app to read the configuration keys (if available) and generate the file using the order defined there (plus re-generate the keys to keep disabled tabs disabled).
Graphics:
======
If anyone is interested, I can add icons to help determine the states of the tabs...just need some graphics!
Possible State Icons for tabs:
Tab Installed & Present - in the tab control file & on the device (Installed Fine)
Tab Not Installed & Present - not in the tab control file but on the device (i.e. Available to add)
Tab Installed & Not Present - in the tab control file but not on the device (!Warning State! Sense will probably fail to run)
Tab Not Installed & Not Present - not in the tab control file or in on the device
Also the icon could indicate if the source is from XML file or the tab control file (only applies to the installed ones - not installed ones will always be xml).
====================
User Manual
====================
I'll try to update this with new information as and when I get time, hopefully the app isn't too difficult to understand.
Control Sense Page:
============
This page controls sense...
[Start Sense]:
If sense is not selected in the Today Plugin, this adds and triggers sense to start.
[Stop Sense]:
If sense is running, or set in the Today Plugin to run, this will remove it and trigger it to close.
[Restart Sense]:
This will cause sense to restart (by removing and adding it from the Today Plugin).
Note: Any changes to your Tab Control File (26948339_manila) are ignored.
[Reset Sense]:
The same as [Restart Sense], but will also cause it to re-build by removing the ManilaFull.xml file.
Note: If you have changed your Tab Control File (26948339_manila) any changes will be re-built in this process.
[Full Reset Sense]:
The same as [Reset Sense], but will also delete the configuration registry keys (this is required when you add/remove tabs for them to initialise correctly and for them to show up in the Tab Re-arrange page within the Sense Settings Tab).
Note: Any tabs disabled via the Sense Settings Tab will be re-enabled!
[Soft Reset]:
This simply restarts your device, quite often sense will not re-start correctly without at least one reset.
Tab Control File [Update]:
If you have generated a new Tab Control File (26948339_manila), this option will replace your existing file (creating a timestamped backup within the SenseUtil folder) and [Full Reset Sense].
Tabs (Loaded) Page:
============
On start up, this page shows the contents of the Tab Control File (26948339_manila).
[Build]:
Once you have made adjustments to the list, you can build a new file (which you can then view using a suitable text editor and check if you wish).
Tab Source [#]:
This toggles the source of the tab data:
Default=Your original Tab Control File
File=The loaded xml resource file
Note:
If the tab is not available (the xml file does not exist) then the source will not change. Also if you delete and re-add a tab which was in your tab control file, it will not be able to be set back to Default - you will need to Reload the data fresh.
Remove [-]:
Removes the tab, the tab will no longer be installed.
Shift Up [^] and Shift Down [v]:
Allows you to adjust the default positions of the tabs.
Tabs (Available) Page:
============
This page will show you the tab's which are available (loaded from the Resource Folder xml files).
When you select an item, you will be able to see if the tab's keyfile is Present On Device or not, this provides an indication of if the files required for the tab are on the device
Note: Only the keyfile is checked - there will be additional files required for the tab/sense to function.
Various details about the tab are also available, if a custom tab links to the tab's development and release pages should be provided.
Add Tab [+]:
Allows you to add a tab to your Tab Control File, if the tab is not detected as Present On Device you will be warned that Sense probably will not start (you will need to install the correct tabs files on your device).
Add All [+All]:
This will add all the tabs which are detected as Present On Device but not currently in the Tab Control File.
Note:
Only the keyfile is checked - there will be additional files required for the tab/sense to function. So be sure you have correctly installed all the required files for a particular tab.
Settings Page:
============
Provides various options for the app.
Register to Today Softkey:
[Set Action/Contacts)]​
Only recommended if you use the app a lot as it provides an easy way to start up/control sense if it has not loaded.
[ ] Advanced View:
This allows you to see all the data which the app collects about the installed/available tabs and uses to do what it does. Useful for debugging issues with the resource files or problems with the app itself.
[Reload Files]:
This will read in your Tab Control File again, and reload all the resource Xml files (for the available tab list).
Note: Any changes you've made to your Tab Control File in the app will be discarded.
Command Line Options:
============
SenseUtil add 6B54437C_manila
- Adds the specified tab, leave other tabs as they are
SenseUtil renew
- Replaces all tab details with data from the xml files (leaves any not found in the xml files as they are)
SenseUtil addall
- Adds any tabs which are not in the tab control file but found on the device (checking for the key mode9 file), the other tabs are left as they are. New tabs are added at end before settings tab.
SenseUtil addallnew
- As above, but other tabs are replaced with details from the xml files (leaves any not found in the xml files as they are)
SenseUtil remove 6B54437C_manila
- Removes the tab if installed on the device
Shortcuts:
========
By using the shortcuts, it is assumed that SenseUtil is installed to device location:
"\Windows\SenseUtil\"
Code:
i.e For FbTab:
Add Shortcut:
54#"\Windows\SenseUtil\SenseUtil.exe" add 51B6F88A_manila
Remove Shortcut:
57#"\Windows\SenseUtil\SenseUtil.exe" remove 51B6F88A_manila
For other tabs, look up the xxxxxxxx_manila file in the resource section and replace 51B6F88A_manila (note: the 54# and 57# need not change since the length should remain the same). Or post a request and I'll upload suitable shortcuts!
Note:
1. Before using the shortcut you must install the correct files for the tab in the correct location (if files are not present the tab will not be added).
2. System may need Soft-Reset (turn off and on again) for sense to restart correctly (you will be prompted to wait and see if sense starts).
3. The order set by the settings tab will be reset by this process.
Code:
[SIZE="5"]===============================
Application Manifest - What I Planned To Achieve
===============================[/SIZE]
The plan is a simple program which reads the tab control file (file 26948339_manila) and allow you to add/remove tabs using a simple xml file to provide the correct info.
MoonNah's ([url]http://forum.xda-developers.com/showthread.php?t=670116[/url]) B_L_Group_FixStartManila_2.5.cab is an excellent tool which simply re-generated the list based on the files it found within the windows dir, worked well except there was no indication that is was successful or what it had done.
I think it would be quite simple to extend the idea a little further by creating an app with a gui which then searched it's local folder for xml files. The xml files will be named to match the key mode9 filename for each tab:
i.e. RSS Tab = \windows\htc\people\RssFeed.mode9 = 6B54437C_manila
[B]So there would be a xml file called 6B54437C_manila.xml which contains the data for the tab:[/B]
[CODE]<Page Order="X" Name="rssfeed.page" PackageName="HTC" Title="[[IDS_RSSTITLE]]">
<ComponentReference Name="page" Mode9Path="HTC\People\RSSFeed.mode9" Component="SummaryAllPage" SmartComponent="true"/>
<ComponentReference Name="icon_normal" Mode9Path="HTC\Manila\RssFeedicon.mode9" Component="RssFeed_Off"/>
<ComponentReference Name="icon_selected" Mode9Path="HTC\Manila\RssFeedicon.mode9" Component="RssFeed_On"/>
<ComponentReference Name="icon_preview" Mode9Path="HTC\Manila\RssFeedicon.mode9" Component="RssFeed_Preview"/>
</Page>
So the app would look for each of the xxxxxxxx_manila files in the windows directory and then allow the user to add/remove any tabs which are present on the system. This would also allow users to totally disable any "problem" tabs more effectively than via the config keys.
The xml files could also have a full list of required files (which could also be checked), perhaps a link to obtain the latest release, the app could then be released with xml files for all current tabs and any new ones so users can easily see what is available and obtain them.
The app would also handle the disabling and resetting of sense so that the changes are correctly made.
Also the app could support command line option to install a specific tab if present (not making any changes to the others), which can then be used by cab files.
Note: Software is able to set today screen softkeys for easy use, but a proper soft-key manager is available here if you decide you want to set them to something different:
http://forum.xda-developers.com/showthread.php?t=388281
I will have a try at making the app myself but my time is very limited so any help will be greatly appreciated. But I do think that such a program would be very useful for those who have problems editing their tab control file (file 26948339_manila).
Let me know what you think?
======================
Language Title Fixes
======================
Custom Tabs (like RSSTab/Facebook Tab display IDS value on 1st run)
This is because the translation file used for the tab titles is separate to the tab's own language file.
I will update senseUtil to allow the users to update the files using a shortcut, but until I've completed and tested that, I've included a zip file of the required files.
CAB INSTALL:
Install meltwater_LangTitleUpdate_v01.cab. - 155views
Reset sense.
MANUAL INSTALL: - 149views
Unzip and copy the files into your devices \windows\ directory, and then reset sense.
Please let me know if you have any problems or if you have updates for the contained translations (I've only updated the ones I've already got translations for).
[/CODE]
======================
Language Title Fixes
======================
Custom Tabs (like RSSTab/Facebook Tab display IDS value on 1st run)
This is because the translation file used for the tab titles is separate to the tab's own language file.
I will update senseUtil to allow the users to update the files using a shortcut, but until I've completed and tested that, I've included a zip file of the required files.
Updated language files are contained within the SenseUtil cab file, please update the file language files and post them here (they will get included in the next cab).​
Great idea meltwater. This will help rookie cooks like me
TIA
illi said:
Great idea meltwater. This will help rookie cooks like me
TIA
Click to expand...
Click to collapse
Well my thinking is, if we can make the "black art" a little "lighter" then it opens things up for novice users (like I was once) and brings fresh ideas and talent in.
Ok, I've created an outline project in CodePlex, I will start putting in some basic stuff and see how I get on.
Time is limited for me, so if someone else is interested in working on this too then they are welcome. The source is easy to download, and I will happily add you to the project if you wish to upload your progress directly.
Excellent idea! ThumbsUp for this
1st Release!
Ok, I've put some starting stuff in (attempting to control sense).
Need some people to test it, I think there is an issue with starting sense again although not sure what. Soft-reset and it will comes back (assuming you've not changed anything else).
Sense Control Tab:
Start Sense - Clears the entry in the Today page for HTCSense
Stop Sense - Sets the entry in the Today page for HTCSense
Restart Sense - Does Stop and then Start with a delay in the middle.
Reset Sense - Same as Restart Sense but deletes the ManilaFull.xml file (which will cause sense to re-initialise - file will be regenerated)
Full Reset Sense - Same as Reset Sense but also clears the configuration keys (required when you add/remove a tab)
Settings Tab:
Allows you to register the app with the Today page softkeys (gives easy way to get sense running again!).
CAUTION: Only set to restore the defaults on my phone (LSoftkey=Action Page RSoftkey=Contacts).
Keys effected by this setting are:
HKCU\Software\Microsoft\Today\Keys\112
HKCU\Software\Microsoft\Today\Keys\113
Find the latest code in codeplex: http://senseutil.codeplex.com
Tester
I can try to test the app if you want.
Using Jackos ROM with Sense 2.5.20181527.0
But I flash relatively often so I'm able to test it on some different versions.
Could you point me out what I should do now (what to download, what to pay attention on)?
Hey meltwater!
I see you've gotten tired of manually updating people's Tab Control files .
Great idea - I wish I had some programming knowledge so that I could help. Unfortunately I do not. How difficult would it be to learn? What software would I need?
Skrobel said:
I can try to test the app if you want.
Using Jackos ROM with Sense 2.5.20181527.0
But I flash relatively often so I'm able to test it on some different versions.
Could you point me out what I should do now (what to download, what to pay attention on)?
Click to expand...
Click to collapse
Excellent!
So far it only has the basic sense control buttons in, so it would be help to check that they work correctly. My testing has shown that it sometimes has issues with starting sense, but that could be down to my sense setup (it's not very stable due to CHT and my own development work...).
At the moment, I seem to also have some issues with the softkey settings (but I'm happy I can continue testing that, issues with permissions etc I think).
From the codeplex changeset package (the zip file you download) you will only need the SenseUtil.exe (later on anything in the \Debug directory as files are added).
Captain_Throwback said:
Hey meltwater!
I see you've gotten tired of manually updating people's Tab Control files .
Great idea - I wish I had some programming knowledge so that I could help. Unfortunately I do not. How difficult would it be to learn? What software would I need?
Click to expand...
Click to collapse
Well more accurately... tired of some users...although having an easy way to reset sense etc will be very handy. Plus does seem to be the number 1 cause of issues.
It is a good as project as any to learn how to program on (nice mix of changing the registry, reading files and standard .net forms). You will need something like Visual Studio 2008 Professional though (you can get 90 day trials quite easy - let me know and I'll find you one).
I'm quite happy to help guide you (or anyone else interested) as far as I am able (although my code should not be taken as a prime example of how to code - it's not my trained area of programming).
OK, it's time for first impression
From the Sense control tab everything seems to be working cool. I tried each option in the first tab several times and Sense always started without problems.
I have one question though. After the first time I made a Full Reset (with the config keys) this button was inactive anymore. I recon that the keys are already deleted. But shouldn't they be redefined during Sense next start?
And I confirm the matter with softkeys. The first time I wanted to assign SenseUtil to right softkey, the "Unexpected error" appeared (right after I confirmed I was sure) and I had to kill the app. However the second time each left and right softkey worked.
But the Set (Action/Contacts) button never worked. There is always Unexpected error when I tap "OK" in the message box. Below I present the details of the error.
Code:
SenseUtil.exe
ObjectDisposedException
w System.ThrowHelper.ThrowObjectDisposedException(String objectName, ExceptionResource resource)
w Microsoft.Win32.RegistryKey.EnsureNotDisposed()
w Microsoft.Win32.RegistryKey.EnsureWriteable()
w Microsoft.Win32.RegistryKey.SetValue(String name, Object value, RegistryValueKind valueKind)
w SenseUtil.Settings.SetSoftKey(Int32 selkey, String text, String url, Boolean confirm)
w SenseUtil.SenseUtil.buttonRegDefaultSoftKey_Click(Object sender, EventArgs e)
w System.Windows.Forms.Control.OnClick(EventArgs e)
w System.Windows.Forms.Button.OnClick(EventArgs e)
w System.Windows.Forms.ButtonBase.WnProc(WM wm, Int32 wParam, Int32 lParam)
w System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)
w Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)
w System.Windows.Forms.Application.Run(Form fm)
w SenseUtil.Program.Main()
I hope this all helps. I would also like to learn programming, but it needs more time than I actually have...
Skrobel said:
OK, it's time for first impression
From the Sense control tab everything seems to be working cool. I tried each option in the first tab several times and Sense always started without problems.
I have one question though. After the first time I made a Full Reset (with the config keys) this button was inactive anymore. I recon that the keys are already deleted. But shouldn't they be redefined during Sense next start?
And I confirm the matter with softkeys. The first time I wanted to assign SenseUtil to right softkey, the "Unexpected error" appeared (right after I confirmed I was sure) and I had to kill the app. However the second time each left and right softkey worked.
But the Set (Action/Contacts) button never worked. There is always Unexpected error when I tap "OK" in the message box. Below I present the details of the error.
Code:
SenseUtil.exe
ObjectDisposedException
w System.ThrowHelper.ThrowObjectDisposedException(String objectName, ExceptionResource resource)
w Microsoft.Win32.RegistryKey.EnsureNotDisposed()
w Microsoft.Win32.RegistryKey.EnsureWriteable()
w Microsoft.Win32.RegistryKey.SetValue(String name, Object value, RegistryValueKind valueKind)
w SenseUtil.Settings.SetSoftKey(Int32 selkey, String text, String url, Boolean confirm)
w SenseUtil.SenseUtil.buttonRegDefaultSoftKey_Click(Object sender, EventArgs e)
w System.Windows.Forms.Control.OnClick(EventArgs e)
w System.Windows.Forms.Button.OnClick(EventArgs e)
w System.Windows.Forms.ButtonBase.WnProc(WM wm, Int32 wParam, Int32 lParam)
w System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)
w Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)
w System.Windows.Forms.Application.Run(Form fm)
w SenseUtil.Program.Main()
I hope this all helps. I would also like to learn programming, but it needs more time than I actually have...
Click to expand...
Click to collapse
Good testing thank you!
The config keys are only generated when you rearrange the tabs, plus I only set the enable/disable of the buttons on start up of the app and following a press.
I think I've corrected the exception, but still not 100% sure about the keys (it is enough to make it work though).
Currently reading up on xml, long over-due I learned how to use it properly! Will have a new version in a few days hopefully.
Ok read through all the material I found on xml, (a good tutorial http://www.csharpkey.com/csharp/xml/Lesson01.htm) will now find out how much isn't supported in compact .net. Fortunately no real surprises, how I've been dealing with xml has been fine (although missed a few tricks). There's also some open source solutions around which I may look into (but for this it's probably fine keeping it simple, it's more suitable for the work I'm doing with RSS feeds).
Ok, new release!
Just put in loading of the xml files which contain the tab information which can be added. Should give a good idea of how things will work!
Will add options to filter the list etc.
Will read the tab control file next, then see if I can add/remove tabs!
meltwater said:
Ok, new release!(...)
Click to expand...
Click to collapse
OK, I downloaded, unpacked, loaded on my phone and.... realized that I have Sense 2.1 currently so I won't test it at once.
But just for your info, the Stop/Start sense, and Restart works even with Sense 2.1.19202517.0
Of course in the "Tabs Loaded" I have nothing, and in "Tabs Available" everywhere I see Not Present On Device. I could only test the overall behaviour of the app but this hasn't changed much. Still the "Set" button gives me the unexpected error, so I'm useless this time.
As soon as I will flash something with Sense 2.5 I will test it immediately and report back (this unfortunately won't happen until at least tomorrow).
Sorry...
Skrobel said:
OK, I downloaded, unpacked, loaded on my phone and.... realized that I have Sense 2.1 currently so I won't test it at once.
But just for your info, the Stop/Start sense, and Restart works even with Sense 2.1.19202517.0
Of course in the "Tabs Loaded" I have nothing, and in "Tabs Available" everywhere I see Not Present On Device. I could only test the overall behaviour of the app but this hasn't changed much. Still the "Set" button gives me the unexpected error, so I'm useless this time.
As soon as I will flash something with Sense 2.5 I will test it immediately and report back (this unfortunately won't happen until at least tomorrow).
Sorry...
Click to expand...
Click to collapse
If you still have 2.1 on, does it use the tab control file in the same way?
i.e. What is the 26948339_manila file like (can you post it?).
"Tabs Loaded" does nothing at the moment anyway, not reading the file yet. The update was to put in my current work in progress.
"Tabs available" I guess the filenames are different for sense 2.1, but can't see why we can't have a set of xml files for 2.1 as well if it works in a similar way. So far I've only created files for the ones on my system and a few which I've had before, I know there are a few missing to add.
Interesting the "set" button gives an exception, thought I'd covered that on my device (will look into it).
Cheers.
meltwater said:
If you still have 2.1 on, does it use the tab control file in the same way?
i.e. What is the 26948339_manila file like (can you post it?).
"Tabs Loaded" does nothing at the moment anyway, not reading the file yet. The update was to put in my current work in progress.
"Tabs available" I guess the filenames are different for sense 2.1, but can't see why we can't have a set of xml files for 2.1 as well if it works in a similar way. So far I've only created files for the ones on my system and a few which I've had before, I know there are a few missing to add.
Interesting the "set" button gives an exception, thought I'd covered that on my device (will look into it).
Cheers.
Click to expand...
Click to collapse
Here's the Tab Control file from Manila 2.1.1920.2517. It seems to contain similar information, but it contains a LOT more . . .
NOTE: This is from the VGA ported version, but I'm sure the differences are minor (if at all) . . .
Captain_Throwback said:
Here's the Tab Control file from Manila 2.1.1920.2517. It seems to contain similar information, but it contains a LOT more . . .
NOTE: This is from the VGA ported version, but I'm sure the differences are minor (if at all) . . .
Click to expand...
Click to collapse
I would guess that 2.1 does not have the _page.xml files, since that is what the manilafull.xml file looks like, a combination of the tab control and each of the related _page.xml files! Looks like the mode9 files don't include any of the path info beyond the HTC bit, hence why the filenames are probably different.
I'll not worry too much about it for now, interesting though.
Will upload my latest, simply because I'm calling it a night... Populated Tab(Installed) page with some data from the TabControl File - note the buttons will stay disabled (only put in for layout). Oh and the url links on the Tab(Available) aren't enabled yet either.
Update on codeplex now.
This is my WVGA control file for comparison. I haven't heared about any custom tabs for Sense 2.1 so I didn't thought you would be interested in it at alll.
@meltwater:
sorry to say that, but i have all the time when i start the version 4851 an error popup. Please see the screenshot:
mike2nl said:
@meltwater:
sorry to say that, but i have all the time when i start the version 4851 an error popup. Please see the screenshot:
Click to expand...
Click to collapse
See if the version before that works (since the exception is referring to InitialiseTabLists() which hasn't changed). I added a function before InitialiseTabLists() in the latest, which loads up the sense tab control file (but doesn't seem like it is that). Anyway, will check that there is suitable checking of things to avoid the exception, still building the basics.
Hopefully next time should be able to have a go at matching the tabs found in the file with the ones loaded, then generate a new file.
Cheers
meltwater said:
See if the version before that works (since the exception is referring to InitialiseTabLists() which hasn't changed). I added a function before InitialiseTabLists() in the latest, which loads up the sense tab control file (but doesn't seem like it is that). Anyway, will check that there is suitable checking of things to avoid the exception, still building the basics.
Hopefully next time should be able to have a go at matching the tabs found in the file with the ones loaded, then generate a new file.
Cheers
Click to expand...
Click to collapse
No stress please i can wait , because i skinning the RSS tab.

ImageView setting image not working on my particular device

I'm quite a beginner in the android world, so forgive me for any trivialities. I've developed a small android-app using Android-SDK and Eclipse-ADT that maintains information in an sqlite database. Now, there is a simple activity that reads product information from the sqlite db and updates the editbox controls. But one of the information is an image-location for that product (typically '/mnt/sdcard/something.jpg'). I use an ImageView control to display this image as described in the Android API:
img.setImageBitmap(BitmapFactory.decodeFile(c.getString(2)));
This works well on all android devices and emulators I've tested on, except one - on my particular device (Karbonn A30), the imageview is just blank, it doesn't show up anything!!
Hello,
I am facing the same issue on my ASUS device. On the emulated and Sony device it works fine.
To be sure that the file exists I have build in a Toast message that confirms that file exists on SD-card.
But the ImageView remain blank on the ASUS 300 TFT device.
Have you figured out what the issue is?
When I refer to an image on in the res-folder, then it is displayed.
Are you getting the image from SD card? If so, how are you retrieving the path to the image? Android devices vary greatly on how they handle external storage and their respective paths. What android version are the devices you're testing on?
______________________
Root it and boot it!
Current device: Sm-n900p/Sprint Note 3
ROM:AICP ROM
Service: Straight Talk
Check out my apps on Google Play
Hello,
I am using the android API's to access the pictures, like:
File externalDir = new File(Environment.getExternalStorageDirectory(), dir);
File mydir = this.getDir(dir, Context.MODE_PRIVATE);
I have tried it both for internal and external and external storage.
I have even build in a check to see if the image really exists (showing a positive result in a Toast-message).
I think it might be related to the size of the image.
If it is too big, would I need to resize it first to be able to display it?

How to search StorageFiles

I need a way to search in StorageFiles with dynamically pattern, which comes from a TextBox. The directive "Windows.Storage.Search" doesnt exist in windows phone 8.1 runtime, as i saw. Now my question is, how can i do this in alternative way?
The only way to do it with WP 8.1 since Microsoft ALWAYS fails to implement the important things are to query using LINQ.
Ex:
Code:
var result = (await Windows.Storage.ApplicationData.Current.LocalFolder.GetFilesAsync(Windows.Storage.Search.CommonFileQuery.OrderByName)).
Where(x => x.Name.
Contains(x => txtBox.Text));
That's about all you can do pretty much. (Thanks Microsoft).
Thank you for the example. But it wont work for me, it shows me the following error(s):
Code:
A local variable named 'x' cannot be declared in this scope because it would give a different meaning to 'x', which is already used in a 'parent or current' scope to denote something else
and
Code:
Cannot convert lambda expression to type 'string' because it is not a delegate type
Thats really odd from Microsoft, that they havent implementet the search function like in WinRT (Windows Store App).
The first error is pretty simple. You already have the variable named "x" and it would be very bad if compiler didn't give you that error.
Change the name of the variable to something else that you don't use in that scope and it will work.
And for second problem, try this one:
Code:
private List<string> Result()
{
var result = ((List<Windows.Storage.Search.CommonFileQuery>)Windows.Storage.ApplicationData.Current.LocalFolder.GetFilesAsync(Windows.Storage.Search.CommonFileQuery.OrderByName)).Where(x => x.ToString().Contains(txtBox.Text));
return result as List<string>;
}
private async Task<List<string>> ResultAsync()
{
return await Task.Run(() => Result()).ConfigureAwait(continueOnCapturedContext: false);
}
You should call ResultAsync method and get the result in this way:
Code:
List<string> myList = ResultAsync().Result;
That's not going to work. You can't cast a StorageFile as a string.
To fix my code (simple lambda typo)
Code:
var result = (await Windows.Storage.ApplicationData.Current.LocalFolder.GetFilesAsync(Windows.Storage.Search.CommonFileQuery.OrderByName)).
Where(x => x.Name.
Contains(txtBox.Text));
if(result.Any())
{
// Do shtuff
}
Also, you should never access the .Result of an async task because you never know if it completed yet.
Ok, first error is done, but the second error is still here
Code:
Cannot convert lambda expression to type 'string' because it is not a delegate type
You are missing the point of the TAP (Task Async Pattern).
Both main thread and async method will be in execution in the same time. When the async method finish his work, main thread will stop and catch the result trough the Result property.
TAP is the recommended way of asynchronous programming in C#. The only thing with TAP is to use ConfigureAwait method in non-console type of apps to avoid deadlock.
Sooner or later you will get the result from TAP method. Nothing will get in the conflict with the main thread.
Oh wait, @andy123456 I updated my response. I forgot String.Contains ISNT a lambda .
@Tonchi91, I know all about the TAP. I've been using it since it was CTP. I've seen the awkward situations with threading in WP .
Now... if he did
Code:
List<string> myList;
ResultAsync().ContinueWith(t=> { myList = t.Result; });
I wouldn't be worried .
Ok the errors are gone, but the debugger show me the following exception:
Code:
Value does not fall within the expected range
Is this search method case-sensitive? I tried with an exact input in the TextBox.
Hmmm. Let's see your full code.
its actually only for testing, so i added your code to a button (asnyc) and will show the output in a textBlock.
Code:
private async void buttonTest_Click(object sender, RoutedEventArgs e)
{
//Result();
var result = (await Windows.Storage.KnownFolders.CameraRoll.GetFilesAsync(Windows.Storage.Search.CommonFileQuery.OrderByName)).
Where(x => x.Name.
Contains(textBox_test.Text));
if (result.Any())
{
// Do shtuff
textBlock_test.Text = result.ToString();
}
}
The error is coming from here
Code:
var result = (await Windows.Storage.KnownFolders.CameraRoll.GetFilesAsync(Windows.Storage.Search.CommonFileQuery.OrderByName))
andy123456 said:
its actually only for testing, so i added your code to a button (asnyc) and will show the output in a textBlock.
Code:
private async void buttonTest_Click(object sender, RoutedEventArgs e)
{
//Result();
var result = (await Windows.Storage.KnownFolders.CameraRoll.GetFilesAsync(Windows.Storage.Search.CommonFileQuery.OrderByName)).
Where(x => x.Name.
Contains(textBox_test.Text));
if (result.Any())
{
// Do shtuff
textBlock_test.Text = result.ToString();
}
}
The error is coming from here
Code:
var result = (await Windows.Storage.KnownFolders.CameraRoll.GetFilesAsync(Windows.Storage.Search.CommonFileQuery.OrderByName))
Click to expand...
Click to collapse
Oh Camera Roll.. You MIGHT need to have the capability to view the camera roll enabled. I forget what it's called, but you need a specific cap in order to view from there. Also, I would try to see if you can use a generic folder instead.
I would try Windows.Storage.ApplicationData.Current.LocalFolder.GetFilesAsync() as your method after the await just to test whether you can read correctly.
Yes but in wp8.1 runtime app, there arent caps anymore. The capability for access to the pictures is simply calles pictures library and is enabled. I have tested it as you said, but it gives me the same exception.
A quick tip: another way to do this is to use the Win32 C runtime API. You can, for example, use the FindFirst/NextFile functions (http://msdn.microsoft.com/en-us/library/windows/desktop/aa364418(v=vs.85).aspx) which support searches using wildcards (* and ? characters in the first parameter). These functions are wrapped in my NativeLibraries classes, but are also just publicly available for third0party developers to call from their own C++ DLLs.
Alternatively, you can use the .NET System.IO.Directory class, which has functions like EnumerateFiles(String path, String searchPattern). This is probably the better way to do it, actually.
Of course, if you want these operations to not block the current thread, you'll need to explicitly put them in their own thread or async function.
EDIT: This also assumes you have read access to the relevant directories. You application data directory works fine, for example (you can get its path from the relevant StorageFolder object). Other directories that can be accessed via WinRT functions may go through a broker function instead of being directly readable.
The point is, that i have an array with filenames. Now i need the StorageFile files which contains these filenames. My idea was to search for these files and return the files as StorageFile, so i can work with these. Or is there a simpler / another way?
http://msicc.net/?p=4182 <-- try this
Thank you, i have already done this and its working. But how can i compare the Files to read, with already read files and take only the not yet read files?

How can I make ChiralCode - Android-Color-Picker appear in a dialog window?

I found the following link 'https://github.com/chiralcode/Android-Color-Picker'. I copied `ColorPicker.java' and `ColorPickerDialog.java' . I've been trying to make that dialog box appear somehow .. but I still can't figure it out. If you run the initial app you can see that it has a color picker dialog button (when you press it that window appears). How can I make something like that?
I tried using this(as he says on that website) :
ColorPickerDialog colorPickerDialog = new ColorPickerDialog(this, initialColor, new OnColorSelectedListener() {
@override
public void onColorSelected(int color) {
// do action
}
});
colorPickerDialog.show();
but I get a lot of errors. I only copied those 2 java files, nothing else. Not even the layout or something like that. What else should I copy in order to make it work ? I'm using Android Studio
I've been trying to solve this for a long time .. but however I try I won't get it done. Thank you
iDaniel19 said:
I found the following link 'https://github.com/chiralcode/Android-Color-Picker'. I copied `ColorPicker.java' and `ColorPickerDialog.java' . I've been trying to make that dialog box appear somehow .. but I still can't figure it out. If you run the initial app you can see that it has a color picker dialog button (when you press it that window appears). How can I make something like that?
I tried using this(as he says on that website) :
ColorPickerDialog colorPickerDialog = new ColorPickerDialog(this, initialColor, new OnColorSelectedListener() {
@override
public void onColorSelected(int color) {
// do action
}
});
colorPickerDialog.show();
but I get a lot of errors. I only copied those 2 java files, nothing else. Not even the layout or something like that. What else should I copy in order to make it work ? I'm using Android Studio
I've been trying to solve this for a long time .. but however I try I won't get it done. Thank you
Click to expand...
Click to collapse
You should probably copy all the files there... if any aren't needed Android Studio will tell you as they won't be used.
Edit: Also you're doing it wrong, have a look at the demo code here & here.
Thank you for that. I will try it now. How should I add the color picker to my layout ?
Edit: I added it to my layout . Using the first demo I get the same values by clicking the button. I tried the second one, but it's a lot more complicated, and I'm getting nowhere. Thank you .
Edit2 : Thank you.I did it. I couldn't have done it without your help.

Categories

Resources