maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [BETA RELEASE] PhoneME Advanced (Java Mobile) (https://talk.maemo.org/showthread.php?t=81969)

[DarkGUNMAN] 2012-01-29 12:41

[BETA RELEASE] PhoneME Advanced (Java Mobile)
 
2 Attachment(s)
Background:
We have native versions of Java Standard Edition (Sun JSE Embedded / OpenJDK) to run desktop Java applications .

We could not run Java Mobile Editon apps/games (Opera Mini, Shazam etc) as you would find on other mobile phones, without MicroEmulator running on top of Java SE.
While this worked to an extent it did take a lot of CPU to run JavaSE, running a JavaME emulator, to run a Java ME app.

The ideal solution would be to have a native version of JavaME we can call from the command line like Java SE
.
PhoneME is the equivalent of this and has been around for a while, but compiling it is notoriously difficult, and there have been no working compiled versions of it available for N900 until now.
-------------

I have approached Davy Preuveneers who was behind the following builds for Android, Linux ARM and Windows Phone, and he has very kindly donated some time to create a Maemo/MeeGo version for the community.

Quote:

Originally Posted by DavyP (Post 1205938)
Just to clarify:
This is the main download website with "stable" builds:
http://davy.preuveneers.be/phoneme/?q=node/10#maemo
This is the website where I upload all my builds for testing by the
community, including "unstable" ones:
http://davy.preuveneers.be/phoneme/public/maemo/deb/
On this page, you also find older builds which could be useful to
identify between which two builds a new bug appeared.
Cheers,
Davy

Please download and test with N900 Fremantle, N9 Harmattan, and MeeGo CE / NEMO - any feedback in regard to bugs or performance issues with other mobile applications would be greatly appreciated.

sjw6234 2012-01-29 13:27

Re: [TESTING] PhoneME Advanced (prototype release) with Opera Mini 6
 
input method (mscim) not work

theonelaw 2012-01-29 13:57

Re: [TESTING] PhoneME Advanced (prototype release) with Opera Mini 6
 
ok, this might actually be really cool

thanks for sharing this

[DarkGUNMAN] 2012-01-29 15:05

Re: [TESTING] PhoneME Advanced (prototype release) with Opera Mini 6
 
Post updated with background information about JavaSE, JavaME and PhoneME, to explain which problem this solves for N900.

kolos 2012-01-29 19:56

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
[DarkGUNMAN], did you try to run Opera Mini v6.5? I tried and it crashes on start. I just replaced names of jar and jad files in opera.sh. I also tested v4.2 which works fine.

blackjack4it 2012-01-29 22:08

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Opera is working on my N900..by testing the examples included...Woow...it is very fast...I've tried to start Skebby.jar but it can't find a PlayerListener class :( any hints?
I've also tried to start Whatsapp jar but it says "Illegal Protocol" because it lacks of s40 nokia libs :(

HtheB 2012-01-29 22:50

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
what does ebuddy says? can anybody try it out? :)
would be fine to have a messneger client running on our N9/N950's (without having to sync all the contacts in our devices)

[DarkGUNMAN] 2012-01-29 23:03

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by kolos (Post 1157514)
[DarkGUNMAN], did you try to run Opera Mini v6.5? I tried and it crashes on start. I just replaced names of jar and jad files in opera.sh. I also tested v4.2 which works fine.

OM6.5 doesn't work on this test version as it needs addition jsr support. Thanks for testing it though. it is bloody quick :)

Android_808 2012-01-30 00:12

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
anyone tried shazam

[DarkGUNMAN] 2012-01-30 00:33

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
1 Attachment(s)
I've been asked to try and get a jar file working.
This method might work for other jar files for testing.. no guarantees since this just my own guessworkl

The command line for this is not as straightforward to get working, but reading the .sh files bundled with this it loads the modules before calling jar, then loads the main class.

The main class is named in the jar file.. this can be found by opening the jar file with a zip program.
Open 'META-MF/MANIFEST.MF' with a text editor
The file will look something like this:
Code:

Manifest-Version: 1.0
MIDlet-Vendor: Banka Koper
MIDlet-Version: 1.0.5
MIDlet-1: BankaIN,/icon_small.png,si.semantika.bkotp.j2me.BankaIn
MicroEdition-Configuration: CLDC-1.1
MIDlet-Name: BankaIN
MicroEdition-Profile: MIDP-2.0

The Midlet-1 line shows the icon used BankaIN,/icon_small.png, then a comma to separate the main class.. in this case si.semantika.bkotp.j2me.BankaIn
If you navigagte the file using a zip program you will find a file structure similar to this.

To get it working I edited the .sh file and saved a copy:
Code:

#!/bin/sh

$PWD/bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path=$PWD/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -suitepath /home/user/MyDocs/bankain.jar -1 si.semantika.bkotp.j2me.BankaIn2

If there are problems or errors with the midlet once launched will apper in the xterm. Should be able to close it using ctrl+c

[DarkGUNMAN] 2012-01-30 00:40

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by Android_808 (Post 1157616)
anyone tried shazam

Likely won't work yet since the jsr for sound isn't included. But it would still be usefull to try and launch it using the method shown above. Tnis is just my own guesswork here so if anyone else knows their way around java, the help would be appreciated.

ivgalvez 2012-01-30 08:31

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
This looks very promising, I have never used MicroEmulator as it was quite difficult to achieve good results.

imo 2012-01-30 09:11

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Will this support those WEB ADDRESSES which require java ?

GrimyHR 2012-01-30 09:15

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by imo (Post 1157727)
Will this support those WEB ADDRESSES which require java ?

why? you have oracle java 6/7 SE for that or open jdk...this is java ME

[DarkGUNMAN] 2012-01-30 09:16

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by imo (Post 1157727)
Will this support those WEB ADDRESSES which require java ?

No, web pages which require the java plugin are asking for JavaSE, and if I remember rightly only Firefox and Chromium have been modded to get java working in browser.:)
Do a quick search of the forum for other java related threads.

