Monday, November 5, 2007

Week 9 Python:Whers the Party tonight

Send a message to your friends and tell them where u are tonight


import appuifw
import messaging

data = appuifw.query(u"hey,Im partying tonite at:", "text")

cellno1 = "7166301656" # neighbors mobile no

txt=u"Girl4 is partying tonite at" +data

if appuifw.query(u"send your location now?","query") == True:
messaging.sms_send(cellno1, data)

appuifw.note(u"Sent your party location to", "info")
else:
appuifw.note(u"Nobody cares where you are tonight", "info")

Saturday, October 27, 2007

Week 6: Bump Smiley Final

Bump Smiley Is now Complete

The final Code (jar file) and presentation can be found here next to "Vibha Bamba".
Final Code and Presentation

For concept / ideas/ wireframes please review initial weeks.
The task checker application along with the screensaver midlet are documented in week 2,3,4.

Content to be well document(apologies).



Getting to Bump Smiley..

Tuesday, October 9, 2007

Week 5 : Game Design Wireframes

GAME DESIGN WIREFRAMES













Tuesday, October 2, 2007

Week4: MM Midlet




Check tasks from form.

Code File




import javax.microedition.lcdui.*;
import javax.microedition.io.*;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import java.io.*;


public class MainScreenMidlet extends MIDlet implements CommandListener,Runnable {



private Display display; // The display

private Form main;
private Form screensaver;// form for displaying the screensaver image
private ChoiceGroup worklist1;
private Command cmdExit;
private Command cmdSelect;
public Gauge showeff;//activity indicator for alert object: test
public int total;
public String url;



public MainScreenMidlet () {

// save reference to midlet so that we can exit application

display = Display.getDisplay(this);//gets ref to the display instance..
main = new Form("Work Time");
main.setCommandListener(this);
// create list to be displayed on the form
worklist1 = new ChoiceGroup("Select tasks Completed",Choice.MULTIPLE);
worklist1.append("Pay cheques", null);
worklist1.append("Switch class to Computational Form", null);
worklist1.append("Discussion for Connected Life", null);
worklist1.insert(1, "Submit Source code for MAD", null);
main.append(worklist1);
// create command objects so we can compare them later
cmdExit = new Command("Exit", Command.EXIT, 2);
cmdSelect = new Command("Select", Command.OK, 1);
main.addCommand(cmdSelect);
main.addCommand(cmdExit);
Alert welcome = new Alert("Welcome","Time to check your tasks, are you ready?", null, AlertType.INFO);
welcome.setTimeout(3000);

display.setCurrent(welcome,main);

//create form for displaying screensaver image
screensaver=new Form ("Generating...");
screensaver.addCommand(cmdExit);
screensaver.setCommandListener(this);

}



// call this function when you want to exit application
public void exitMIDlet()
{
try {
destroyApp(true);
} catch (MIDletStateChangeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
notifyDestroyed();
}
// handle commands

public void commandAction(Command cmd, Displayable dis) {



if(cmd == cmdExit )

exitMIDlet();

else

{

total=worklist1.getSelectedFlags(new boolean[worklist1.size()]);



Alert test = new Alert("Selected "+total,"Tasks completed - "+total, null, AlertType.INFO);
Gauge showeff = new Gauge(null,false,100, 0);
test.setIndicator(showeff);
showeff.setValue(total);
//test.getIndicator();
test.setTimeout(3000);
display.setCurrent(test,screensaver);
Thread t = new Thread(this);//new execution thread for screen saver operation
t.start();


// bargraph should be an alert with guage, screensaver should be canvas

//app.getDisplay().setcurrent(bargraph, screensaver);

}

}



protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO Auto-generated method stub

}



protected void pauseApp() {
// TODO Auto-generated method stub

}



protected void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub

}


//exectution of thread t;

