Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

IRL Cinema Guide - Midlet

  • 14-02-2008 6:07pm
    #1
    Closed Accounts Posts: 2,267 ✭✭✭


    New project im currently working on...
    Irish Cinema Guide applet for your MIDP 2.0 phone..

    Consists of 2 parts:

    1. A php parser on a remote server to parse out any un-necessary data from cinema listings from entertainment.ie based on given arguments.


    2. A java midlet to call this php parser and display the results on the phone. the parser will only return plain text, therefore reducing data transer load, therefore reducing costs.


    I hope to give out jar's to certain people soon to beta test.
    Of course this midlet is free, but your network will impose some data transfer rates.


    I have attached some screen shots of it working so far...

    UPDATE, v0.1 BETA JAR:
    JAD: http://damohere.freehostia.com/irlcg/IRLCinemaGuide.jad
    JAR: http://damohere.freehostia.com/irlcg/IRLCinemaGuide.jar


    Note- the Settings and About commands do nothing yet..

    There are some current known issues. PLEASE READ FULLY BEFORE TESTING.
    1. On a blackberry (OS v4.2.2.67). When the application launches, we are given an un-caught exception error: "Uncaught exception: Field added to a manager while it is already parented". Im clueless as to why the Blackberry is throwing this. Maybe someone who developed midlets for blackberry has an idea?

    2. 3 Ireland. (HTTP Response: 302)
      This is a really weird problem. Here we go..
      Some people on 3 IRL mobile network won't be able to use this app due to the proxy splash/warning page 3 throws to you about accessing the internet and data costs etc.. when you open up the browser for the first time.
      This page is getting caught by the midlet on the phone. NOW THE REALLY WEIRD PART IS: My friend has a Sony Ericsson K800i on 3 IRL and experiences this problem. He keeps getting that 3 proxy page HOWEVER I have a Nokia N73 on 3 and the app works fine for me. I do not get this 3 splash page. Does anyone have any ideas how I can get around this for such phones as the Sony Ericsson's?
      Before you answer, here is what I have tried:
        Grabbed the "continue here" hyper link in the proxy splash page and load that, however you will be returned back to the same page again and again.
        Processed the "location" field in the header when you get the 302 responce that should redirect you to the "redirect to" url from the http header, still brings you back to 3's proxy page.
        Used cookies, and tried to pull across the page twice hoping that the 2nd time it'd pick up on what ever cookie maybe used to show that we already viewed the warning. Still get the proxy warning. Alghough there is no official cookie handling method in the HttpConnection class in J2ME, I tried RMS Http Connection (
      http://www.javaworld.com/javaworld/jw-04-2002/jw-0426-wireless.html?page=2)
      Tried pulling the url directly from the way the 3 proxy builds it for the "continue here" links. Still no go. By the way, if any one is interested how these url's are made for whatever reason, here is how: Suppose you want to go to:
    http://www.rte.ie/tv/index_rtetwo.html

    3's proxy url will be like:
    http://notify.three.co.uk/accepted-Interstitial?http/(host of site)/(base64 encode of full url to get)
    so the site above would be:
    http://notify.three.co.uk/accepted-Interstitial?http/www.rte.ie/aHR0cDovL3d3dy5ydGUuaWUvdHYvaW5kZXhfcnRldHdvLmh0bWw=
    Sorta like PHProxy :-)

    But at the end of the day, i dunno why my Nokia N73 doesn't experience this, but my friends Sony Ericsson K800i does. Maybe the Java VM on the Symbian OS on the Nokia N73 has build in cookie/sesssion handling?


    [*]Meteor users will probably have to get ISP-APN enabled for their account


    Damo.