DavyP 2012-01-30 10:45

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Hi all,

I am the guy that made this phoneME Advanced build for Maemo.
I justed wanted to inform you about a new build I put online at:

http://davy.preuveneers.be/phoneme/public/n900/

This build has JSR-75 support (though not properly tested). This
should make Opera Mini 6.5 work.

ATM there is no other JSR support, so no audio/video/3d/gps.

I also enabled full-screen. I configured Ctrl+Up in the application
to toggle between full screen and normal. Rotation to portrait
mode will probably not work.

To run other midlets, you need to copy and modify one of the
scripts. You can leave out the [-jadpath jadfile] switch, but you do
need to know the main class of the midlet (there can be multiple,
have a look at which ones are listed in the jad file).

You cannot use this VM to run java applets or whatever in a
browser.

There are still some bugs in there. The keyboard/pointer events
from Maemo/Qt4 need to be mapped on those that phoneME
understands, and the way it is currently implemented will cause
some issues when you run two midlets concurrently.

Before you all start launching features requests :-), I would like to
point out that my spare time is limited and I even don't have a
N900/N950/N9 device so I have no way of testing my builds on a
real device. I am using the MADDE emulator to test my build, but
it does have its limitations. For example, performance issues are
hard to detect and not all features can be emulated. Nonetheless,
your feedback on this forum is much appreciated and I hope you
find the builds useful.

Cheers.
Davy

ivgalvez 2012-01-30 10:58

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by DavyP (Post 1157771)
Hi all,

I am the guy that made this phoneME Advanced build for Maemo.
I justed wanted to inform you about a new build I put online at:

http://davy.preuveneers.be/phoneme/public/n900/

This build has JSR-75 support (though not properly tested). This
should make Opera Mini 6.5 work.

ATM there is no other JSR support, so no audio/video/3d/gps.