public void run() {
HttpConnection hc = null;
DataInputStream in = null;


try {
String url;
if(total==1)
{
url= "http://www1.istockphoto.com/file_thumbview_approve/437828/2/istockphoto_437828_giant_smiley_big_smile.jpg";

}
else
{
url= "http://www.istockphoto.com/file_closeup/who/facial_expressions/smiling/3404377_unhappy_worker.php?id=3404377";
}
System.out.println("Starting to download smiley image");
hc = (HttpConnection) Connector.open(url);
int length = (int) hc.getLength();
byte[] data = null;
if (length != -1) {
System.out.println("Content Length is " + length);
data = new byte[length];
in = new DataInputStream(hc.openInputStream());
in.readFully(data);
}

else {
// If content length is not given, read in chunks.
int chunkSize = 512;
int index = 0;
int readLength = 0;
in = new DataInputStream(hc.openInputStream());
data = new byte[chunkSize];
do {
if (data.length < index + chunkSize) {
byte[] newData = new byte[index + chunkSize];
System.arraycopy(data, 0, newData, 0, data.length);
data = newData;
}
System.out.println(".");
readLength = in.read(data, index, chunkSize);
index += readLength;
} while (readLength == chunkSize);

length = index;
}

Image smileyscr = Image.createImage(data, 0, length);
ImageItem imageItem = new ImageItem(null, smileyscr, 0, null);
screensaver.append(imageItem);
screensaver.setTitle("Done.");
}

catch (Exception ioe) {
ioe.printStackTrace();
StringItem stringItem = new StringItem(null, ioe.toString());
screensaver.append(stringItem);
screensaver.setTitle("Done.");
}

finally {
try {
if (in != null)
in.close();
if (hc != null)
hc.close();
} catch (IOException ioe) {
}
}
}
}

Week 4: Midterm Idea Brainstorm

Work Check::

Taking the initial idea from workcheck and retaining the scheduled tasks check portion.
-Syncing it with an online task list/Google calendar
-Syncing it with other system events from a online address book: eg, Birthday reminders in the form of an icon like a message icon on your cellphone.
-Creating a simple screensaver smiley game, where each task represents a task smiley.A jotter or a ticker is used to stamp out the smileys(task smileys are kind of mean looking)The strength of each smiley character is based on the time of the day, if it represents an incomplete task its movement on the screen is quick and its difficult to swamp out.




-Completed task smileys assist the jotter by blocking incomplete task smileys.

Comments:
Not too cool? No multimedia stuff?Only interactive smileys..whose expressions could possible change during the game?

Monday, September 24, 2007

Week Three




Assignment:WEEK 3:


1. Start thinking about an idea for a larger project that you'd like to work on. Blog your idea - include references to APIs that intend to use, links and pictures. Sketch out a simple wireframe / interaction diagram for your idea. Also include a paragraph and some links about your inspiration for this idea.




USER SCENARIO:

The harrowed , busy, student,constantly forgetting, running around trying to keep pace with a busy school life and trying his best to be productive.

key features being leveraged on:
-Always has a complicated list of things to do
-Always on the move
-Needing reminders
-Needing productivity checks for

WHY THE CELLPHONE:

The cellphone is a device that has limited capabilities as opposed to a laptop, but it is more accessible than anything else we own.This application makes use of this ubiquity of the device that we carry and interact with in subways and elevators where many of its functions work without the presence of wireless internet or cellphone network.

Using this device as an explorer of a persons efficiency with minimum input and providing alerts and efficiency visualization is the goal of the MIDlet.

The user begins by entering the list of activities that must be done by the end of the day.The list of activities is broadly timestamped using morning, afternoon and evening.

During these phases of the day an alert list shows up where the user can check off whatever tasks have been accomplished.Using this data the application calculates your efficiency starting from the time of the day to the current time.A visualisation of the efficiency is your screensaver.


WIREFRAMES

WORK CHECK SHOWS UP AT INTERVALS YOU DECIDE DURING THE DAY



CHECK OFF THE COMPLETED TASKS FOR CALCULATING EFFICIENCY



THE EFFICIECY BAR GRAPH AFTER YOU SUBMIT THE TASK FORM





SCREEN SAVER:EFFICIENCY DEPENDENT GRAPHICS





USER FEEDBACK

Ashlyn Dewey
Student:ITP
Brooklyn
Schedule rating:*****(Super Busy)

