Shape of My Heart

Subscribe to RSS feed

RIL in WM and Android

CHome (Titanium) Plugins for WM 6.5

Creating CHome (Titanium) Plugins Part I

Creating CHome (Titanium) Plugins Part II

Creating Customized Titanium Layout

CHome Registry (Titanium) and CPR file walk-through

Titanium: CHome is the plugin/program’s name. CHome is also one of the plugins as well. It’s the Notifications Plugin. This is the plugin that has Voicemail, Missed Calls, Email, SMS, and MMS all in one line. Titanium is the name of the way it displays things. There is also Bronze and Neo. In Titanium the glass panel always centers itself after you move it. In Bronze (Smart Phone version of CHome from Windows Mobile 6.1), as you move from panel to panel from top to bottom, the Active panel slides down the screen or vice versa. Neo is from the Smart Phone from T-Mobile called the Shadow and made by HTC. It’s similar to M2D where there is a list of Icons and a selector with the expanded panel taking up the rest of the screen. NeoTitanium is a revamped CPR layout of Titanium cloning the design of Neo hence why I named it NeoTitanium.

CHome Registry (Titanium): This should cover most of what you’ll need to know about the registry for CHome.

Directories (HKLM = HKEY_LOCAL_MACHINE): List of Directories CHome uses.
HKLM\Security\CHome\DefaultSettings
(NOTE: Any registry entries in this directory and its subdirectories will overwrite those in the Software Directory listed below when you disable and re-enable Titanium or Soft reset. It’s basically a safety backup.)
HKLM\Software\Microsoft\CHome
(NOTE: Also, all of its subdirectories.)

Values:
ACTIONURL= Location of exe/ink/etc for the plugin when you press on the panel or press the center D-Pad Button (Example: ”\Windows\fexplorer.exe” to make the plugin open File Explorer)
SK1URL= Same as ACTIONURL, but for the “Left Soft Key”.
SK1TEXT= The text displayed for the “Left Soft Key”.
SK2URL= Same as ACTIONURL, but for the “Right Soft Key”.
SK2TEXT= The text displayed for the “Right Soft Key”.
DefaultXML/ExtensibilityXML= Active plugins and their order. Also tells CHome which CPR’s to use (filename).
<Plugins Order="CClock;CMyFaves;CContacts;CPhone…" CPRFileName="Neo" DisplayStyle="Titanium" />
Filename is all text before the “ _resolution”.cpr (Resolution = 240x320 etc…).
(NOTE: ExtensibilityXML is the Priority and Default is a fall back in case something in ExtensibilityXML breaks CHome.)
Plugins= List of all available plugins. These are the same as the subdirectory names of CHome.
(NOTE: List of plugins in NeoTitanium that work; CAppointments, CClock, CContacts, CEmail, CHome, CHomeFavs, CInternet, CLinks, CMessage, CMusic, CMyApplication, CMyFavs, CMyPhotos, COffice, CPhone, CTesUIPlugin (Old Titanium Weather uses this), CText, CVoicemail, CWelcomeCenter, CWindowsLive, HTCMUSIC, Settings.)
Pages= Pages and order of pages within a plugin. If a plugin has plugins it’ll have subdirectories for each page.
GUID= Defines how the specific plugin works. What registry entries it “requires”. What layout template in the CPR it uses, etc.
(NOTE: The GUID “{F0A1B246-6E64-40cd-8E15-347D29FF6F18}” (without quotes) is for custom plugins. It requires a registry entry for the layout telling it which custom layout from the CPR to use. There are a few already in NeoTitanium. Use those as a template to make your own. You can add custom Registry values for text and images. If the registry is “CustomImage1”, it’ll look for <Image ID=”CustomImage1” Left…..” in the plugin’s layout of the CPR. It is best to not edit this value unless you are making a custom plugin of your own.)
ICONPATHS/Image/Pictures/Etc= Location of the image to be used. (Example: “\Windows\Neo_SelectionPanel_45x45.png”)
If you see number in this field, they are pointing to that resource in a .dll. Usually it’ll be the Bronzeres.dll.
CONDENSETITLE/TitleText/PluginLabel/Etc= Usually the title displayed for the plugin such as CLinks being known as Launcher or Extras.
DataSource= Specifically for the custom plugin GUID. This tells CHome where to find the registry values for each page.
(NOTE: CondensedPage is a required subdirectory. As these are custom plugins, CHome does not know what information is used in condensed and must be told.)

The CPR XML code: The code inside the CPR’s is XML. If you open the XML with an XML editor such as “Microsoft Visual Studio”, it’ll recognize the code and highlight errors in the same manner “Microsoft Word” does for spelling and grammar. It also color codes the code so it’s easier to read. The CPR’s can be opened and edited with any text editor though like “Notepad” or “WordPad”.

EDIT: XML Notepad 2007 by microsoft for editing the cpr files found by justpctech. Special thanks to him for finding this.

The code: The main parts of the cprs are the left/top (Position) and width/height (size) entries represented in pixels. They control how big something is and where it is positioned onscreen. The left/top values are from the images of the specific layer, not the whole screen. So, if the layer is 240 pixels wide by 100 pixels tall, the left/top value are for within that rectangle. To scale images use this code, ScaleStyle="***". Known working values are Fit and Stretch. Color refers to the color of the text and its offset. OffsetNone is the text itself. Vertical/HorizontalAlignment is the layout of the text within its width/height box. If your image or text gets clipped off, try adding Clip=”False” to the Layer(s) in is inside of. Expanded layers are the layout of the plugin when active and Condensed is inactive. The page arrows are the NPI and MPI layers. TitaniumListView refers to Titanium. If you change both entries to BronzeListView, it’ll act as Bronze does on the Smart Phone as described above.