I also enabled full-screen. I configured Ctrl+Up in the application
to toggle between full screen and normal. Rotation to portrait
mode will probably not work.

To run other midlets, you need to copy and modify one of the
scripts. You can leave out the [-jadpath jadfile] switch, but you do
need to know the main class of the midlet (there can be multiple,
have a look at which ones are listed in the jad file).

You cannot use this VM to run java applets or whatever in a
browser.

There are still some bugs in there. The keyboard/pointer events
from Maemo/Qt4 need to be mapped on those that phoneME
understands, and the way it is currently implemented will cause
some issues when you run two midlets concurrently.

Before you all start launching features requests :-), I would like to
point out that my spare time is limited and I even don't have a
N900/N950/N9 device so I have no way of testing my builds on a
real device. I am using the MADDE emulator to test my build, but
it does have its limitations. For example, performance issues are
hard to detect and not all features can be emulated. Nonetheless,
your feedback on this forum is much appreciated and I hope you
find the builds useful.

Cheers.
Davy

Your efforts are highly appreciated, I hope someone could help you pushing this project.

et3rnal 2012-01-30 11:42

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by DavyP (Post 1157771)
Hi all,

I am the guy that made this phoneME Advanced build for Maemo.
I justed wanted to inform you about a new build I put online at:

http://davy.preuveneers.be/phoneme/public/n900/

This build has JSR-75 support (though not properly tested). This
should make Opera Mini 6.5 work.

ATM there is no other JSR support, so no audio/video/3d/gps.

I also enabled full-screen. I configured Ctrl+Up in the application
to toggle between full screen and normal. Rotation to portrait
mode will probably not work.

To run other midlets, you need to copy and modify one of the
scripts. You can leave out the [-jadpath jadfile] switch, but you do
need to know the main class of the midlet (there can be multiple,
have a look at which ones are listed in the jad file).

You cannot use this VM to run java applets or whatever in a
browser.

There are still some bugs in there. The keyboard/pointer events
from Maemo/Qt4 need to be mapped on those that phoneME
understands, and the way it is currently implemented will cause
some issues when you run two midlets concurrently.

Before you all start launching features requests :-), I would like to
point out that my spare time is limited and I even don't have a
N900/N950/N9 device so I have no way of testing my builds on a
real device. I am using the MADDE emulator to test my build, but
it does have its limitations. For example, performance issues are
hard to detect and not all features can be emulated. Nonetheless,
your feedback on this forum is much appreciated and I hope you
find the builds useful.

Cheers.
Davy

Thanks thanks thanks heaps man love ya :D

hope to see positive feedbacks from testers, hopefully we'll be able to run shazam & whatsapp soon :p

what about you open donations for this project to get yourself the awesome N9 ;)

thanks again

[DarkGUNMAN] 2012-01-30 12:07

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
2 Attachment(s)
Hi Davy,
I don't know what you did with this build but it definitely runs faster than the first one :)

Full screen mode - screen is redrawn once a text entry box is clicked, after that it works fine.
Scrolling is smoother, BBC page included as per the last test.
No keyboard problems found.

I see Filesystem access is enabled in this build as well..
Where does PMEA create the configuration settings for Opera after it has finished installing? I may need to add a symlink to the MyDocs folder and SDCard

Very nice work :)

DavyP 2012-01-30 12:56

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by et3rnal (Post 1157808)

what about you open donations for this project to get yourself the awesome N9 ;)

The N9 does seem nice. I don't know if my build for Maemo would
also work on this device (MeeGo compatible?). I would not want to
spend 485 EUR on this device for testing purposes if it would be
completely incompatible.

I appreciate the donation suggestion and the support. Although I
do have a PayPal account, I never put a donate link on my
phoneME website in the past because I wanted to avoid any
obligation on my part and endless discussions with people
expecting me to fix bugs/add features/buy the device asap
because they donated 10 EUR/$.

Of course, I know there are also a bunch of people who just want
to say thanks and buy me a beer :-)

