Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming For Artists Term 2 MFA Computational Studio Arts Starting to program for mobile phones.

Similar presentations

Presentation on theme: "Programming For Artists Term 2 MFA Computational Studio Arts Starting to program for mobile phones."— Presentation transcript:

1 Programming For Artists Term 2 MFA Computational Studio Arts Starting to program for mobile phones

2 Where we are: Week 7: 23 rd group Tutorials/ intro to mobile programming /Nabil present Week 8: 2nd March Interim presentations/what is a methodology? Week 9: 9 th group tutorials /parameters,documentation/research contextual references to discuss Week 10:16 th group tutorials / discuss equipment needs/work on projects Week 11 23rd Final presentation: Hand in work (and written work) Put all on web Have you all put your project brief on the web?

3 No mouse input as such So much more reliance on keys

4 Very similar to Processing, some code differences Different ( and fewer libraries ) Can you think of any significant differences between a phone and a computer/laptop ? Crash introduction to mobile Processing

5 Similar reference pages

6 1.Download and install a Wireless Toolkit (WTK) for building mobile phone applications. Windows: Sun Java Wireless Toolkit for CLDC Mac OS X: Mpowerplayer SDK 2. Note the location of the installation on your computer How to install Mobile Processing:

7 3. Install Mobile Processing

8 4.Run Mobile Processing. Choose Preferences from the main drop-down menu. In the Preferences dialog box, go to the Mobile tab, and enter the location of the WTK.

9 These are my settings in the preferences

10 Phone profiles Find out about phones, which ones will work etc, go here:

11 The IDE should feel very familiar

12 The main difference is that when you run a program It takes a little bit longer to appear, and when it does you get …

13 THIS! Here the emulator is indicating which key you should press to launch the program. A java mobile program is called a MIDlet a variation on the word applet. Instead of the window we get in a regular applet, mobile Processing generates an emulator. p.s In the Sun Java toolkit IDE you can choose from various models of phone. There are also other good examples in the toolkit, including GPS examples

14 The java toolkit is worth using as well …but it is more complex and not really like an IDE such as BlueJ or Processing


16 Back in Mobile Processing… Here Ive pressed the key with 2 on it, This program displays the key, the keyCode, and the rawKeyCode. The system variable keyCode is used to detect special keys such as the UP, DOWN, LEFT, or RIGHT The system variable key always contains the value of the most recently pressed key on the keyboard. The system variable rawKeyCode represents the value of the last key pressed, as reported directly from the phone. This is useful when a phone has non-standard keys that do not map to characters (as with the key variable)

17 // keycode // by Francis Li // // A simple key profiling example (and handy utility) that // shows the value of key presses as returned by the different // system variables in Mobile Processing- key, keyCode, // and rawKeyCode. This particular example runs on MIDP 2.0 // phones only since it uses the Phone library to run // fullscreen. When running fullscreen, softkey buttons // return key events, but the values of the rawKeyCode for // softkey buttons are not defined in the MIDP standard- they // are not only different between manufacturers, but can even be // different between phones from the same manufacturer. // // Created 06 March 2008 // import*; Phone p; PFont font; void setup() { p = new Phone(this); p.fullscreen(); font = loadFont(FACE_PROPORTIONAL, STYLE_PLAIN, SIZE_LARGE); textFont(font); textAlign(CENTER); fill(0); noLoop(); } void draw() { background(255); text("Key:\n" + key + "\n\nkeyCode:\n" + keyCode + "\n\nrawKeyCode:\n" + rawKeyCode, 0, 0, width, height); } void keyPressed() { redraw(); } This program is In the examples that come with mobile Processing Familiar code structure

18 Simplest possible example. I will export it as a MIDlet and transfer it to my phone Where I will then install it

19 Exporting a MIDlet To make your porgram work in a real mobile phone you need to export it, Use Export MIDlet. you can also make a strange applet to put on the web this will have the emulator in it, use export Applet. These are the files I will put in my mobile phones folder. The folder I use on my phone is called games.

20 I use a cable to connect my phone to the computer via USB You could also use Bluetooth to transfer the application to your phone, or upload it to the internet and download it through your phone's browser. The cable works best for me…

21 I connect the phone and a dialogue on my phone opens it says file transfer I ignore it and use the folder window that opens as if it was a memory stick. I put the folder containing the MIDlet files (simple_example) into a folder called other on my mobile phone. Then I disconnect the cable and find my way to the folder called other on my phone. I find the simple_example folder. When I click on it (it has the word java beside it ).it asks me if I want to install, which I do. It asks me where I want to install it too, I can choose between a games folder or a folder called applications. I choose to save it in the folder called games. Then it asks me if I want to start my program. I confirm yes and I soon see my red circle on the mobile phone screen !

22 A game I made about Streatham high road

23 My I Ching mobile phone program. I can click on the mobIChing.jad file and it runs on my laptop as an Emulator, its also on my phone.

24 throw will randomly generate a hexagram, I like the idea of combining mobile phone technology and a divination system that is 5000 years old….. The idea is that clicking on i will explain what the hexagram signifies, Ive set up the structure to do this (on a rainy day….)

25 Libraries for Mobile Processing: (growing)

26 Good place to start

27 Does come with basic sound capabilities Try the useful sound example, includes midi and audio files

28 Good examples…

29 Etch-a-sketch?

30 There arent that many books on mobile phone programming available at the moment.This one is quite useful, as it accommodates beginners. Its available in paper and e versions BUT SINCE I FIRST TAUGHT THIS CLASS MORE AND MORE INFO AVIALABLE NOW, especially for IPHONES

31 Interim presentations next week

Download ppt "Programming For Artists Term 2 MFA Computational Studio Arts Starting to program for mobile phones."

Similar presentations

Ads by Google