Project progress 3

Since my last progress report, things have progressed at quite a steady pace. I’m developing the system using a mix of XHTML MP and PHP. This has meant a bit of a turnaround with my usual way of developing web applications. With the memory of mobile phones being at a premium and the size, or lack of more to the point, of bandwidth, I’ve had to go back to the days of building for 14.4k modems. Each page has to be stripped back to the absolute minimum needed to format it. However, I am starting to disagree with what seems to be the current opinion of using CSS. All the experts seem to advocate using inline styles as a way of reducing code and keeping it simple. But, this will actually bloat the code. If you want to set the links to always be black then for every link you need to add the inline style. I know it’s not a lot of characters but even so, you’re still adding to the weight of the page. What I’ve been doing is adding the styles into the header of the page and as each is only there once, it keeps the page weight down – maybe I should write a tutorial!!

Anyway, back to my progress. The pseudo email system is finished so users can now reply and email the administrator. At the moment they can’t contact a user direct unless they want to do a swap or respond to a request for one. It also sends an email to their email address telling them that they have a message waiting. With the cost of data transfer still at something of a premium, I never envisaged users being logged on for hours at an end and thought this would be a good way of notifying them. The registration page is complete as is a facility to send them their password if they’ve forgotten it. I’ve also recently finished the search feature so users can now look for assets they might want to swap. I’m currently working on the add facility. Adding the name, type of file and a brief description is fairly easy but getting the full file spec including path without actually loading the file has been a bit of a challenge but I’m getting closer to cracking it.

Things to do include the ability to unregister, modify the assets users put up for swapping and most importantly the process of the swap. My plan is to have this part finished by 29th March in time for the open day with the administrator’s system finished shortly after.

After a discussion with Chris, phone2fone is rapidly turning into a platform. With just a couple of slight mods, it could easily be used as a swapping game or even as a system for swapping or giving away larger items similar to Freecycle. Assuming I can keep up the same sort of progress, I’m gonna have a look at developing them also.


Interesting stats

Some figures released by the Mobile Data Association show that nearly 15m people accessed the internet from their mobile phone during October and November last year. Check out the figures here.


Cookies

Now here’s a thing. Apparently browsers on mobile phones can’t handle cookies (excluding Smartphones and the trimmed down version of IE or whatever it’s called)…..but they used to!! In the days of WAP, WML cards and whatnot, they all could cope with cookies. Now though cookies are ignored – so with your 3.2 megapixel onboard camera you can shoot stills and video, listen to your favourite mp3s, text and even talk to people on mobiles but heaven help you wanting it to remember your logon details when you venture on the net with it.

I feel soooo much better now for that. There is a possible alternative with Bango although it is more aimed at m-commerce. Some details about it are at The Register.


Some ideas

Had a meeting with Chris on Friday to show him my progress so far. I think it went pretty well but he did particularly like the phone call link. When you think about it, it is pretty mad. You’re on a website, you click a link and the webpage then places a call to someone which essentially is what is happening. So, anyway, Chris suggested that I list the phone ideas that I’ve had coz maybe my project could be a suite of mini projects.

Phone2Fone
A peer-to-peer type system that allows people to swap mobile-type assets.
Progress – 5

Online phone directory
People load their phonebooks up to a central server which they can share with their friends.
Progress – 2

Translation
Using a camera phone, people can take a photo of some text in a foreign language, upload it to a server which translates it for them.
Progress – 5

Music library
People upload MP3s to a central server which they can access and play from their mobile phone.
Progress – 2


Project progress 2

Following on from a bit of a major rethink on my skills, I’ve decided to go with something mobile phone based. As I’m still quite keen to have something that can help disadvantaged people, I looked into voice synthesis so that SMS texts could be read out. Unfortunately, current Java voice synthesis needs a lot of memory, around 2-16MB and most mobile phones only have around 512KB although PDAs have 2-16MB so they would be a possibility. However, as J2ME isn’t a full version of Java, it doesn’t support javax.sound which all Java-based voice synthesis needs. I then looked into smart phones. As most of them run Windows CE, they have better memory management so ought to be able to handle speech albeit perhaps a bit slowly. I managed to find a synthesis kit for Windows but all development for Windows CE is done in C++ and I don’t think I would have enough time to learn it as well as turning out a major piece of work.

After a bit of a dump of things that mobile phones are capable of doing like taking photos, shooting video, connecting to servers etc, started looking into the idea of a skills exchange. When you need something doing, you use your phone to access a central database to find a supplier. When you do, a request is sent to their phone and when they do the work, they earn some credit in their account. The main problem with this, as with all skills exchange systems, is the good trades people will always have a lot of credit and if they can’t cash the credits in, then they will always have an excess. However the idea of an exchange system was still worth pursuing so I came up with the idea of a peer-to-peer system where users exchange “assets” on their phone such as video, photos, ring tones etc. Each user would register with a central server and log the assets that they have available. Other users would then browse the database and when they find something they want, they put in a request for it. The difference between this and the “normal” peer-to-peer networks is that the transaction is an exchange so each person has to be prepared to swap assets instead of just taking.

