Force Titanium to Refresh? - General Questions and Answers

This is hopefully painfully easy for experienced developers on here, but I've googled till my fingers bled and have not been able to find a suitable answer.
How do I force the Titanium menu in WM6.5 to refresh... i.e. pick up new data from the Windows registry?
For the old "Today" screen, advice seems to be use the Send Message command to broadbast an INI change to all open Windows:
Code:
Public Shared HWND_BROADCAST As IntPtr = IntPtr.op_Explicit(&HFFFF)
Public Const WM_WININICHANGE = &H1A
---------------------------------------
ret = SendMessage(HWND_BROADCAST, WM_WININICHANGE, 252, 0)
But this doesn't seem to be working for Titanium.
Anyone got any ideas?

I'm just using the refresh Titanium.exe which can be found in Twolf's Multiplugin Cab found here: http://forum.xda-developers.com/showthread.php?p=3906994

Thanks for the link.
Couldn't see any exes in the cab, just what I assume are mortscripts. Do you write you apps in .NET or in mortscript? If the former, how do you "shell" the script from within your program?

digital_elysium said:
Thanks for the link.
Couldn't see any exes in the cab, just what I assume are mortscripts. Do you write you apps in .NET or in mortscript? If the former, how do you "shell" the script from within your program?
Click to expand...
Click to collapse
Me & Twolf, use mortscript, the plugin you see there is by Twolf.
Owh yh, it probably is the Refresh Titanium.mscr, which i ment, there's just a link made in the start menu folder. Refresh Titanium will refresh the today screen...
To use it in another mortscript file, just use: Run(\Program Files\...\Refresh Titanium.mscr) where ... stands for the folder where you put it in...

Maybe a bit off topic but does somone know what is the command to disable and enable (not refresh) the today screen in wm6.5? I need it for use in a mort script.

claus1953 said:
Maybe a bit off topic but does somone know what is the command to disable and enable (not refresh) the today screen in wm6.5? I need it for use in a mort script.
Click to expand...
Click to collapse
I don't really know, but i wonder why Twolf uses double RefreshToday in his mscr. So maybe just one time will disable it?:s not sure.
---edit---
i figured it out for you claus...
So first write 0 (for disable) to: HKEY_LOCAL_MACHINE\Software\Microsoft\Today\Items\"Windows Default":Enabled
Then RedrawToday
Now today screen will be empty and you can do whatever you want...

larbke666 said:
I don't really know, but i wonder why Twolf uses double RefreshToday in his mscr. So maybe just one time will disable it?:s not sure.
---edit---
i figured it out for you claus...
So first write 0 (for disable) to: HKEY_LOCAL_MACHINE\Software\Microsoft\Today\Items\"Windows Default":Enabled
Then RedrawToday
Now today screen will be empty and you can do whatever you want...
Click to expand...
Click to collapse
Thanks a lot, it worked

Sorry, only read this now.
I used to use the refresh.exe made by a forum menber (I have no idea who... ).
Now Im using only the today refresh option of Mortscript that is simply:
Code:
RedrawToday

claus1953 said:
Thanks a lot, it worked
Click to expand...
Click to collapse
Hi,
I don't know much about mortscript, I am looking for one that will reload Windows Default after I change the cpr ( I hope this is what you are talking about )

In case you dont have it yet...

Thanks Twolf, my life is easier now

digital_elysium said:
This is hopefully painfully easy for experienced developers on here, but I've googled till my fingers bled and have not been able to find a suitable answer.
How do I force the Titanium menu in WM6.5 to refresh... i.e. pick up new data from the Windows registry?
For the old "Today" screen, advice seems to be use the Send Message command to broadbast an INI change to all open Windows:
Code:
Public Shared HWND_BROADCAST As IntPtr = IntPtr.op_Explicit(&HFFFF)
Public Const WM_WININICHANGE = &H1A
---------------------------------------
ret = SendMessage(HWND_BROADCAST, WM_WININICHANGE, 252, 0)
But this doesn't seem to be working for Titanium.
Anyone got any ideas?
Click to expand...
Click to collapse
I don't know if you still want to do this in .net but here is the working code:
Declare Function SendMessage Lib "coredll.dll" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As IntPtr
Declare Function GetDesktopWindow Lib "coredll.dll" () As IntPtr
Private Const WM_WININICHANGE As Long = &H1A ' 0x1a = 26 ; &HF2 = 242
SendMessage(GetDesktopWindow(), WM_WININICHANGE, &HF2, 0)
Click to expand...
Click to collapse
have fun!