Davy

DavyP 2012-01-30 13:13

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by [DarkGUNMAN] (Post 1157819)
Full screen mode - screen is redrawn once a text entry box is clicked, after that it works fine.

Weird, I don't have to do this on the MADDE emulator.

Quote:

Originally Posted by [DarkGUNMAN] (Post 1157819)
Where does PMEA create the configuration settings for Opera
after it has finished installing? I may need to add a symlink to the
MyDocs folder and SDCard

Midlet configuration information and PIM data are usually stored
in one of the subfolders of:

/home/developer/phoneme/midp/midp_linux_fb_gcc/appdb

Davy

geneven 2012-01-30 13:59

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Opera and microemo-demo worked fine on my N900, impressive speed. I didn't test much.

[DarkGUNMAN] 2012-01-30 15:27

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Link to thread on forum.meego.com to follow feedback from meego community.

http://forum.meego.com/showthread.php?t=5653

kolos 2012-01-30 15:48

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
1 Attachment(s)
DavyP, is it possible to change code page to Central and East European Latin (Windows-1250 or ISO-8859-2)? Some characters are missing in Slovenian OperaMini.

kolos 2012-01-30 17:07

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
5 Attachment(s)
I found these dictionaries and tested English-Croatian 0.61n MIDP-2.0 Max which works quite fine with stylus. :)

my .sh file
Code:

#!/bin/sh

$PWD/bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path=$PWD/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -suitepath /home/user/MyDocs/KODi_ENG-HRV_v0.61n_MIDP2.0_FULL.jar -jadpath /home/user/MyDocs/KODi_ENG-HRV_v0.61n_MIDP2.0_FULL.jad -1 MainCl


DavyP 2012-01-30 18:20

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
This is not a code page issue, but a font issue. The phoneME VM is only able to draw a certain subset of characters because it uses a builtin font bitmap with those character to draw them. It is actually a bit more complicated: the font bitmap is first converted into C code that draw these characters as fast as possible. This C code is compiled directly into the VM, so not easy to replace, and it is not possible to convert all characters this way due to the huge amount of code it would generate.

I would need to rewrite the text drawing routines to use Qt4's backend rather then the built-in techniques. This is not straightforward to get right, because when done wrong it could significantly affect the text rendering performance.

Some midlets come with their own text rendering techniques. The Opera Mini 4.2 in the above screenshots and the dictionary application seem to be two examples. They circumvent the text drawing routines by drawing everything themselves on a midlet Canvas or GameCanvas.

So yes, I am aware of the issue, and when I have time I will look into it.

Davy

[DarkGUNMAN] 2012-01-30 18:22

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Note: ROTATION does work, as well as full screen. Requires going into a text entry screen where there is a very brief green flash before appearing the correct size and orientation.

Screenshots to follow when I get home

Arthuro_Adam 2012-01-30 19:08

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
I tried with an N9, but it doesn't work for me.

I copied the files to the root directory (/phoneme) then I tried to launch opera.sh but permission denied.

What did I wrong?

freemangordon 2012-01-30 19:48

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
@DavyP - can't believe how fast is opera, thanks a lot man. There is a little problem though - JVM segfaults on exit.

EDIT:
segfault happens only when started under root account.

[DarkGUNMAN] 2012-01-30 20:53

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by Arthuro_Adam (Post 1158035)
I tried with an N9, but it doesn't work for me.

I copied the files to the root directory (/phoneme) then I tried to launch opera.sh but permission denied.

What did I wrong?

If you extracted to root folder as root, your user account probably won't have rights over it.

I'd recommend extracting it to your $HOME folder instead. Don't know what it is on the N9, but MeeGo CE is /home/meego. Create a /home/meego/phoneme folder and try it there.

You may have to set permissions on the folder as well.

DavyP 2012-01-30 21:17

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by freemangordon (Post 1158052)
@DavyP - can't believe how fast is opera, thanks a lot man. There is a little problem though - JVM segfaults on exit.

