Download the free trial version
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Tutorials
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Tutorials Basic4ppc tutorials

Basic4PPC and Windows Mobile Emulator

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-08-2009, 10:21 PM
ghale's Avatar
Basic4ppc Veteran
 
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
Default Basic4PPC and Windows Mobile Emulator

During the development of your project, you can try directly from Basic4PPC IDE (hitting the F5 key or pressing the Run icon in toolbar) if your application is working good.
But at a certain stage, you need to try your code on a Device. To do this, you need a Device , then!

But... if you plan to develop your application for a VGA device and you have a QVGA one?
You can buy a new device or you can always compile your exe with "Device (Auto scale)" option, but sometimes it's better to try your creation on a VGA device.
Another example: if you need different type of Devices, with different screen resolution or different OS, and you can't efford them, what you have to do?

You must use an Emulator.

In this tutorial, I'll show you what to do.

To begin, simply open your Firefox (or Opera, or Safari, or Exploder), and in the address bar, go to Google (or to another search engine).

Then, search for "Windows Mobile 6.5 Developer Tool Kit" string.
One of the first results, will be this address located on Microsoft servers.




On that page, you'll find localized versions of Windows Mobile 6.5 Professional Developer Tool Kit and Windows Mobile 6.5 Standard Developer Tool Kit.




Yo can download a localized version of emulator.
Actually, these are the locale supported:

Quote:
0804 CHS Chinese Simplified
0409 USA English
0407 GER German
040c FRA French
0410 ITA Italian
0c0a ESN Spanish
0411 JPN Japanese
I'll download, for example, the Windows Mobile 6.5 Professional Developer Tool Kit, USA version (225 MB).
Please consider to use a download manager to download faster the files.

Once downloaded the file, simply double-click on it and click Next



and then Accept.

Note: If the install fails with "Setup Wizard ended prematurely" message, install the Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) and restart the Windows Mobile 6.5 Developer Tool Kit package install.

Click on Next, then on Next again, select the path where to install emulators (or leave the default one), click Next.



Click on Install and the installation will start.



After few minutes, the installation will finish, with this screen:



Click on Finish.

In your Programs, you'll find "Windows Mobile 6 SDK" group folder.
You can choose "Standalone Emulator Images" -> language of emulator (for me "US English") -> and then the emulator you want to run.
I'll choose "WM 6.5 Professional".

The first run is a bit slow, because the emulator ... emulates a first start of the device.



then, finally:



While the device emulator starts, you can prepare the folder that will be the Storage Device for the emulator.

Somewhere on your disk, for example on Desktop, create a folder named "WM_Shared", then in the Emulator window choose "File" -> "Configure".



In the first tab, "General", at the bottom click on the "..." button and browse to the folder you just created on Desktop.



Then click Ok.

Now, you can use the Emulator like a real device.

From Basic4PPC, simply compile the exe from your project (Alt+1) and choose as destination folder the "WM_Shared" created on the Desktop and click on Save.



On the Emulator, go to File Explorer and browse to "Storage Card".



Here you'll find your just compiled exe, as shown:



Click once on it and you'll execute your application:






Obviously you can create CAB files and test it on your new device!

You can connect and sync the emulator with ActiveSync (for Windows XP or earlier) or Windows Mobile Device Center (for Vista).
To accomplish this, simply run from your Programs -> "Windows Mobile 6 SDK" -> "Tools" -> "Device Emulator Manager"



If you are running the emulator and you cannot find any running session, click on Refresh.

Then, right-click on the active connection and choose "Cradle" or from "Actions" menu, choose "Cradle".



After few seconds, the ActiveSync or Windows Mobile Device Center, will connect with your emulator.



Note:
If ActiveSync don't see the emulator, please assure that you choose DMA setting from "ActiveSync" -> "Connection Settings"
If Windows Mobile Device Center don't see the emulator, please assure that you choose DMA setting from "Mobile Device Settings" -> "Connection Settings"

Note:
It's a good choise to check "Allow data connections on device when connected to PC" in ActiveSync or Windows Mobile Device Center.

Now, let's connect Windows Mobile Emulator and Cellular Emulator!

Thanks to:
derez, Erel

TutorialsEnjoy, ghale