Related

Making new non-ascii keyboard layout

Hello there.
According to this description:
http://www.kandroid.org/android_pdk/keymaps_keyboard_input.html
I am trying to create new layout with cyrillic characters (so i want to kind of introduce localization for input).
In order to do this I am changing some lines in file
./development/emulator/keymaps/qwerty.kcm
from:
Code:
[type=QWERTY]
# keycode display number base caps fn caps_fn
A 'A' '2' 'a' 'A' '#' 0x00
B 'B' '2' 'b' 'B' '<' 0x00
.....
to
Code:
[type=QWERTY]
# keycode display number base caps fn caps_fn
A 'A' '2' 'a' 'A' '#' 0x00
B 'Б' '2' 'б' 'Б' '<' 0x00
.....
which are supposed to be russian characters.
But compiling this yields in:
Code:
KeyCharMap: out/target/product/generic/obj/KEYCHARS/qwerty.kcm_intermediates/qwerty.kcm.bin
development/emulator/keymaps/qwerty.kcm:5: expected number or quoted ascii but got: 'а'
So it is seems like it does not like utf-8 characters. So, how am I supposed to create non-ascii layout?
You need to use UTF8 chars in quotation marks = "Б", try it again and pls post a file if you succeded
the same stuff:
Code:
[B][[email protected] bin]$ make[/B]
build/core/product_config.mk:229: WARNING: adding test OTA key
build/core/main.mk:177: implicitly installing apns-conf_sdk.xml
============================================
TARGET_PRODUCT=generic
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_OS=linux
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=TC3
============================================
KeyCharMap: out/target/product/generic/obj/KEYCHARS/qwerty.kcm_intermediates/qwerty.kcm.bin
development/emulator/keymaps/qwerty.kcm:6: expected number or quoted ascii but got: "Б"
make: *** [out/target/product/generic/obj/KEYCHARS/qwerty.kcm_intermediates/qwerty.kcm.bin] Error 1
[B][[email protected] bin]$ cat development/emulator/keymaps/qwerty.kcm[/B]
[type=QWERTY]
# keycode display number base caps fn caps_fn
A 'A' '2' 'a' 'A' '#' 0x00
B "Б" '2' "б" "Б" '<' 0x00
......
you might try the numeric value for the characters instead. I'm not sure if that would work or not. I don't have much experience with non-US character sets
so, this is the file, which perform checking:
./build/tools/kcm/kcm.cpp:
the piece of code is:
Code:
static int
parse_number(const char* filename, int lineno, char* str, int* value)
{
int len = strlen(str);
if (len == 3 && str[0] == '\'' && str[2] == '\'') {
if (str[1] > 0 && str[1] < 127) {
*value = (int)str[1];
return 0;
} else {
fprintf(stderr, "%s:%d: only low ascii characters are allowed in"
" quotes near: %s\n", filename, lineno, str);
return 1;
}
}
char* endptr;
*value = strtol(str, &endptr, 0);
if (*endptr != '\0') {
fprintf(stderr, "%s:%d: expected number or quoted ascii but got: %s\n",
filename, lineno, str);
return 1;
}
if (*value >= 0xfffe || *value < 0) {
fprintf(stderr, "%s:%d: unicode char out of range (no negatives, "
"nothing larger than 0xfffe): %s\n", filename, lineno, str);
return 1;
}
return 0;
}
Anyone can say, how the charset should be formatted in order to pass this?
Ок, I found out.
Just change 'a' to 0xNNNN (with no qoutes around).
I've tested cyrillic layout with emulator -- it works fine.
Does anybody with root access what to try it on G1 ?
I'll provide you with layout file and instructions.
I am really interesting in trying this! Have rooted G1.
I've already tried, it works!
No I am trying to understand, how to write a simple utility, which will copy files back and forth in order to change layout.
http://forum.xda-developers.com/showthread.php?t=466705
please help - i wanna do this for hebrew chars
can u give me a quick run through of what you did to get this done and a more detaild explanation on how you overcome the unicode char failing in the file?
plus - if i understand correctly - you do not have english anymore on your keyboard - or is there something that allowes you to switch between langauges somehow (an android alt-shift or whatever?)
thanks,
E.
--
Peace
eladkatz said:
can u give me a quick run through of what you did to get this done and a more detaild explanation on how you overcome the unicode char failing in the file?
plus - if i understand correctly - you do not have english anymore on your keyboard - or is there something that allowes you to switch between langauges somehow (an android alt-shift or whatever?)
thanks,
E.
--
Peace
Click to expand...
Click to collapse
attached is the example of file with unicode chars
the only way to changes layouts i can see -- is to copy layout files back and forth
So, it actually does work, I wrote a simple app which changes key layout files as soon as you lunch it. It is kind of software layout switcher.
Main problem now: android seems to have some buffer, so layout does not change as soon as you replace a file. It take some random time or chars to input before changes applies.
So I am wondering if somebody knows how to force android to reload charmap?
Another thing that might help, if I can find out which process opens charmap file, it could really help. Unfortunately neither android nor busybox does not have lsof command.
more info:
I have noticed, that app reload the layout file the same time as garbage collector runs for this app. I don't know for sure, where GC initiate layout reloading or they both are initiated by some superior event.
I keep digging android sources, if anyone have any ideas I'll be glad to consider 'em.
keep us posted
dude, what you are doing is very interesting, and i'd aprreciate it if you could keep updating.
Thanks,
E.
i have a adp1, but i can´t put the file on my g1?
can someone please tell me how to do, or why don´t i have root acess?
thanks
eladkatz said:
dude, what you are doing is very interesting, and i'd aprreciate it if you could keep updating.
Thanks,
E.
Click to expand...
Click to collapse
2nd that! Appreciate your work, Worry. Thanx!
Can this be done for Bulgarian layout? I am searching something like this for a long time...
worry said:
I wrote a simple app which changes key layout files as soon as you lunch it.
Click to expand...
Click to collapse
Have you figured out how to access android filesystem from the Java app?
hello!file attached above was only src,need to be makekcharmap-ed,yes?can u plz put here compiled version because at this time don't have an ability 2 use computer and sdk to compile myself!thanks!!!
I have a question :
How to mod the input method ?
For an example : with input method, when I type double "A" it will become "Â", and it will back to "A" if I type triple "A".
(We use qwerty keyboard and input method controller to type our language, we don't have own keyboard as Rusian, Japan ...)
Really good job! Thanks!
Please, keep updating!

vb.Net Resize Images

Hello
I am trying to resize images, but i cannot get it work
The Size is adjusted but then I only see the half of the image or it is too small
I do not want to use PictureBox.StretchImage because i want to draw it on a picture without being related to the size of the PictureBox
here my Code:
Code:
Public NeedRefresh As Boolean
Public ObjectHeight As Integer = frmMain.pctDraw.Height / 5
Public BackBufferBitMap As Bitmap
Public BackBuffer As System.Drawing.Graphics
Dim TempBitmap As New Bitmap(32, 32)
Dim TempImage As Image
Public Sub LoadImage()
Dim myGraphics As Bitmap
myGraphics = New Bitmap(AppPath & "\img\test.jpg")
TempBitmap.Dispose()
TempBitmap = Nothing
TempBitmap = New Bitmap(32, 32)
Dim tempGraphics As Graphics = Graphics.FromImage(TempBitmap)
tempGraphics.DrawImage(myGraphics, 0, 0, New Rectangle(0, 0, 32, 32), GraphicsUnit.Pixel)
tempGraphics.Dispose()
myGraphics.Dispose()
End Sub
Thanx
SciLor
Again,
MSDN FORUMS is your friend:
http://social.msdn.microsoft.com/Search/en-US/?Refinement=112&query=resize+image+
MSDN isnt my friend all routines wont work on .net compact framework
but thank you
Resize image?
Hi
Just wonder if you figured out how to do it?
Im trying to do a imageblog application...
/Sebulba_se
Take a look at my ScrollingDemo
http://forum.xda-developers.com/showthread.php?p=3041373
I just use a "ImageList" control to do this without thinking just put it in and get it from there again
another idea would be to do this with LockBits
http://msdn.microsoft.com/en-us/library/5ey6h79d(VS.80).aspx
but I still use the control..

MapActivity, Buttons and OnClickListener

Hi all,
could you give me some help please? I have written a simple MapActivity that contains a mapview (defined in the xml file); it also contains a Button.
If the Button has no OnClickListener associated then the project runs fine (the mapview is of course empty).
If I add an OnclickListener the application simply Force closes.
Has anyone tried this? I was actually following the example in a book but I guess something has changed in the SDK since it was written?
I m using SDK 1.1 (for the moment).
If you have (recently) written something similar, could you give me some pointers please?
thanks
N
"could you give me some pointers please?"
Might be a nullpointer indeed. Check your LogCat (Eclipse: Window, show view, other, logcat), this will probably give you some nice hints.
LOL
ehhehe
havent checked the log yet, will do and then report back here.
if anyone else has other suggestions please dont hesitate!
thanks
N
LogCat
Vlemmix said:
"could you give me some pointers please?"
Might be a nullpointer indeed. Check your LogCat (Eclipse: Window, show view, other, logcat), this will probably give you some nice hints.
Click to expand...
Click to collapse
Vlemmix,
I checked the LogCat and seems too be a nullpointer indeed, but I cannot identify the mistake in the code.
This is the java source for the class. could you please have a look ?
If I un-comment the commented lines, I get a force close. Leave them uncommented and everything works (no click event on the button tho).
package com.chipset.testgps;
import com.google.android.maps.MapView;
import android.widget.Button;
import com.google.android.maps.MapActivity;
import android.os.Bundle;
public class main extends MapActivity {
@Override
public boolean isRouteDisplayed(){
return false;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final Button but = (Button) findViewById(R.id.gpsButton);
// but.setOnClickListener(new View.OnClickListener() {
// public void onClick(View v){
//
// }
// });
final MapView map = (MapView) findViewById(R.id.myMap);
setContentView(R.layout.main);
}
}
Any help please??
thanks
N
1)
First do the setContentView, after that the Button is findable. The system could not find your Button now, so that's why it is a null. Your MapView map also would be a null in your code.
2)
If you define an object within {} it is only available within that {}
You probably going to need the Object "but" later, so make it a private variable of the class.
3)
Classname should start with a capital.
4) Visit anddev.org or some site like that for coding problems, xda seems to be more focused on system/firmware issues, not application code.
So, this should work:
public class MainActivity extends MapActivity {
final Button but;
final MapView map;
@Override
public boolean isRouteDisplayed() {
return false;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
but = (Button) findViewById(R.id.gpsButton);
but.setOnClickListener(new View.OnClickListener() {
public void onClick(View v){
}
});
map = (MapView) findViewById(R.id.myMap);
}
}
Right
Hi Vlemmix.
Thanks very much for your help. I can understand what you are telling me, but if its so:
1) with the listener's lines commented, my code does show both the button and the mapview.. shouldnt it force close anyways if the problem is the setcontentView?
2) yeah agree with you on this one, though since I couldnt get even this simplest code to work, I didnt really want to overcomplicate it for now.
3) this is not a requirement is it? I mean its a coding convention, a good one yes, but not mandatory..?
4) Will do thanks, I m trying to get my bearings with all the dev websites etc.
PS about the API Key.. is this strictly required for developing on localhost (testing on the emu)? I find the info a bit confusing to be honest..
I will give your mods a shot this evening and will post here later tonight.
For the moment a big thank you for showing me my (silly) mistakes (I kinda miss .NET at times.. I wouldnt have messed up that bad with it..).
thanks!
N
Quick reply:
1) You can only find a view when the content is set. No content: nothin' to find!
3) Just do it! ;-)
API key, localhost? I don't understand your question... I'm on SDK1.1, did some work on the emulator, now most on the G1, no big difference. Don't know about keys. You probably need a key for generation an apk for the market though.
ApiKey
Vlemmix said:
Quick reply:
1) You can only find a view when the content is set. No content: nothin' to find!
3) Just do it! ;-)
API key, localhost? I don't understand your question... I'm on SDK1.1, did some work on the emulator, now most on the G1, no big difference. Don't know about keys. You probably need a key for generation an apk for the market though.
Click to expand...
Click to collapse
Will try and let you know mate!
The API Key you need to put in the xml for the MapView. apparently google has made this a requirement instead of the bogus key. I just dont understand if this is true also for the apps you test on the emu or only the ones that go 'live'..
Vlemmix
HI there,
just wanted to let you know that moving the setcontentview worked a treat!
Im so very embarassed now
thanks again for your help mate, I owe you one.
N
You're welcome, no problem!

