IC cards with Android

CS2310 Software Engineering IC cards with Android Lei Jiang ([email protected]) IC card is a tool describing specific patterns and communications betwee...
Author: Alexia Clarke
8 downloads 3 Views 821KB Size
CS2310 Software Engineering

IC cards with Android Lei Jiang ([email protected]) IC card is a tool describing specific patterns and communications between these patterns. IC cards management system has been implemented in PC system. In this work, we transplant IC cards management system onto Android. The main component of IC card management system includes IC card adder, IC card editor, IC card viewer, IC card exporter and IC card importer. The overview of IC cards management system is shown in Figure 1.

Figure 1. IC cards management system overview IC card adder The IC card adder is designed to add IC cards to the IC Card XML Database. To add one IC card, click the “Add” button on the management system’s main screen (See Figure 1). This tool helps users to enter all data specific to an IC card into blank forms and then submit it to be added to the database. The user input interface can be viewed in Figure 2 (right). And the submission page is shown in Figure 2 (left). If the user makes mistake on the operations of dealing with any of the IC card’s fields, the card will not be added to the database until all information provided. The user will be notified of any missing data. Figure 2b shows adding a new card process on a real android phone. IC card editor The IC card editor is designed to edit IC cards which have already been in the IC Card XML Database. To edit one IC card, click the “Edit” button on the management system’s 1

CS2310 Software Engineering

main screen (See Figure 1). And the interfaces in Figure 2 will appear for users to do the editing job. All information in the system will be re-evaluated. Only when all information meets the requirements, final results will be submitted into the XML database. And in the editor view, user can edit IC card name, description, interaction pattern, my task, time critical condition, name of other IC, message to other IC, other IC task, card number and total number.

Figure 2. Add a new IC card IC card viewer The IC card viewer is designed to view one IC card which has already been in the IC Card XML Database. After clicking “View” button in Figure 1, all the IC cards in XML database are shown in view interface, like Figure 3 shows. Our system dynamically generate IC card entry names and below buttons. Therefore, no matter how many IC card entries in the database, our system can clearly give a list of all IC cards. To view one particular IC card, click the “view” button below one specific IC card entry in Figure 3. And then, all detail information will be shown in next page, which is shown in Figure 4. However, no editing can be processed here.

2

CS2310 Software Engineering

Figure2b. Add a new card on a real phone

3

CS2310 Software Engineering

Figure 3. View an IC card

Figure 4. View an IC card’s detail

Figure5. Export a XML 4

CS2310 Software Engineering

Clear the Database The Clear the Database option is used to clear the current IC Card XML Database. To access this option, click the “Clear the Database” button on the management system’s main menu in Figure 1. IC Card XML Database The IC Card XML Database is an XML file containing the IC card information entered since the last time the “Clear the Database” option was chosen. To view this database, click the “View all” button on the management system’s main menu. Note: if you view this database using a browser that supports XSLT, the XML will be rendered in a viewable, stylized fashion. The information of all IC cards will be displayed in the next page, which is shown in Figure 6. By clicking the “Back” button in the bottom of the page, user can be back to the management system’s main menu. Again, no editing action can be done here.

Figure 6. View all cards IC card exporter The IC card adder is designed to export an existing XML file to IC card XML database. To do the exporting operation, click the “Export” button on the management system’s main screen (See Figure 1). And the in Android local directory, a XML file named “new.xml” will be created. All IC cards are written into new.xml file by following all rules of XML, which is presented in Figure 7.

5

CS2310 Software Engineering

Figure 7. Details of XML IC card importer The IC card importer is designed to import IC card XML database to XML. To do the importing operation, click the “Import” button on the management system’s main screen (See Figure 1). When the importing action is finished, the status bar shows “Parse done!” indicating the successful importing of external XML database. Figure 9 illustrates the external XML database location.

Figure 8. Parse done

Figure 9. External XML database location Implementation on “Real Machine” Figure 10 shows our main welcome menu on a real android phone. And Figure 10 is equivalent to Figure 1 in this paper. On the real phone, we also implemented an ICcard control display function, which is the “show message flow”. Figure 11 shows the import XML database and export XML database on a real android phone SD card.

6

CS2310 Software Engineering

Figure 10. Main menu on real android phone

Figure 11. External XML database location

7