Comments

  • Closed Accounts Posts: 19,080 ✭✭✭✭Random


    I'd love to try her/it out.


  • Registered Users, Registered Users 2 Posts: 2,225 ✭✭✭wba88


    ill help test it aswell


  • Closed Accounts Posts: 6,131 ✭✭✭subway


    looks like a great idea.
    may i suggest that you return the booking line number of the cinema with the listings if possible?


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    subway wrote: »
    looks like a great idea.
    may i suggest that you return the booking line number of the cinema with the listings if possible?


    as in the cinema phone number? that can be done.


  • Registered Users, Registered Users 2 Posts: 18,962 ✭✭✭✭Mimikyu


    This post has been deleted.


  • Advertisement
  • Closed Accounts Posts: 24 pop.1280


    I'd love to test this also


  • Closed Accounts Posts: 6,131 ✭✭✭subway


    as in the cinema phone number? that can be done.
    thats what i meant.
    unless you are building in a referral system to allow people to book through their phones and make you some cash.

    ive often been out on a saturday afternoon and decided to go to the cinema, first thing is buy a paper to check whats on, then call the cinema to check availabilty - no point heading all the way over to find its sold out.
    if you can included a contact number with the listings it will save people having to ring 11850 to check the number.


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    subway wrote: »
    thats what i meant.
    unless you are building in a referral system to allow people to book through their phones and make you some cash.

    ive often been out on a saturday afternoon and decided to go to the cinema, first thing is buy a paper to check whats on, then call the cinema to check availabilty - no point heading all the way over to find its sold out.
    if you can included a contact number with the listings it will save people having to ring 11850 to check the number.

    Here you go.


  • Closed Accounts Posts: 6,131 ✭✭✭subway


    noce work :)

    would love to test it out


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    I'll post up beta jar's before I leave work today.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    [*]3 Ireland. (HTTP Response: 302)
    This is a really weird problem. Here we go..
    Some people on 3 IRL mobile network won't be able to use this app due to the proxy splash/warning page 3 throws to you about accessing the internet and data costs etc.. when you open up the browser for the first time.
    This page is getting caught by the midlet on the phone. NOW THE REALLY WEIRD PART IS: My friend has a Sony Ericsson K800i on 3 IRL and experiences this problem. He keeps getting that 3 proxy page HOWEVER I have a Nokia N73 on 3 and the app works fine for me. I do not get this 3 splash page. Does anyone have any ideas how I can get around this for such phones as the Sony Ericsson's?

    the answer is he has to call 3 and get them to update his account so he doesn't get that splash page anymore. java apps don't work properly with that setup. i used to have that but after three months of shouting at them they fixed it. the thing that seemed to finally work was telling them that java apps weren't working. a few hours later that splash screen was gone and java apps worked. until then i had just been saying the internet wasn't working and they kept fobbing me off


    edit: just to show that it nothing to do with the phone itself, you'll notice that if you swap sims with him, the SE will start working anf the n73 will stop


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    Thanks for that tip Commander Vimes. However if i use oper or the symbian os browser, I will then get that splash warning. Even if I use my phone as a modem, I'll get the warning in IE/firefox, but not through this midlet. It dont make sense.


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    links to jar/jad now in first post.


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    yes, i havent a timeout specifically coded in it yet. HttpConnection class for J2ME doesnt have a timeout method so I'll have to specifically interrupt the connection attempt after so many seconds, causing it to throw an exception.

    I read on some thread before about Metor, think it was the AFT thread that meteor users need something like "ISP-APN" enabled on their account. Have you done this?


  • Registered Users, Registered Users 2 Posts: 6,265 ✭✭✭MiCr0


    works perfectly on my k800 on vodafone
    one thing - could you make the phone numbers linkable - ie
    <go href="wtai://wp/mc;XXXXXXXXXX">


  • Moderators, Technology & Internet Moderators Posts: 6,527 Mod ✭✭✭✭sharkman


    Very Nice ! Works great on my K850i .


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    MiCr0 wrote: »
    works perfectly on my k800 on vodafone
    one thing - could you make the phone numbers linkable - ie
    <go href="wtai://wp/mc;XXXXXXXXXX">


    Not sure if i can do that as what you are seeing is a Java MIDP form. It dont process html tags. "StringItem" is the object holding the text on the form. What I could try do is make a command to ring that number on the form, but it'd involve a bit of parsing on the midlet side of things.


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    Guys, monitor bandwith usage/costs. the plain text sent back is about on averag 0.3-0.8kb. Along with the url request and packet verification, this might bulk up to 1-1.5kb.

    Im not sure if WebServers to Mobile Java VM's over HTTP use compression/encoding like gzip,deflate in the same way your PC internet browser would when in a session with a web-server.


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    MiCr0 wrote: »
    works perfectly on my k800 on vodafone
    one thing - could you make the phone numbers linkable - ie
    <go href="wtai://wp/mc;XXXXXXXXXX">

    I have it now that when you list as cinema and there is a number available for it, you can call it by selecting the "Call" command"

    Im having trouble restoring the midlet after the call on my N73, it stays in a minimised state until you manually maximise it.

    JAR: http://damohere.freehostia.com/irlcg/IRLCinemaGuide.jar
    JAD: http://damohere.freehostia.com/irlcg/IRLCinemaGuide.jad


  • Registered Users, Registered Users 2 Posts: 1,120 ✭✭✭wheresmybeaver


    This works great on my Sony Ericsson T650i on O2 billpay. I'm a bit suspicious about the way that the T650 reports data usage in the Data Counter option, but using this app seems to amount to just under 3Kb, which is pretty good. Thanks, this is a great alternative to O2's suggestion of a €1.50 / month subscription to entertainment.ie :)


  • Advertisement
  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    cheers


  • Closed Accounts Posts: 4,842 ✭✭✭steveland?


    Hey man, happy to test it out. Sounds like a great app and avoids me having to find the cinema times on RTE all the time.

    Downloaded it there but am getting a HTTP 302 response on a Sony Ericsson K610i, 3Pay on 3 Ireland.

    I don't get the splash screen on any other app like GMail or Opera Mini so don't think this is the issue.

    Have you come across this 302 error before where the splash screen isn't the issue?

    Cheers


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    steveland? wrote: »
    Hey man, happy to test it out. Sounds like a great app and avoids me having to find the cinema times on RTE all the time.

    Downloaded it there but am getting a HTTP 302 response on a Sony Ericsson K610i, 3Pay on 3 Ireland.

    I don't get the splash screen on any other app like GMail or Opera Mini so don't think this is the issue.

    Have you come across this 302 error before where the splash screen isn't the issue?

    Cheers

    The 302 responce will only happen when you get the HTTP TEMP MOVED response which is what the webserver that 3's proxy is throwing you. I have made some comments regarding this in my firstpost. I dont experience this on my Nokia N73 on 3 but my friend who has a Sony Ericsson K800i on 3 does. Commander Vimes made a comment about it.


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    A friend confirmed it is working on:

    Sony Ericsson K850i
    Meteor PAYG




    http://damohere.freehostia.com


  • Closed Accounts Posts: 24 pop.1280


    Thanks for the great application - how does it work?


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    the midlet contacts a php script i made which parses out un-necessary data from the appropiate page from entertainment.ie


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    Sam Vimes wrote: »
    the answer is he has to call 3 and get them to update his account so he doesn't get that splash page anymore. java apps don't work properly with that setup. i used to have that but after three months of shouting at them they fixed it. the thing that seemed to finally work was telling them that java apps weren't working. a few hours later that splash screen was gone and java apps worked. until then i had just been saying the internet wasn't working and they kept fobbing me off


    edit: just to show that it nothing to do with the phone itself, you'll notice that if you swap sims with him, the SE will start working anf the n73 will stop


    I tried this, I put my sim card into my friends Sony Ericsson K800i, he still could not get the proper listings and got the 3 splash screen.

    I put his sim card into my Nokia N73, listing the cinema results worked as normal. This concludes now that its not specific to the to the users account. I have a feeling that its the way the JVM on the Sony Ericsson phones handle sessions.. granted if 3 didnt have the stupid proxy splash screen, we would never have this problem.


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    I tried this, I put my sim card into my friends Sony Ericsson K800i, he still could not get the proper listings and got the 3 splash screen.

    I put his sim card into my Nokia N73, listing the cinema results worked as normal. This concludes now that its not specific to the to the users account. I have a feeling that its the way the JVM on the Sony Ericsson phones handle sessions.. granted if 3 didnt have the stupid proxy splash screen, we would never have this problem.

    when i posted that i didn't realise that you normally get the splash page. you're right, it must be the way SE handles the data.
    I'm writing a J2ME app at the moment and i just tested the internet connection code with my 3 sim in a k800i (not 3 branded) and it worked. the code i used is:

    Connection connection = Connector.open ("http://google.com");
    StreamConnection streamConnection = (StreamConnection)connection;
    InputStream in = streamConnection.openInputStream();
    StringBuffer buf = new StringBuffer();
    while (true) {
    	i=in.read();
    	if (i==-1) break;
    	buf.append ((char) i);
    }
    in.close();
    streamConnection.close();
    

    is yours the same or is it doing something more complicated?

    btw, i never get the splash page with my 3 account so the fact that it works in my phone doesn't mean all that much


    and yes, if 3 didn't have the splash screen none of these problems would exist. remember you can always call them and try to get them to fix it if you think you have the patience. i got it fixed afer three months


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    I used HttpConnection. I will give StreamConnection class a run tommrow :)
    Its almost time to go home :D


    Note: 3 dont show the proxy splash for certain domains, google.com been 1 I think.
    ...
    ...
    HttpConnection httpConn = null;
    	   	InputStream is = null;
    
    	   	try {
    	   		//establish the connection
    	   		httpConn = (HttpConnection)Connector.open(sample);
    	   		httpConn.setRequestMethod(HttpConnection.GET);
    	   		httpConn.setRequestProperty("User-Agent","Profile/MIDP-2.0 Confirguration/CLDC-1.0");
    
    	   		int respCode = httpConn.getResponseCode();
    
    	   		if (respCode == HttpConnection.HTTP_OK) {
    
    	   			StringBuffer sb = new StringBuffer();
    	   			is = httpConn.openDataInputStream();
    	   			int chr;
    
    	   			//grab the data char by char
    	   			while ((chr = is.read()) != -1)
    	   				sb.append((char) chr);			
    				...
    				...
    			}
    
    
    			else {
    				//we did not get HTTP_OK (200) response, show alert,
    				 //response we get
    				//on some phones on 3 IRL you get 302 (HTTP_TEMP_MOVED)
    				...
    				...
    			}
    


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 83 ✭✭niallfullback


    Nice work!! Working perfectly for me here on Vodafone PAYG. Costs 1 cent to use it twice.


  • Registered Users, Registered Users 2 Posts: 18,962 ✭✭✭✭Mimikyu


    This post has been deleted.


  • Registered Users, Registered Users 2 Posts: 72 ✭✭crazy_spider


    Great app.. Works great on my Nokia 5500 on meteor PAYG.
    4cent per listing at peak and 1 cent for 2 listings off peak. Cheers.


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    I just noticed a bug in the parser, it doesnt handle numbers beginning with 1520 ??? ??? e.g Dublin, Cineworld.
    So in the midlet you didnt see the number, hence couldn't ring it. I'll fix this today.

    If anyone spots any more .. let me know, thanks.


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    New jar up.. fixes display issues you get on some phones after using the "Call" feature and returning to the app. e.g. Windows Mobile


    http://damohere.freehostia.com


  • Registered Users, Registered Users 2 Posts: 1,369 ✭✭✭Thephantomsmask


    Great app! Kudos to Damo


  • Advertisement
  • Moderators, Science, Health & Environment Moderators, Sports Moderators Posts: 24,144 Mod ✭✭✭✭robinph


    New jar up.. fixes display issues you get on some phones after using the "Call" feature and returning to the app. e.g. Windows Mobile

    http://damohere.freehostia.com
    What is the version number supposed to be on the new one now?

    The one I already have installed calls itself 0.11b.
    The web page says that it is 0.11b.
    The new .jar file once downloaded and about to be installed calls itself 0.01?


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    I havent changed the jar version, it was only a 2 line change.
    Just download the .jar from the hostj2me link and you'll have the latest jar.

    hostj2me has dodgy version handling


    I've updated the Manifest file so if you re-download it, you'll see v0.12
    You can ignore what ever version the hostj2me page says, there is no way to incrememt that..


  • Registered Users, Registered Users 2 Posts: 2,225 ✭✭✭wba88


    tested on vodafone n95 via wifi

    working excellently and very fast thank you damo2k


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    v0.13
    http://www.hostj2me.com/appdetails.html?id=5429

    Fixes display bug seen on some phones like Sony Ericsson W910i


  • Registered Users, Registered Users 2 Posts: 488 ✭✭Brianb8802


    Really cool app just downlaoded it. Will come in very handy.

    Just a bit of feedback, would be handy if you could save a few cinema listings. Just so you could check a few cinemas for times and not have to go back online while swapping between them.

    Thanks again


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 4,027 ✭✭✭flywheel




This discussion has been closed.
Advertisement