[Q] BAD_XML error when trying to use ProvXML to set security settings

I am now trying my hand at provXML to query/change security settings. I realize that most would probably come back with some type of access denied exception, but I am unable to even get that far.
I have an interop unlocked samsung omnia7 with mango. I am trying to use DMProcessConfigXML to send an xml string to set a security policy (in this case SECPOLICY_CFAUTORUN (2) ). I use QueryPolicy to check its value (currently a "0" and send the xm to set it to a 1.
Here is a snippet from the relavent code
Code:
DWORD dwPolicyValue = 0;
HRESULT hr = QueryPolicy(2, &dwPolicyValue);
LPWSTR wszOutput = NULL;
LPCWSTR wszQueryXML =
L"<? xml version=\"1.0\" encoding=\"utf-16\" ?>"
L"<wap-provisioningdoc>"
L"<characteristic type=\"SecurityPolicy\">"
L"<parm name=\"2\" value=\"1\">"
L"</characteristic>"
L"</wap-provisioningdoc>";
MessageBox(NULL,wszQueryXML,L"Now sending the following xml",MB_OK);
HRESULT hr2 = DMProcessConfigXML(wszQueryXML,CFGFLAG_PROCESS,&wszOutput);
delete[] wszOutput;
The first call to QueryPolciy returns a 0. The call to DMProcessConfigXML returns -2147213303 or FFFFFFFF80042009 which I believe is CONFIG_E_BAD_XML. There may be a problem with the xml string, but I can't see it. Any suggestions as to a solution or somewhere else to look?
It seems to only be when I am accessing the security policies. I can send a query for the certificate stores
Code:
LPCWSTR wszOutput =
<wap-provisioningdoc>
<characteristic type="CertificateStore">
<characteristic-query type="Privileged Execution Trust uthorities" />
<characteristic-query type="Unprivileged Execution Trust Authorities" />
<characteristic-query type="SPC" />
<characteristic-query type="CA" />
<characteristic-query type="Root" />
<characteristic-query type="MY" />
</characteristic>
</wap-provisioningdoc>
It returns a 800704EC errorcode, which is a permission problem I think. The security policy queries however give me the bad xml error.
OK I have worked a little more with this and am now successfully able to provision certs in the MY, CA, and ROOT stores with the following code
Code:
void AddCert(const std::wstring& strCertStore, const std::wstring& strCertHash, const std::wstring& strCertEncoded)
{
LPWSTR wszOutput = NULL;
wchar_t wszXML[16384];
swprintf(wszXML,L"<wap-provisioningdoc>"
L"<characteristic type=\"CertificateStore\">"
L"<characteristic type=\"%s\">"
L"<characteristic type=\"%s\">"
L"<parm name=\"EncodedCertificate\" value=\"%s\"/>"
L"</characteristic>"
L"</characteristic>"
L"</characteristic>"
L"</wap-provisioningdoc>", strCertStore.c_str(), strCertHash.c_str(), strCertEncoded.c_str());
HRESULT hr = DMProcessConfigXML(wszXML,CFGFLAG_PROCESS,&wszOutput);
delete[] wszOutput;
}
I am unable however to add a cert to the Code Integrity store, or even query that store with the provisioning xml. The call to DMProcessConfigXML returns 86000011, and I can't find any reference as to what that error code could mean. Any thoughts?
Thanks,
Since you're using native code and messing with pretty serious stuff, you may want to try starting a thread on the Development and Hacking sub-forum (be sure to do a searcch first, of course). I do know that Heathcliff74, an XDA-Devs member, has been able to get full access to the certificate store and exposes this through his WP7 Root Tools app. This app is hosted on that sub-forum.
I know people have tried calling DMProcessConfigXML() before, and been blocked by various security policies. Have you made any changes to your phone that would increase the permissions your app runs at? Being able to make any changes using wap-provisioning straight from a sideloaded app surprises me; I didn't think they had that much permission. Have you tried using registry or filesystem provxml?
My account on these forums is relatively new, and I am unable to post on the dev forums yet. For this reason, I have been posting here and hoping someone would see it and maybe offer some insight. Either that or get enough posts to allow posting in the dev forums. All this code that I have been developing is on a custom HTC image (which is a switch from the original post), so I have TCB access for a native exe that runs on boot.
I follow Heathcliff74's posts as well as yours and a few others on the dev forums and have downloaded quite a few of the apps. I've also been talking with a few of them through private messages. Once I can post on the dev forums, I will probably post some things there, as well as chime in on some of the discussions going on.
Thanks for taking the time to reply though.
I am still working on this but have decided to approach it from a different angle. Instead of using provisioning xml to add the encoded cert to the store, I am going to try using the crypto api functions to do it. I am using the instructions
here to get the strCertEncoded value. Basically just exporting it in base64 encoding and copying the contents (minus the BEGIN CERTIFICATE and END CERTIFICATE). I am trying to add the cert and then list the contents of the store. Here is the code:
Code:
char pszNameString[256];
void* pvData;
DWORD cbData = 0;
PCCERT_CONTEXT pCertContext = NULL;
DWORD dwPropId = 0;
HCERTSTORE hSystemStore = NULL;
std::string strCertEncoded ("INSERT ENCODED VALUE HERE");
DWORD dwEncodedSize = strCertEncoded.size();
if (hSystemStore = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, NULL, CERT_SYSTEM_STORE_LOCAL_MACHINE, L"Code Integrity"))
{
// try to add a cert
if (CertAddEncodedCertificateToStore(hSystemStore,MY_ENCODING_TYPE,(const BYTE*)strCertEncoded.c_str(), dwEncodedSize, CERT_STORE_ADD_REPLACE_EXISTING, NULL))
fprintf(pLog, "Certificate successfully added to Code Integrity store.\n");
else
{
fprintf(pLog, "There was an error adding the certificate to the store. %x\n", GetLastError());
}
fprintf(pLog,"===== Enumerating Code Integrity store =====");
// find certs in this store
while (pCertContext=CertEnumCertificatesInStore(hSystemStore,pCertContext))
{
// get the name
if (CertGetNameString(pCertContext, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL, (LPWSTR)pszNameString, 256))
{
fprintf(pLog,"\n%S\n",pszNameString);
// get the hash propery
CertGetCertificateContextProperty(pCertContext, CERT_HASH_PROP_ID, NULL, &cbData);
if (cbData == 0)
{
MyHandleError("CertGetCertificateContextProperty 1 failed.");
}
pvData = HeapAlloc(GetProcessHeap(), 0, cbData);
if (!CertGetCertificateContextProperty(pCertContext, CERT_HASH_PROP_ID, pvData, &cbData))
{
MyHandleError("CertGetCertificateContextProperty 2 failed.");
}
for (DWORD i = 0; i < cbData; i++)
{
fprintf(pLog,"%02X", ((byte*)pvData)[i]);
}
fprintf(pLog,"\n");
HeapFree(GetProcessHeap(), 0, pvData);
PCERT_INFO pinfo = pCertContext->pCertInfo;
SYSTEMTIME startDate;
FileTimeToSystemTime(&(pinfo->NotBefore),&startDate);
SYSTEMTIME endDate;
FileTimeToSystemTime(&(pinfo->NotAfter),&endDate);
fprintf(pLog,"Valid from %d/%d/%d to %d/%d/%d\n", startDate.wMonth, startDate.wDay, startDate.wYear, endDate.wMonth, endDate.wDay, endDate.wYear);
}
}
}
else
{
fprintf(pLog,"Error opening Code Integrity store. %d", hSystemStore);
}
The call to CertAddEncodedCertificateToStore returns with the errorcode 8009310B. The message for the error is "ASN1 bad tag value met." I have found some information on this error but have been unable to determine why I am getting it.