Ok, I like the basic idea that the application lets people know the
tasks they have to do and gives them a visual of their progress but I
feel like the efficiency rating isn't something important in the
scenario as described. Why would a user want to know the efficiency
percentage? Maybe something less abstract like "It took you this long
to do these tasks..." or "you did this # of tasks since 9 am?" I like
the idea of it alerting you to things that need to be done. I think
it would be interesting if the screensaver items directly referenced
the tasks in some abstract way, maybe thats what you have it as?



2. Take your idea for the simple MIDlet from Week Two and create it using Forms or Canvases - OR - create a MIDlet which uses the Canvas to listen for button presses and does something interesting with that data. Please add your source code to the Wiki and try use MPowerPlayer's Webstart to link to your JAD files.

Source Code:




import javax.microedition.lcdui.*;

import javax.microedition.midlet.MIDlet;



public class MainScr implements CommandListener {



private Display display; // The display

private Form main;

private Worktime app;//because it needs to know whom to call the main ref on

private ChoiceGroup worklist1;

private Command cmdExit;

private Command cmdSelect;

public Gauge showeff;//activity indicator for alert object: test



public MainScr (Worktime creator) {

// save reference to midlet so that we can exit application

app = creator;

display = Display.getDisplay(app);//every class must get ref to the display instance..

main = new Form("Work Time");

main.setCommandListener(this);



// create list to be displayed on the form

worklist1 = new ChoiceGroup("Select tasks Completed",

Choice.MULTIPLE);

worklist1.append("Pay cheques", null);

worklist1.append("Switch class to Computational Form", null);

worklist1.append("Discussion for Connected Life", null);

worklist1.insert(1, "Submit Source code for MAD", null);

main.append(worklist1);



// create command objects so we can compare them later

cmdExit = new Command("Exit", Command.EXIT, 2);

cmdSelect = new Command("Select", Command.OK, 1);

main.addCommand(cmdSelect);

main.addCommand(cmdExit);

Alert welcome = new Alert("Welcome","Time to check your tasks, are you ready?", null, AlertType.INFO);

welcome.setTimeout(3000);

display.setCurrent(welcome,main);

}



// handle commands

public void commandAction(Command cmd, Displayable dis) {



if(cmd == cmdExit )

app.exitMIDlet();

else

{

int total=worklist1.getSelectedFlags(new boolean[worklist1.size()]);



Alert test = new Alert("Selected "+total,"Tasks completed - "+total, null, AlertType.INFO);
Gauge showeff = new Gauge("Your Efficiency Now",false,100, 0);
test.setIndicator(showeff);
showeff.setValue(total);
//test.getIndicator();
test.setTimeout(3000);
display.setCurrent(test);

// bargraph should be an alert with guage, screensaver should be canvas

//app.getDisplay().setcurrent(bargraph, screensaver);

}

}

}


-----


import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;

public class Worktime extends MIDlet {

// Class variables
MainScr main;


// Setup application
public Worktime() {
}

// do what should happen when app starts (called automatically after setup
protected void startApp()
{
new MainScr(this);

}

protected void pauseApp()
{ }

protected void destroyApp(boolean unconditional)
{ }

// call this function when you want to exit application
public void exitMIDlet()
{
destroyApp(true);
notifyDestroyed();
}

}




3. Create a simple MIDlet which uses a Canvas to create a simple animation. Please add source code to the Wiki.

The bar graph and the screensaver are canvas classes


4. Read chapter 5, 19 and 45 from Everyware. Think about what Greenfield is saying in light of your own ideas above. Write a short paragraph about how these concepts influenced your idea (or not). Prepare two good questions for in-class discussion. Link these to the HomeworkWiki. Adam Greenfield has
DISCUSSION QUESTIONS FROM EVERYWARE:::

1) The single hindrant in cell phone design that deviates from talking in real time and real space, other than seeing the person

2)Looking at human-like system design examples and investigating why these manifest artificiality as opposed to their intended design.Better: what qualities of a system make it human, what design evokes delaing with a piece of technology as though it can communicate freely with us?

INDEX

Mobile Application Design , Assignments, Discussions and More.................................

Week 1:
Week 2:
Week3:
Week 4:
Week 5:
Week 6:
Week 7:
Week 8:
Week 9: