omnia app with samsung sdk
TRANSCRIPT
![Page 1: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/1.jpg)
OMNIA Application Development
with Samsung mobile SDK v2.2.0
Samsung mobile Innovator Stars
Sheon Shin
email: [email protected]
blog: http://sheon.tistory.com
twitter: http://twitter.com/hyongasheon
![Page 2: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/2.jpg)
• Windows XP SP2 / Windows Vista
• Active Sync 4.5( XP ), WM Device Center(Vista)• http://www.microsoft.com/windowsmobile/en-us/downloads/microsoft/activesync-
download.mspx
• http://www.microsoft.com/windowsmobile/en-us/downloads/microsoft/device-center-
download.mspx
• Visual Studio 2005 standard/2008 professionalhttp://www.microsoft.com/downloads/details.aspx?FamilyID=83c3a1ec-
ed72-4a79-8961-25635db0192b&DisplayLang=ko
Environment - #1
![Page 3: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/3.jpg)
• Windows Mobile 6 SDK Refresh http://www.microsoft.com/downloads/details.aspx?FamilyID=06111a3a-
a651-4745-88ef-3d48091a390b&DisplayLang=en
• Samsung Device(Omnia, Omnia2)
• Basics of .NET Compact Framework(c#)
Environment -2
![Page 4: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/4.jpg)
• Samsung Windows Mobile SDK #1
• Samsung Windows Mobile SDK #2
• .NET Wrapper Class
• Samsung APIs
– (Accelerometer API)
– (Orientation API)
• Runtime Library
• Resource
• Summary
Agenda
![Page 5: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/5.jpg)
• Samsung Mobile Innovator(SMI)– Mobile Communications Lab, Samsung Electronics
– Web Site: http://innovator.samsungmobile.com
• SDK for Windows mobile 1.2.1(WM 6.1)– http://innovator.samsungmobile.com/down/cnts/toolSDK.detail.view.do?platformId=2&cntsId=4980
• SDK for Windows mobile 2.2.0(WM 6.5)– http://innovator.samsungmobile.com/down/cnts/toolSDK.detail.view.do?platformId=2&cntsId=5365
Samsung Windows Mobile SDK -2
![Page 6: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/6.jpg)
• Support Devices and API
Samsung Windows Mobile SDK -2
M490/495
I900
OMNIA
…
I8000
M710/715
M8400
…
• APIs
(Accelerometer)
(Haptic Feedback)
(Orientation)
(LightSensor)
Dual Camera / Flash
Optical mouse(M490/495)
LED Sensor
• Additional API
(SDK 2.x, WM 6.5)
Compass (3DOrientation)
(proximity)
![Page 7: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/7.jpg)
• Install
– Setup file : Samsung Windows Mobile SDK 1.2.1 Installer.msi
– Setup folder: C:\Program Files\Samsung Windows Mobile SDK\
– files :• /doc : APIs Documents and guide
• /inc : APIs Headers
• /lib : Static Library files(SamsungMobileSDK_1.lib)
• /redist : Samsung SDK runtime librarys(DLL cab file)
• /Samples : 샘플 코드
– .NET CF( C# )• /redist/smi_wm_pro_sdk_redist_1_2_1.cab
• .NET Wrapper class
Install Samsung SDK
![Page 8: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/8.jpg)
• .NET Wrapper(Platform Invoke)?– Class for using C API Managed code(.NET)
– Using the DLLImport Attributehttp://msdn.microsoft.com/en-us/library/aa984739(VS.71).aspx
public const string DLLName= "SamsungMobileSDK_1.dll";
[DllImport(DLLName, EntryPoint = "SmiGetSdkVersion")]
private static extern IntPtr SmiGetSdkVersion(ref SdkVersion version);
IntPtr v = SmiGetSdkVersion(ref version);
• Wrapper Class– Accelerometer, Orientation, Haptic
.NET Wrapper Class
![Page 9: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/9.jpg)
• Accelerometer(=GSeneor=MotionSensor)
– Return 3-axis Vector value
• X: FLOAT -2 ~ 2
• Y: FLOAT -2 ~ 2
• Z: FLOAT -2 ~ 2
• Get a value: JUST 1 row!
(Accelerometer API)
//Declare vectorAccelerometer.Vector _gVector = new Accelerometer.Vector();
// Get Accelerometer result.if (Accelerometer.GetVector(ref _gVector) != SmiResultCode.Success) return;
![Page 10: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/10.jpg)
• Get continious value?
(Accelerometer API)
// Get a deviceAccelerometer.Capabilities cap = new Accelerometer.Capabilities();
Accelerometer.GetCapabilities(ref cap);
//add handler with 2000msAccelerometer.RegisterHandler(2000, GetAccHandler);
//release handlerAccelerometer.UnregisterHandler();
//callbackvoid GetAccHandler(Accelerometer.Vector g_Vector) {
....}
![Page 11: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/11.jpg)
• Orientation:
• SmiOrientation– SMI_ORIENTATION_FACE_UP
– SMI_ORIENTATION_FACE_DOWN
• (in 10’ degrees)
– SMI_ORIENTATION_LANDSCAPE
– SMI_ORIENTATION_REVERSE_LANDSCAPE
– SMI_ORIENTATION_PORTRAIT
– SMI_ORIENTATION_REVERSE_PORTRAIT
• In 30~150’ degrees
• Not applied with Face up/Down event
– SMI_ORIENTATION_REVERSE_PORTRAIT
(Orientation API)
![Page 12: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/12.jpg)
• Get orientation value: JUST 1 row!
• Monitoring appinted orientation?
• Monitoring all orientation
(Orientation API)
// return Orientation statusif (AccOrientation.GetState(ref state) != SmiResultCode.Success) return;
// add ‘Do Action’ Handler for FACE_UP eventAccOrientation.RegisterHandler(SMI_ORIENTATION_FACE_UP, DoActionOrientation);
// Add handlerAccOrientation.RegisterOnChangeHandler(DoActionOrientation);
![Page 13: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/13.jpg)
• App. + redist CAB file– Runtime library
– /SDK/redist/smi_wm_pro_sdk_redist_1_2_1.cab
• How can I distribute with multi cab files?– ‘Multicabinstall’ sample project in WM6 SDK
– /WM6SDK/Samples/Common/CPP/Win32/multicabinstall
Distribute Runtime Library
![Page 14: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/14.jpg)
• Getting Started with Building Windows Mobile Solutions with Visual
Studio and Windows Mobile 6 SDK http://msdn.microsoft.com/en-us/library/dd721907.aspx
• Windows mobile developer centerhttp://msdn.microsoft.com/ko-kr/windowsmobile/default(en-us).aspx
• InnoLab : Samsung mobile SDK Samples http://innovator.samsungmobile.com/bbs/innovlab/list.do?platformId=2&categoryId=302
• Lab.dev : remote test for samsung deviceshttp://innovator.samsungmobile.com/bbs/lab/view.do?platformId=2
• Resourceshttp://sheon.tistory.com or samsung mobile innovator stars board.
Resource
![Page 15: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/15.jpg)
Getting Started with Building Windows Mobile Solutions
with Visual Studio and Windows Mobile 6 SDK http://msdn.microsoft.com/en-us/library/dd721907.aspx
Windows mobile developer centerhttp://msdn.microsoft.com/ko-kr/windowsmobile/default(en-us).aspx
InnoLab : Samsung mobile SDK samples
http://innovator.samsungmobile.com/bbs/innovlab/list.do?platformId=2&categoryId
=302
Additional lecture
![Page 16: Omnia App With Samsung Sdk](https://reader031.vdocuments.pub/reader031/viewer/2022020116/55a253231a28abd1758b47b3/html5/thumbnails/16.jpg)
Thank you!Be happy with Samsung mobile SDK!