Project

General

Profile

« Previous | Next » 

Revision e28705af

Added by osmith about 4 years ago

IMSIPseudo.java: show hello world on LU

View differences:

sim-applet/src/org/osmocom/IMSIPseudo/IMSIPseudo.java
16 16
	// which has a limited number of write cycles.
17 17
	private byte helloMenuItem;
18 18

  
19
	static byte[] welcomeMsg = new byte[] { 'W', 'e', 'l', 'c', 'o', 'm', 'e', ' ',
20
                                            't', 'o', ' ', 'T', 'o', 'o', 'r', 'C',
21
                                            'a', 'm', 'p', ' ', '2', '0', '1', '2' };
19
	static byte[] welcomeMsg = new byte[] { 'H', 'e', 'l', 'l', 'o', ',', ' ',
20
						'W', 'o', 'r', 'l', 'd', '!' };
22 21
	static byte[] menuItemText = new byte[] { 'I', 'M', 'S', 'I', ' ', 'P', 's', 'e', 'u', 'd', 'o', 'n', 'y', 'm',
23 22
						  'i', 'z', 'a', 't', 'i', 'o', 'n'};
24 23

  
......
30 29
		// Define the applet Menu Entry
31 30
		helloMenuItem = reg.initMenuEntry(menuItemText, (short)0, (short)menuItemText.length,
32 31
				PRO_CMD_SELECT_ITEM, false, (byte)0, (short)0);
32
		reg.setEvent(EVENT_EVENT_DOWNLOAD_LOCATION_STATUS);
33 33
	}
34 34

  
35 35
	// This method is called by the card when the applet is installed. You must
36 36
	// instantiate your applet and register it here.
37 37
	public static void install(byte[] bArray, short bOffset, byte bLength) {
38 38
		IMSIPseudo applet = new IMSIPseudo();
39

  
39 40
		applet.register();
40 41
	}
41 42

  
......
58 59
				showHello();
59 60
			}
60 61
		}
62

  
63
		if (event == EVENT_EVENT_DOWNLOAD_LOCATION_STATUS) {
64
			/* TODO: count the location updates done with the same
65
			 * pseudo IMSI, and warn the user if it becomes too
66
			 * high */
67
			showHello();
68
		}
61 69
	}
62 70

  
63 71
	private void showHello() {

Also available in: Unified diff

Add picture from clipboard (Maximum size: 48.8 MB)