k9-mail with public folder support ( root namespace)

hi,
here i attach the latest k9-mail, which i compiled (thanks to cketti), and where the namespace is fixed,so, that user can also access to folders, which are on /
(because the nold k9-mail - does use on empty namespace - automatically use from NAMESPACEcmd the first in the list, which is normally always: /INBOX
so, user can'T access to a public folder.
til my dirty hack (patch) will be in GIT -> i upload here the version.
it is called "k9-mail v4.102 camel-hack"
.) Fixed creation of store URIs when a "path" was used. (done by cketti on 29.11.2011)
.) Fix for empty IMAP Folder Prefix (with Prefix=*, then it will use real empty Prefix. Because if totally empty, then it will use the first namespace - mostly INBOX)
(it is based on GIT - from 29.11.2011)
if you want to use the "/"(root) namespace, then you must insert a "*" (without ") on IMAP Folder Prefix
this can be set in -> account settings ->retrieve message -> incomming mail server -> IMAP Folder Frefix
PLS: after changing IMAP Folder Prefix to *, please adjust your settings for your folder
this thread is related to http://code.google.com/p/k9mail/issues/detail?id=1992 and several others which are "namespace" or "shared folder" or public folder related. you will find a lot of threads about this issue.
INSTALL: sometimes it could happen, that you can't install it over previous installed versions:
this is a known issue of different k9-mail versions.
1.) please backup (titanium backup) and export (in k9-mail on account view") your settings.
2.) uninstall k9-mail
3.) install my attached version.
4.) restore your k9 settings -> using titanium backup -> find k9-mail -> restore "only data"
(or you can import your previous saved k9-mail settings)
- -- -- - - -- - - -- -
now, i hope that cketti will add my patch to GIT.
the patch is:
Code:
ImapStore.java
line 573
} else {
int prefixLength = getCombinedPrefix().length();
- if (prefixLength > 0) {
+ if (prefixLength > -1) { //camel: set to -1 (orig=0), to get all folders from "", too
// Strip prefix from the folder name
ImapStore.java
line 2246
if (K9.DEBUG)
Log.d(K9.LOG_TAG, "NAMESPACE = " + hasCapability(CAPABILITY_NAMESPACE)
+ ", mPathPrefix = " + mSettings.getPathPrefix());
- if (mSettings.getPathPrefix() == null) {
+ if ((mSettings.getPathPrefix() == null) || (mSettings.getPathPrefix().equals("*"))) { // camel: to handle auto namespace and special case *
if (hasCapability(CAPABILITY_NAMESPACE)) {
if (K9.DEBUG)
Log.i(K9.LOG_TAG, "mPathPrefix is unset and server has NAMESPACE capability");
List<ImapResponse> namespaceResponses =
executeSimpleCommand(COMMAND_NAMESPACE);
for (ImapResponse response : namespaceResponses) {
ImapStore.java
line 2268
if (firstNamespace != null && firstNamespace instanceof ImapList) {
if (K9.DEBUG)
Log.d(K9.LOG_TAG, "Got first personal namespaces: " + firstNamespace);
bracketed = (ImapList)firstNamespace;
+ if (mSettings.getPathPrefix() == null) { // camel:case1: if empty, use namespace first NS
mSettings.setPathPrefix(bracketed.getString(0));
+ } else { // camel:case2: if *, then use empty path prefix
+ mSettings.setPathPrefix("");
+ }
mSettings.setPathDelimeter(bracketed.getString(1));
mSettings.setCombinedPrefix(null);
if (K9.DEBUG)
cu camel
Thank, you.
Works nice for me with shared folders on cyrus-imap.
Zaptac
Saw this because I have starred K9 ticket about shared folders (in)abilities. Just want to drop thanks for this, although I might wait for week or two before I try it to see if the K9 maintainer wil finally incorporate this into it.
vkrivokuca said:
Saw this because I have starred K9 ticket about shared folders (in)abilities. Just want to drop thanks for this, although I might wait for week or two before I try it to see if the K9 maintainer wil finally incorporate this into it.
Click to expand...
Click to collapse
well, i added the patch and the small changes (see on first posting)
there is nothing special (also patch from cketti is inside,where he fixed to import settings, where PREFIX was used (because there was a bug)
if cketti, will add it ... well, we will see.
here was always the discussio, that K9mail does only support 1 namespace. this means, if you ask your server via namespace cmd (see rfc3501), then you will get back the namespaces - like:
[[INBOX, /] [user, /] [PUBLIC-FOLDER /] [SHARED-FODLER]...]
and k9mail does:
if prefix is empty, then load namespace and use first field for IMAP PREFIX (second value is the delimiter, which can also be different)
so, the beautiful solution would be, to load from every namespace the folders into K9-Mail. But there is only 1 load for folders (LIST, SELECT, change to folder structure, etc..), and this would be very very complicated to load all of them ...
(this is also not possible in thunderbird or outlook or whatever, so - in my mind, i'm sure, that toload multiple namespaces into k9-mail doesn't make senseand wouldbe very complicated.
in my mind:
with the new method, we must only inform, user on the new PREFIX option "*", then users can load the whole namespace via * from server (this could be added to the prefix hint field in IMAP PREFIX field and will be shown if it is empty)
cu camel
please also, help to give me feedback, otherwise it will not implement in future versions.
we must be sure, that it is working lfine for all (because there are ~700k user, which are using k9-mail)
cu camel

Categories

Resources