Over the Christmas break, I investigated technologies. For the server, MySQL and PHP seemed the most obvious and for the application on the mobile J2ME also seemed obvious. However, testing proved otherwise. I wrote a simple J2ME app that just called a script on the server. On 2 of my test phones it worked fine but on the 3rd which is Java-enabled, the app wouldn’t run. I believe it’s because it can only run MDIP1.0 J2ME apps and I’ve been using MDIP2.0. I did consider just developing for newer phones but as I have this “thing” about technology being accessible to everyone, I carried on researching. I came across XHTML MP which is XHTML for mobile devices. It calls a different doctype to render the page for the smaller screen and has a couple differences with normal XHTML but other than that, it’s pretty much a normal web technology. So far I have developed scripts for uploading and downloading assets to and from the server and have been able to use sessions for controling logging in. I’ve even managed to write a routine for browser recognition. With the system being mobile phone based, accessing it from a normal browser defeats the object somewhat. As typing on a phone keypad is not the simplest of things to do, the next thing to look into is the use of cookies. Again with memory at a premium, they will have to be stripped down to the minimum. I have already mapped the database out on paper so once I have got the cookies issue resolved, I intend to create the database and then work on the messaging system of alerting people when they have a request for a swap.


Xmas progress

I’ve been playing about with different technologies to drive the peer-to-peer system – or as I like to call it the phone2fone system. I had first thought about using J2ME. I’ve used it in the past and it seems the most obvious but I’ve had some interesting times with it. Transfering data to and from a server is not the easiest of things to make it do plus, one of my test phones which can run Java games won’t run my demo. I think it’s because of the version of J2ME I’m using is too new. The phone is around 2 years old which is positively ancient I guess BUT I’ve got this non-exclusion policy when it comes to things like this so I had a bit of a rethink.

There’s a new(ish) verison of XHTML called XHTML MP which was developed with mobile devices in mind. Since I found it, I’ve managed to upload and download files on all my test phones and have been able to use sessions to control logins. Cookies is the next thing on my list to do. I’ve even managed to write a browser detection routine so I can now distinguish between mobile and “normal” browsers. I want to be able to do this so that if anyone comes across the site using a normal computer, they’ll be sent to a different page. Access to the system has to be from a mobile device otherwise it beats the whole object. Anyway, I’ve also discovered that you can put a link on a page that when clicked will make your phone call a number. How cool is that???


Good meeting 1

Met Chris earlier today to go thru’ my project. Told him of my problems with speech and J2ME. He agrees with me, if the phone can play music, why can’t we get it to read text messages. We also pretty much kicked the Windows Mobile idea into touch to as I don’t think I’ve got enough time to learn C++ between now and handin time. So, we went thru everything that mobile phones can do. We talked about stills and video, text, getting data to and from a server and hit upon the idea of skills exchange. For example, I build you a website and you sort out my central heating – only if you’re a plumber coz if you ain’t, you’re not coming anywhere near my pipes. One of the problems with this system is if you’re good at what you do, you’ll likely end up in credit with nothing to spend your points on. The system will have to have some sort of scheme to even out the share as it were but speaking from experience, when you find a good plumber, you hang onto them so I guess if the tradesman has a lot of points, then they must be good.

But, it did get me thinking and I’m wondering if instead of a skills exchange, the system is a files exchange. A bit like peer-to-peer but obviously phone-to-phone and you don’t just take files, you have to be prepared to swap, a bit like Panini stickers I guess. (Did you see how I did that? Managed to get yet another football reference in, it’s a skill) The user registers what files they’re prepared to swap and can browse files from other users before organising a trade. I know text messages are stored in hidden folders but I wonder if that’s the same with other types of files. Looks as though I’m researching again.

PS I’ve not given up on the speech-phone thingy. I’m still gonna keep working on it but I think the “go-live” date will be quite some time in the future.


Windoze Mobile

I’ve turned my attention to smart phones. As they tend to run a mini version of Windows, they have better memory management as well as having larger memories so could be a good platform for speech. I’ve tracked down a speech synthesiser that will run under Windows, I’ve gotta buy it (there’s a surprise) but there’s a 30 day demo version which ought to be enough time to see if it’s worth pursuing. Development for Windows Mobile needs to be done in C++ which is a bit scarey. Not sure if I’m gonna have enough time to learn a new language to the level that I’m gonna need it by Easter. Still, there’s only one way to find out I guess.


Slight problem

I’ve been researching speech synthesis and, as yet, there is nothing for mobile devices. Which does beg the question why? I’ve been looking at FreeTTS. It’s open source, written in Java so should be ideal for what I want to do except the demo apps all seem to make reference to things outside of itself. Not that big a deal as most phones can access the net so any files/classes needed could be stored on a central server. There are 2 configurations for J2ME; Connected, Limited Device Configuration (CLDC) and Connected Device Configuration (CDC). CLDC needs a 16 or 32bit processor and up to 512kb of memory whereas CDC needs 2MB memory and a 32bit processor such as can be found in PDAs. Voice data for a synthesiser is around 2-16MB so it looks as though the problem is down to the size. I guess if FreeTTS needs to access a central server anyway, the size could be reduced however, J2ME isn’t a full version of Java. It doesn’t support javax.sound and I don’t think the beeps you can get it to play are gonna be enough.

CDC looks a possibility but will involve quite a major hack of FreeTTS as well as finding a device that has it. More research is needed by the looks of it.


VoiceXML

I’ve just discovered another interesting speech synthesis technology – VoiceXML. Essentially it’s XML for applications such as voice browsers. What is particularly interesting is, you could set up 2-way communication using it and SMS. Not quite sure where this is going, maybe it’s a side project rather than the main one.