Last edited by ghale : 08-11-2009 at 09:41 PM.
Reply With Quote
  #2 (permalink)  
Old 08-09-2009, 01:44 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 911
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Thank you ghale for this tutorial, although I use emulators for a while - I did learn something.

I want to add that you can connect the emulator to the desktop via Activesync just like a real device.
you do that by selecting: windows mobile SDK --> tools --> Device emulator manager. Do Refresh and when the device appears in the window - select : Action --> "Cradle" and wait for the connection.
__________________
David Erez
Ramat Hasharon, Israel

Last edited by derez : 08-09-2009 at 01:47 PM.
Reply With Quote
  #3 (permalink)  
Old 08-09-2009, 01:48 PM
ghale's Avatar
Basic4ppc Veteran
 
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
Default

Quote:
Originally Posted by derez View Post
Thank you ghale for this tutorial, although I use emulators for a while - I did learn something.

I want to add that you can connect the emulator to the desktop via Activesync just like a real device.
you do that by selecting: windows mobile SDK --> tools --> Device emulator manager. When the device appears in the window - select "Cradle" and wait for the connection.
Yes, derez, you anticipated me.
I was preparing the update for this thread.
I'll put online soon the actions to connect to Activesync (XP) or Syhcronization Center (Vista).

Thanks!
Reply With Quote
  #4 (permalink)  
Old 08-09-2009, 05:36 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 12,926
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Thank you for this great and useful tutorial!
__________________
Basic4android documentation
Reply With Quote
  #5 (permalink)  
Old 08-10-2009, 10:30 AM
Junior Member
 
Join Date: Jul 2009
Posts: 10
Default

Hi ghale,

thanks for the nice work...
Reply With Quote
  #6 (permalink)  
Old 08-10-2009, 10:42 AM
ghale's Avatar
Basic4ppc Veteran
 
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
Default



I'm preparing two other tutorials about emulators, I'll create two distinct thread for them, but I'll "link" all three thread togeter.
Reply With Quote
  #7 (permalink)  
Old 08-10-2009, 01:33 PM
ghale's Avatar
Basic4ppc Veteran
 
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
Default

I've just added more images and fixed something.
Reply With Quote
  #8 (permalink)  
Old 01-15-2010, 05:48 PM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 754
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi ghale and thanks for a very useful tutorial. I have been using the WM5.0 emulator successfully for a while now.

But I would like to try with different screen sizes though the emulator comes with only the basic displayWidth="240" displayHeight="320".

I don't think that you have mentioned getting other screen sizes; could you extend the tutorial to cover this?

Cheers, Mike.
Reply With Quote
  #9 (permalink)  
Old 01-15-2010, 08:07 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 12,926
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The device emulator manager should list several devices including a QVGA, Square and VGA devices.
__________________
Basic4android documentation
Reply With Quote
  #10 (permalink)  
Old 01-15-2010, 09:27 PM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 754
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by Erel View Post
The device emulator manager should list several devices including a QVGA, Square and VGA devices.
But it most definitely does not! In fact it seems the only things it can list at start-up are the saved images that I have made myself when running the emulator. The "Available Emulators" window just shows "Others" and really seems to list the emulator instances that are running, not the configurations that I might choose.

But as I said I am running the WM5.0 emulator and the Emulator Manager says it is version 8.0.50727.42.

If I have to download WM6.n to get a choice of devices (per ghale's actual instructions) then I might do that, but it's not trivial! I didn't want to try without someone saying that's why I get the limitation.

Mike.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Acceptance of Basic4PPC apps for the windows mobile store bluedude Questions (Windows Mobile) 2 08-03-2009 10:03 PM
Unterschied zwischen Windows CE und Windows Mobile Grolle German Forum 3 02-17-2009 01:10 PM
Registering the binaries for windows mobile 6 emulator Dinis Questions (Windows Mobile) 2 08-31-2008 12:16 AM
VBA for Windows mobile(?) Cableguy Chit Chat 3 08-29-2008 08:20 AM
Basic4PPC cannot install Windows Mobile vinicius Questions (Windows Mobile) 4 05-28-2008 07:14 PM


All times are GMT. The time now is 02:54 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0