EDIT:
segfault happens only when started under root account.

I can explain the segfaults. phoneME was never meant to be
compiled as a library. I did so anyway to simplify the compilation
process, and created a frontend application in Qt4 that:
1) dynamically loads this library through dlopen()
2) uses dlsym() to find cvm's original main() method
3) starts a new thread and
4) calls the original cvm's main() method

The thing is that the either the Qt4 frontend or the cvm's thread
can clean up and call exit() while the other part is still busy,
causing a segfault. This should not happen while the application
is running, only when you end the application.

Not sure though why this only happens under root.

Davy

DavyP 2012-01-30 21:27

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by Arthuro_Adam (Post 1158035)
I tried with an N9, but it doesn't work for me.

I copied the files to the root directory (/phoneme) then I tried to launch opera.sh but permission denied.

What did I wrong?

Did the unpacking succeed? Does the opera.sh script have
execute permissions? Perhaps you unpacked the tgz archive with
a tool that does not preserve execute permissions? Try the
following command in /phoneme:

chmod a+x opera.sh
chmod a+x test.sh
...

do this for all scripts

Also set the execute permission for the cvm binary:
chmod a+x bin/cvm

You can try to run a console application:
bin/cvm -cp testclasses.zip Test

or

./test.sh

I hope this helps.

Davy

munozferna 2012-01-31 01:39

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
It works on the N9 :)

http://beford.org/ole/20120130202915.png

Arthuro_Adam 2012-01-31 06:29

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by DavyP (Post 1158079)
Did the unpacking succeed? Does the opera.sh script have
execute permissions? Perhaps you unpacked the tgz archive with
a tool that does not preserve execute permissions? Try the
following command in /phoneme:

chmod a+x opera.sh
chmod a+x test.sh
...

do this for all scripts

Also set the execute permission for the cvm binary:
chmod a+x bin/cvm

You can try to run a console application:
bin/cvm -cp testclasses.zip Test

or

./test.sh

I hope this helps.

Davy

Thanks, after I ran chmod, it works.

I live in Hungary, so I have the same problem, than the Slovenian member, the program haven't every character, and there is a grey line on the bottom.

Thanks for your work, it's a great progress, I hope there will be a solution for the problems above.

Joseph9560 2012-01-31 07:37

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Awesome, unexpectedly fast! Great job, thanks a lot for your great effort. I hope you would be able to manage more time for the app!

DavyP 2012-01-31 07:42

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Great to hear that the build also works on the N9. I am aware of the font issues.

Can you confirm this grey bar issue with other midlets as well?
Try ./microemu-demo.sh

If so, then I am afraid this is an N9 specific issue, which I unfortunately cannot reproduce at the moment without a real device.

Thanks for testing.

Davy

et3rnal 2012-01-31 08:22

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by DavyP (Post 1158228)
Great to hear that the build also works on the N9. I am aware of the font issues.

Can you confirm this grey bar issue with other midlets as well?
Try ./microemu-demo.sh

If so, then I am afraid this is an N9 specific issue, which I unfortunately cannot reproduce at the moment without a real device.

Thanks for testing.

Davy

Now you need an N9 :p " u'll <3 it "
if your work leads us to run WhatsApp i can guaranty you a lot of beers :D

imo 2012-01-31 08:25

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
thanks a lot ,appreciated your efforts . Its a great experience !

Estel 2012-01-31 10:16

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by et3rnal (Post 1158243)
Now you need an N9 :p " u'll <3

I would just like to remind all N9 fanboys, that applications for harmattan got separate forum part, and there is another topic with feedback from harmattan community about this particular program (PhoneME).

So, please, keep this thread clear from harmattan trash.

/Estel

vi_ 2012-01-31 10:54

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Lol@Harmattan trash.

DavyP, if we had a whip around to get you an n900 to develop on, would you accept?


All times are GMT. The time now is 07:33.

vBulletin® Version 3.8.8