That should cover the basics of editing the CPR. Just start playing with them and you’ll catch on quickly as did I. If you know html or xml you have a head start.

Available Windows Mobile 6.5 Titanium plugins

JMLPanex allows multiple hotspots on a plugin

Plug in Installer

Online Titanium CPR/PLG helper

Marketplace for WM6.5


Reg settins according to this post:

[HKEY_CURRENT_USER\Security\Software\Microsoft\Marketplace]
"DownloadLocation"="\\Windows\\WMMarketplace.cab"
"IsInstalled"=dword:00000001
"MarketInstallLocation"="\\Windows\\WMMarketplaceFullClient.exe"
"BootStrapInstalledPath"="\\Windows\\WMMarketplaceFullClient.exe"
"FedDocURLChkDate"=hex:***********
"DeviceToken"=***********"
"DeviceTokenTimeSkew"=hex:******
"DeviceTokenExpireTime"=hex:***********
"DeviceTokenCreatedTime"=hex:**********
"DevicePuid"="*************"
"LiveIdDeviceRegisterEndpoint"="https://login.live.com/ppsecure/DeviceAddCredential.srf"
"LiveIdAuthEndpoint"="https://login.live.com/liveidSTS.srf"
"DeviceGuid"="****************"
"EulaAccepted"=dword:00000001
"WebServiceUpdateServer"="https://client.marketplace.windowsmo...tstrap/02/2009"

[HKEY_LOCAL_MACHINE\SYSTEM\Versions]
"Aku"=".5.3.00"

We can launch marketplace from an app by execute "\Windows\WMMarketplace.exe", but no
parameters possible? See here

Controls over the EditText and the IME in Android

<EditText
android:id="@+id/edtInput"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
android:imeOptions="actionDone|flagNoEnterAction"
android:maxLines="4"
android:maxLength="2000"
android:hint="@string/compose_hint"/>

<activity name="EditContactActivity"
android:windowSoftInputMode="stateVisible|adjustResize">
...
</activity>

More details

敏捷之道

敏捷之道的最高境界:

  个体与交互 胜过 过程与工具

  可以工作的软件 胜过 面面俱到的文档

  客户协作 胜过 合同谈判

  响应变化 胜过 遵循计划

Mobile Widget Engine Overview

通过程序获取android系统手机的铃声和音量

It is simple!

AudioManager mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);

//通话音量

int max = mAudioManager.getStreamMaxVolume( AudioManager.STREAM_VOICE_CALL );

int current = mAudioManager.getStreamVolume( AudioManager.STREAM_VOICE_CALL );

Log.d(”VIOCE_CALL”, “max : ” + max + ” current : ” + current);

//系统音量

max = mAudioManager.getStreamMaxVolume( AudioManager.STREAM_SYSTEM );

current = mAudioManager.getStreamVolume( AudioManager.STREAM_SYSTEM );

Log.d(”SYSTEM”, “max : ” + max + ” current : ” + current);

//铃声音量

max = mAudioManager.getStreamMaxVolume( AudioManager.STREAM_RING );

current = mAudioManager.getStreamVolume( AudioManager.STREAM_RING );

Log.d(”RING”, “max : ” + max + ” current : ” + current);

//音乐音量

max = mAudioManager.getStreamMaxVolume( AudioManager.STREAM_MUSIC );

current = mAudioManager.getStreamVolume( AudioManager.STREAM_MUSIC );

Log.d(”MUSIC”, “max : ” + max + ” current : ” + current);

//提示声音音量

max = mAudioManager.getStreamMaxVolume( AudioManager.STREAM_ALARM );

current = mAudioManager.getStreamVolume( AudioManager.STREAM_ALARM );

Log.d(”ALARM”, “max : ” + max + ” current : ” + current);

设置音量的方法也很简单,AudioManager提供了方法:
public void setStreamVolume(int streamType, int index, int flags)

Windows Mobile TAPI and RIL

Study of eCALL

The DG eCall recommends that the following essential requirements for transmitting both voice and data through the mobile networks should be adopted:
1.Pan-European solution:
o Roaming capability
o Belonging to GSM Standards (ETSI, 3GPP) that must be available for long enough to support vehicle life cycle
o Commonly implemented by all European Telcos & within preferably all GSM modules
2.Real time transport mechanism
3.Quasi simultaneous voice call and data transfer
4.Secure transport and routing mechanism (E112)
5.Automatic Acknowledgement

The DG eCall recommends that the architecture for eCall, as illustrated in following figure, is adopted by all stakeholders when implementing eCall. The process is described below:
1) The eCall Generator initiate the eCall by sensors triggered and/or manually, send the in-vehicle
triggered eCall to a PSAP. The eCall consists of two elements: a pure voice (audio) telephone call
based on 112 and the minimum set of data (MSD)
2) The eCall (data + voice) carried through the mobile network, is recognized by the mobile network
operator (MNO) as a 112 emergency call, and is first handled by the MNO. Based on the 112
handling the MNO enrich the call with the CLI (caller line identification), and at the same time,
according to the USD and the E112 recommendation, add the best location available (based on the
best effort principle11). After the 112 handling, the telecom operator delivers the 112-voice together
with the CLI, mobile location and the eCall MSD to the appropriate PSAP.
3) The PSAP transmits an acknowledgement to the eCall Generator specifying that the MSD have been
properly received.

[转]wince中解析reg和bib文件的不同之处

February 2012
M T W T F S S
January 2012March 2012
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29