I have searched and searched but not found anything that is suitable.
I am looking for a menu add-on or context menu that will allow me to:-
Create a calendar appointment/meeting request with a contact that does not have email address so cannot use the meeting request as an attendee.
i.e. 'Create Meeting With':
The new appointment would have the subject and location fields populated from the contact Name, default number and default Address.
I have seen this functionality in Agenda One and partially in the MS Powertoy cntctool.exe(copies the contact name and address to the appointment notes if no email address exists).
Ideally I do not want to install a completely new Calendar app like AgendaOne for this 1 piece of functionality so does anyone know of an alternative for an add-on to achieve this??
The code(I guess) would be along the lines of...
Appointment newappoinment = new Appointment();
newappoinment.Subject
="Meet with"contactPicker.SelectedContactName,
"("contactPicker.SelectedContactNumber")";
newappoinment.Location = contactPicker.SelectedContactAddress;
newappo inment.Start = DateTime.Now;
newappoinment.Duration = new TimeSpan(01, 00, 00);
newappoinment.ReminderVibrate = true;
newappoinment.ReminderSound = true;
newappoinment.ReminderRepeat = true;
newappoinment.ReminderSet = true;
using (OutlookSession session = new OutlookSession())
{
session.Appointments.Items.Add(newappoinment);
session.Dispose();
}
MessageBox.Show("Meeting Added");
Many thanks for anyone who can help,
Mick
Related
First some handy linx;
[TUTORIAL] How to create your own folder icons; http://forum.xda-developers.com/showthread.php?t=511876
EXPLORER ADDiN TO SHOW LARGE FiNGER FRiENDLY iCONS;
ExtendedFileExplorerExt - http://forum.xda-developers.com/showthread.php?t=677854
Use icons of *.EXE / *.GIF / *.PNG via the awesome IconHelper
[APP] Control Panel Settings to Links (.lnk)
Here one'll find more information and shortcuts packed in a zip; http://forum.xda-developers.com/showthread.php?t=259529
And here, where oruam57 shares his Shortcut Creator; http://forum.xda-developers.com/showthread.php?t=275577
Information and some on/off Radio executables ; http://forum.xda-developers.com/showthread.php?p=3568978
HD2 special http://forum.xda-developers.com/showthread.php?t=645916
vxShortcut; http://www.cam.com/vxshortcut.html
Pro: optional Command Line
Con: Default location can only handle x icons, thus Program Files\ needs to be added before adding massive shortcuts
SK Shortcut manager; http://s-k-tools.com/index.html?sksmgr/m_sksmgr.html
LnkMgr; http://forum.xda-developers.com/showthread.php?t=646211
Here some very nice Launch Icons (*.ico).
View Program Files; folderview.exe Unzip and put this file in you programs folder and you will be able to add it to htc home
View Settings; htcSettings.exe Unzip and put the file in you programs folder and you will be able to add it to htc home
WM6.5+ Settings Menu back via;
[APP] MySettings - easy access to ctrpnl items (old settings panel)
Don't use the inbuilt file explorer to rename files. Use the freeware data manager total commander instead. The inbuilt file explorer can't edit links or show file extensions - if you try to rename something to xxx.LNK, it will really be xxx.lnk.txt (or something).
For those of you who want to build the ICL (Icon Library) files themselves, this should work, it's freeware: http://eng.softq.org/icl_builder
! At the end of this thread I've bundeled and attached 58ICL files I found/created on my PC
Feature settings are the little programs that you use to change the settings for your Pocket PC, such as your password, sounds & reminders, memory, the PC Connection and other things.
Shortcuts to Feature Settings are very short plain text files with some text in them. First I'll explain the format of these text files then give an example.
nn#ctlpnl cplmain.cpl,i,0<CR>
nn#
Replace the nn variable with the number representing the total size, in characters _including spaces_ in the line of text following the # (pound) sign.
ctlpnl cplmain.cpl,
This is the program to be executed. For feature settings, this will always be the same. Don't forget the comma; it is necessary to separate the command from its parameters.
i
Replace the i variable with the index number of the feature setting you wish to run (See *).
,0
This is the variable for the optional tab number to select. Numbering for tabs starts from the left at zero (0). The tab here is only necessary if you are specifying a tab number; otherwise it doesn't need to be specified. So you may omit this part of the text line entirely if it's not needed.
<CR>
This represents a carriage return. Instead of a true carriage return, today we depress the Enter key. (In other words, don't include the literal in your file.)
* index numbers;
0 Contrast
1 Password
2 Owner Information
3 Power
4 Memory
5 About
6 Backlight
7 Align Screen
8 Input Method
9 Sounds & Reminders
10 Remove Programs
11 Menus
12 Buttons
13 Today Settings
14 PC Connections
15 Modem Connections
16 Clock
17 Network Connections
18 Regional Settings
Some feature settings on some devices go via mycpl.cpl
ctlpnl.exe mycpl.cpl,2 - backlight
ctlpnl.exe mycpl.cpl,4 - microphone agc
ctlpnl.exe mycpl.cpl,5 - battery status [ same as cplmain.cpl,3 ]
ctlpnl.exe mycpl.cpl,7 - permanent save [ contacts, etc ]
ctlpnl.exe mycpl.cpl,8 - device information
ctlpnl.exe mycpl.cpl,9 - add ringtone
ctlpnl.exe mycpl.cpl,10- autoconfig
ctlpnl.exe mycpl.cpl,11- gprs suspend mode
ctlpnl.exe mycpl.cpl,12- gprs authentication
ctlpnl.exe mycpl.cpl,13- csd line type
Use an ASCII text editor to create *.lnk files. I used MobilePad, though now I'm using PHM PowerToys which includes notepad.exe (capable of reading/editing Unicode).
Example
Menu Settings;
52#ctlpnl.exe cplmain.cpl,11?\Windows\cplmain.cpl,-5150
or
45#ctlpnl.exe cplmain.cpl,11?shellres.dll,-13895
?
Everything after the ? is used to identify the target icon offset in ANOTHER dll/exe/cpl. Change the 0 to specify an offset.
* View *.dll files with icon_viewer.exe (attached below) unzip, COPY to Device (PocketPC) and run.
S-K-Tools delivers their old icon set in a dll.
Download here; http://s-k-tools.com/sktools/sktools_icons.zip
PHM.Pocket.PC.IconsLib.zip also contains an IconLib.dll
State of the Art embedded (exe/dll) iCON viewer; dotFred's Task Switcher _ though it's iconize function is only for its internal view..
goto its settings, tap and hold to goto the Context Menu, select 'Add app to iconize', select an executable and then..
Select library to retrieve icons = FULL WiNDOW ViEW WiTH iCON OFFSET iD's
[Feature Settings]
ActiveSync
0#async.asy
Standard Calculator
0#:MSCALC
0#:MSCLOCK
0#MSTASKMGR
0#:MSWelcomeCenter
This is what one gets after executing WiPE_DEViCE where one can set a password before using the device
0#:MSWELCOME
0#:WMPLAYER
0#:MSSOLITAIRE
0#EFBROUWSER
0#:MSPIE
0#:MSVOICE
0#:MSVOICEMAIL?vmail.exe
Tasks
18#:MSTASKS?outres.dll,-10001
MyPictures
20#:MSPIMG?pimgres.dll,-101
21#:MSFEXPLORE
20#:MSWRLSMGR
21#:MSNOTETAKE
19#:MSINBOX
18#:MSTASKS?outres.dll,-100001
21#:MSONENOTEMOBILE
21#:MSPOUTLOOK
42#:MSSYNCAPP
The Calendar must be already running in the background for these to worK;
Calendar agenda view
34#:MSCALENDAR -va?outres.dll,-100002
Calendar day view
34#:MSCALENDAR -vd?outres.dll,-100002
Calendar month view
34#:MSCALENDAR -vm?outres.dll,-100002
Calendar week view
34#:MSCALENDAR -vw?outres.dll,-100002
Calendar year view
34#:MSCALENDAR -vy?outres.dll,-100002
41#:MSINTERNET_SHARING?:intshruiapp
Contacts
21#:MSCONTACTS?outres,-10000
PowerPoint
21#:MSPPT
Word
21#:MSPWORD
XL
21#:MSPXL
Search -=[ MOVE THE LiNK TO \Windows\Programs\Start Menu\ YOU WiLL HAVE MORE SEARCH HiTS!! ]=-
0#:MSFIND?ceshell.dll,-8213
Help -=[ MOVE THE LiNK TO \Windows\Programs\Start Menu\ PROGRAMs THEiR iNBUiLD HELP WiLL WORK now ]=-
0eghelp.exe?ceshell.dll,-8212
MMS
35#"\Windows\tmail.exe" -service "MMS"
EMAiL
42#"\Windows\tmail.exe" -service "ActiveSync"
SMS
35#"\Windows\tmail.exe" -service "SMS"
SMS open inbox
49#"\Windows\tmail.exe" -service "SMS" -open "inbox"
Straight away compose
42#"\Windows\tmail.exe" -service "SMS" -to ""
New Note
23#"\Windows\notes.exe" -n
New Task
34#"\Windows\poutlook.exe" tasks -new
New Contact
37#"\Windows\poutlook.exe" contacts -new
New Appointment
37#"\Windows\poutlook.exe" calendar -new
Available parameters for tmail.exe (depending on the service used) are;
"tmail.exe" -new ""
"tmail.exe" -service "" (e.g. "MMS" or "ActiveSync" or "SMS")
"tmail.exe" -to ""
"tmail.exe" -subject ""
"tmail.exe" -Body ""
"tmail.exe" -attach ""
"tmail.exe" -open "inbox"
"tmail.exe" -sync or combinations of all such as-
ex.
"Windows\tmail.exe" -service "Yahoo!" -to ""
"Windows\tmail.exe" -service "GMail" -to ""
Direct SMS (I called it SMS2.lnk);
51#"\Windows\tmail.exe" -service "SMS" -to "" -body ""
Direct link to Games directory;
60#"\Windows\fexplore.exe" Windows\Start Menu\Programs\Games
WiKi Links for settings:
http://wiki.xda-developers.com/index.php?pagename=LinksAndParameters
Widgets Connection Settings;
25#"\Windows\wmsettings.cpl"
[Applications]
Execute but do not show application;
xx#"\Windows\yourapp.exe" HIDE_WINDOW
24#"\Windows\Camera.exe -x"
Where x=
-p = photo
-v = video
27#"\Windows\CleanGPSData.exe"
29#"\Windows\DataDisconnect.exe"
21#"\Windows\EndKey.exe"
25#"\Windows\eT9MyWords.exe"
Test any WiFi/GPRS/3G connection (standard no link for this on my T-Mobile fone);
24#"\Windows\FieldTest.exe"
28#"\Windows\MicrophoneAGC.exe"
27#"\Windows\SetVolume.exe -x"
Where x =
-v sets the phone to vibrate
-m is mute
-o is sound on
22#"\Windows\SIM_MGR.exe"
22#"\Windows\Taskmgr.exe"
---- Use this TaskManager instead; http://www.dotfret.net/TaskMgr.htm , it'll show you;
Process manager, CPU usage, Application Manager, Service Manager, Device Manager (only WM2005 and above)
Windows Manager, Notification Manager, IP Config utility, Ping utility, Net Stats utility, Registry Editor (export/import), RUN program utility
22#"\Windows\USBtoPC.exe"
26#"\Windows\WiFiNetwork.exe"
27#"\Windows\WiFiSettings.exe"
27#"\Windows\WLANSettings.exe"
26#"\Windows\XT9Settings.exe"
Create a direct link for a (any) certain telephone nr;
39#"\Windows\cprog.exe"-url tel:0123456789?tapres.dll,-22555
where 0123456789 = any telephone number.
Make sure you press the ENTER key after your phone nr. and before saving the file!
HTCAlbum can be started with pictures or videos only:
48#"\Windows\HTCAlbum.exe" -mode:camera -type:image
47#"\Windows\HTCAlbum.exe" -mode:camera -type:video
Hope this helps. I'll add more in due time...
Philippe Majerus developed some nice applications. Unfortunately his page [ www.phm.lu ] is down, though here on depositfiles you'll find a small *.zip with most of his *.cab files plus his former www pages. Remember most of his tools are from 2004. IMHO you will find Reset.exe and Suspend.exe from PHMPPCPowerToys.Rpr_ARM.CAB suberb!
Senax
{
"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"
}
58 Icon Libraries (*.icl) in two packs;
What if I just wanted to create a shortcut to all my settings? The settings window...
chronster said:
What if I just wanted to create a shortcut to all my settings? The settings window...
Click to expand...
Click to collapse
Settings.lnk
Download htcSettings.zip and unzip it (it's file attributes are set to 'secret' so if you don't see it after unzipping; enable explorer to show all files cq use Total Commander). Then put the file htcsettings.exe in you programs folder and you will be able to add it to htc home.
Official htcSettings.zip thread;
http://forum.xda-developers.com/showthread.php?p=3568978 See post #417 !!
Unfortunately this utility only works for english based WinMo.
Mine is Dutch and I have Instellingen instead of Settings.
Ah well, I'll cook my own ROM soon,
Senax
Hi. Sorry maybe I can't understand but how can I create a shortcuts only for 3 tab in settings menu ? I want to create shortcuts for Settings>Personal, Settings>System and Settings>Connections only in Start menu. Thanks for any help.
I was wondering if anyone has created or know of an app that does text replacement similar to the blackberry text replacement program.
Ie: when your typing a text and you press "u" and then press space, it will replace it with "You".
This would have smartcase enabled, and will allow people to enter in thier own custom words and macros.
Ie:
goog = google.com
u = you
ur = your
bb = blackberry
droid = motorola droid
fb = facebook
tw = twitter
gc = google chat
*date* = inserts current date
*#* = inserts phone #
The list could keep going on and on.
+1 that would be lots of help
ultra keyboard does this
just checked "ultra keyboard" it does not support both physical keyboard/touch screen keyboard.
It also does not have a user defiend entries, that if I press the space bar twice, it wont auto change the word im looking for. .such as:
I type:
I sent you a msg on fb.
It would correct it to say:
I sent you a message on facebook.
First of all I would like to say hello to everyone as this is my first post to this forum
I have android phone (HTC Desire Z) for about a week now an I just have to share how insanely awesome this device is! To show you what I mean I'll describe how to fix the problem with incorrect transfer of calendar notes from my old Nokia N95 8GB to new HTC.
I rooted my HTC and uploaded newest Sense ROM (2.1) with Android 2.3.3 from the forum (thanks for making that possible!).
Now, to the problem. I wanted to transfer calendar notes from N95 to my new phone (more than 200 of them). Using the transfer application, the notes got copied but all had lost their alarms! This was disaster for me as I'm depending on these notes on daily basis. I googled for this problem but didn't find any solution. But this is the Android - everything can be done, right?
So, the solution. I've read somewhere that Android stores data of all it's applications as sqlite databases. As I professionally work with sql databases this seemed to be to good to be true... But no, it is true
To the point then. It is possible to fix my calendar by executing sql queries directly against the database itself!
I've found and pulled the calendar database file from the device by
Code:
adb pull /data/data/com.android.providers.calendar/databases/calendar.db
and got inside
Code:
sqlite3 calendar.db
Let's see what tables we have
Code:
.tables
Code:
Attendees EventsRawTimes android_metadata
CalendarAlerts ExtendedProperties easSyncInfo
CalendarCache Instances easTracking
CalendarMetaData Reminders pcscSyncInfo
Calendars _sync_state pcscTracking
Events _sync_state_metadata view_events
Interesting tables are Events and Reminders. Let's extract their ddls
Code:
.schema Events
.schema Reminders
Code:
CREATE TABLE Events (_id INTEGER PRIMARY KEY AUTOINCREMENT,_sync_account TEXT,_sync_account_type TEXT,_sync_id TEXT,_sync_version TEXT,
_sync_time TEXT,_sync_local_id INTEGER,_sync_dirty INTEGER,_sync_mark INTEGER,
calendar_id INTEGER NOT NULL,htmlUri TEXT,title TEXT,eventLocation TEXT,description TEXT,
eventStatus INTEGER,selfAttendeeStatus INTEGER NOT NULL DEFAULT 0,commentsUri TEXT,
dtstart INTEGER,dtend INTEGER,eventTimezone TEXT,duration TEXT,allDay INTEGER NOT NULL DEFAULT 0,
visibility INTEGER NOT NULL DEFAULT 0,transparency INTEGER NOT NULL DEFAULT 0,
hasAlarm INTEGER NOT NULL DEFAULT 0,hasExtendedProperties INTEGER NOT NULL DEFAULT 0,
rrule TEXT,rdate TEXT,exrule TEXT,exdate TEXT,originalEvent TEXT,originalInstanceTime INTEGER,
originalAllDay INTEGER,lastDate INTEGER,hasAttendeeData INTEGER NOT NULL DEFAULT 0,
guestsCanModify INTEGER NOT NULL DEFAULT 0,guestsCanInviteOthers INTEGER NOT NULL DEFAULT 1,
guestsCanSeeGuests INTEGER NOT NULL DEFAULT 1,organizer STRING,deleted INTEGER NOT NULL DEFAULT 0,
dtstart2 INTEGER,dtend2 INTEGER,eventTimezone2 TEXT,syncAdapterData TEXT, importance INTEGER NOT NULL DEFAULT 1,
iCalGUID TEXT,last_update_time TEXT,parentID INTEGER,facebook_source_id TEXT,facebook_type TEXT,
facebook_avatar_large TEXT,facebook_avatar_small TEXT,facebook_avatar_local TEXT,
MeetingStatus INTEGER NOT NULL DEFAULT 0);
Code:
CREATE TABLE Reminders (_id INTEGER PRIMARY KEY,event_id INTEGER,minutes INTEGER,method INTEGER NOT NULL DEFAULT 0);
and let's take a look at the data inside
Code:
SELECT * FROM Events WHERE _id=208;
SELECT * FROM Reminders WHERE event_id=208;
for example
Code:
208|PC Sync|com.htc.pcsc|||||1||1||Test1||||1||1304445600000|1304449200000|Europe/Brussels|P3600S|0|0|0|1|1|||||||||1|0|1|1|Outlook|0|||||1|8effd54b-5cd3-451c-8602-2d969f1a84c4|2011-05-03 17:20:36|||||||0
and
Code:
203|208||0
Interesting columns are Events.hasAlarm, Reminders.minutes and Reminders.method.
So recall that I have over 200 calendar entries that had lost their alarms during transfer. How to fix this? Simply
Code:
UPDATE Events SET hasAlarm=1;
UPDATE Reminders SET method=1;
UPDATE Reminders SET minutes=10;
Now put the modified database back to the phone
Code:
adb push calendar.db /data/data/com.android.providers.calendar/databases/calendar.db
and reboot.
And that's it. All alarms are now set properly and work! To attain Nokia-like calendar alerts I'm using application 'Calendar Snooze' and it works like a charm!
Thanks for reading and sorry for being overjoyed but sheer possibility to fix the data in the cellphone by directly accessing it's sql database is so amazing
Maybe for you guys it's not so amazing after all but for someone who just switched from Nokia and found out something like that for the first time it's incredible.
I hope that this post will possibly help someone with similar problem one day
Kind regards,
dominik6
PS.
The possibilities are endless. You can add indices to tables (to maybe speed up some weird searches); add triggers (for example it's easy to do a inside-database backup by using an after insert trigger to duplicate data to another table), one can bulk update/insert/delete entries in calendar, and so on...
PPS.
SMS and contacts are also stored in sqlite databases...
Ok, I don't get it.
Porting CM7 and I have an odd one - the stock email application blows up when an account is added. Tracing it down I found the problem - the Sqlite schema is defective. Here's what I have in /data/data under the appropriate directory, examined by Sqlite3
sqlite> .schema account
CREATE TABLE Account (_id integer primary key autoincrement, displayName text, emailAddress text, syncKey text, syncLookback integer, syncInterval text, hostAuthKeyRecv integer, hostAuthKeySend integer, flags integer, isDefault integer, compatibilityUuid text, senderName text, ringtoneUri text, protocolVersion text, newMessageCount integer, securityFlags integer, securitySyncKey text, signature text, accountColorinteger);
Note the last field. There's supposed to be a space there; when the table was created the type statement was obviously keyed next to the field name without the required space. It also appears that SQLite is perfectly happy to create a field in a table without an explicit type declaration, which disturbs me, but it is what it is.
Here's the thing - obviously somewhere there's a declaration of that variable and type in some file somewhere. Right?
Well, where is it then - because I can't find it with a complete pass through the source using find / grep!
Nevermind - found it. The android guys were cute with the defines in the code and it indeed was a missing space in the email provider source.....
No idea where to put this, admin; feel free to move or delete.
There's a lot of really cool custom theming going on with Android and an often important part of that is the visual indication of missed phone calls, new messages, new mail, etc. (unread bubbles next to app icons, in lockscreens, etc.). There's a host of solutions to get this info but for me e-mail counts had always been a bit of a issue. Missed phone calls are tracked by the Android system, and WhatsApp notifications can be counted from the notification bar with Tasker and reset when you open the app because your phone is the only place where you will check your WhatsApp messages. E-mail however is not centralized in Android (yet) so if you use anything else than Gmail the system won't know how many unread mails you have and you could uee a notification counter on your mail app but when a new email arrives it will put the counter on +1, if you then read the e-mail on another device (for example your computer) your notification counter on your phone will still be on +1 even though you read the mail.You then have to open your mail app to get the counter back to 0 again.
That why I made this PHP / Tasker solution for my IMAP mail. This is a PHP script that checks how many unread mails there are in your inbox:
PHP:
<?php
function mailCount($host, $login, $passwd) {
$mbox = imap_open($host, $login, $passwd);
$mail = '';
if($mail = imap_check($mbox)) {
$msgnos = imap_search($mbox, 'UNSEEN');
return $msgnos;
}
}
$hostname = '{imap.yourhost.com:143/imap}INBOX';
$username = 'your_username';
$password = 'your_password';
$count = mailCount($hostname, $username, $password);
if ($count != "") $number = sizeof($count);
else $number = 0;
echo $number;
Change yourhost, your_username and your_password and the port (143). (if you want to, add some extra security by doing IP or Cookie checks), put the PHP file online on your server. The script will then simply show a number of unread mails in your inbox.
Then you can use Tasker to read this number. Add a tasks (for example CheckMailCount) then add the action Net > HTTP Get. For 'Serverort' fill in the url of your script (http://www.yourserver.com/unreadmail.php) and set the Mime Type to 'text/*'. Then in the same task add an action Variables > Variable Set. Give the variable a Name (for example: %MAILCOUNT) and set it To %HTTPD. This will set the %MAILCOUNT variable to the result of the last http Get request ie. the number of unread mails.
You now have a tasker variable with the actual number of unread mails in your inbox.
I use this on my WidgetLocker lockscreen so I trigger the task on Event > Display > On. I added a third action in the CheckMailCount action to set a Zooper Variable (Plugin > Zooper Widget Pro >Edit > ZW Variable = MAILNOTI, ZW Text = %MAILCOUNT) you could also make this %HTTPD straight away if you don't use the variable for anything else. You then have the #TMAILNOTI# variable in Zooper to use to display how many unread mails you have in a widget. I don't use the count but I display a mail icon indicating that I have a new mail if the #TMAILNOTI# is anything but 0. I do this by adding a bitmap in Zooper of a mail icon and then in Avanced Parameters I put
$#TMAILNOTI#=0?/sdcard/icons/nomail.png$
This tells Zooper that if the variable #TMAILNOTI# = 0 it should use the bitmap nomail.png in my icons folder on the sd card. nomail.png in my case is simply an empty transparent png.
Hope this helps somebody!
nielshtc said:
No idea where to put this, admin; feel free to move or delete.
There's a lot of really cool custom theming going on with Android and an often important part of that is the visual indication of missed phone calls, new messages, new mail, etc. (unread bubbles next to app icons, in lockscreens, etc.). There's a host of solutions to get this info but for me e-mail counts had always been a bit of a issue. Missed phone calls are tracked by the Android system, and WhatsApp notifications can be counted from the notification bar with Tasker and reset when you open the app because your phone is the only place where you will check your WhatsApp messages. E-mail however is not centralized in Android (yet) so if you use anything else than Gmail the system won't know how many unread mails you have and you could uee a notification counter on your mail app but when a new email arrives it will put the counter on +1, if you then read the e-mail on another device (for example your computer) your notification counter on your phone will still be on +1 even though you read the mail.You then have to open your mail app to get the counter back to 0 again.
That why I made this PHP / Tasker solution for my IMAP mail. This is a PHP script that checks how many unread mails there are in your inbox:
PHP:
<?php
function mailCount($host, $login, $passwd) {
$mbox = imap_open($host, $login, $passwd);
$mail = '';
if($mail = imap_check($mbox)) {
$msgnos = imap_search($mbox, 'UNSEEN');
return $msgnos;
}
}
$hostname = '{imap.yourhost.com:143/imap}INBOX';
$username = 'your_username';
$password = 'your_password';
$count = mailCount($hostname, $username, $password);
if ($count != "") $number = sizeof($count);
else $number = 0;
echo $number;
Change yourhost, your_username and your_password and the port (143). (if you want to, add some extra security by doing IP or Cookie checks), put the PHP file online on your server. The script will then simply show a number of unread mails in your inbox.
Then you can use Tasker to read this number. Add a tasks (for example CheckMailCount) then add the action Net > HTTP Get. For 'Serverort' fill in the url of your script (http://www.yourserver.com/unreadmail.php) and set the Mime Type to 'text/*'. Then in the same task add an action Variables > Variable Set. Give the variable a Name (for example: %MAILCOUNT) and set it To %HTTPD. This will set the %MAILCOUNT variable to the result of the last http Get request ie. the number of unread mails.
You now have a tasker variable with the actual number of unread mails in your inbox.
I use this on my WidgetLocker lockscreen so I trigger the task on Event > Display > On. I added a third action in the CheckMailCount action to set a Zooper Variable (Plugin > Zooper Widget Pro >Edit > ZW Variable = MAILNOTI, ZW Text = %MAILCOUNT) you could also make this %HTTPD straight away if you don't use the variable for anything else. You then have the #TMAILNOTI# variable in Zooper to use to display how many unread mails you have in a widget. I don't use the count but I display a mail icon indicating that I have a new mail if the #TMAILNOTI# is anything but 0. I do this by adding a bitmap in Zooper of a mail icon and then in Avanced Parameters I put
$#TMAILNOTI#=0?/sdcard/icons/nomail.png$
This tells Zooper that if the variable #TMAILNOTI# = 0 it should use the bitmap nomail.png in my icons folder on the sd card. nomail.png in my case is simply an empty transparent png.
Hope this helps somebody!
Click to expand...
Click to collapse
This looks way to confusing but I get it a little bit... lets say I want to use UCCW tasker variable option to show the counts...:silly: