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)

pepitoe 2012-03-05 21:43

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
I managed to eventually find the problem with the app I posted about earlier. It had some language definitions in the .jad file and one of these had a tab instead of a space which phoneme didn't seem to like, although it worked like that on the N8. I don't know whether that is something that is technically against spec but is permitted in some implementations.

The only slight issues I have now is that the menus in the app are a little small to be touch friendly, and I would prefer if the keyboard automatically appeared when the field was selected or was permanently shown.

DavyP 2012-03-05 22:08

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

Originally Posted by DavyP (Post 1174864)
Thanks for the help. I found this on another website,

http://www.mynokian900.com/2011/03/p...r-maemo-5-cssu

but I don't have these options, only:
-Clock & Alarms
-Profile
-Internet connection
-Bluetooth
-USB connected

I guess I need to install a package called status-area-orientationlock-applet to enable this feature

Davy

OK, I got it working now, but only with the option forcerotation=1.
I actually think during my previous attempts I rotated the device in
the wrong direction (causing it to stay in landscape mode).

Davy

DavyP 2012-03-05 22:27

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

Originally Posted by pepitoe (Post 1174872)
I managed to eventually find the problem with the app I posted about earlier. It had some language definitions in the .jad file and one of these had a tab instead of a space which phoneme didn't seem to like, although it worked like that on the N8. I don't know whether that is something that is technically against spec but is permitted in some implementations.

The only slight issues I have now is that the menus in the app are a little small to be touch friendly, and I would prefer if the keyboard automatically appeared when the field was selected or was permanently shown.

Nice catch. Not sure what the spec says, but I used the manifest
parser to read the contents of jad files. Also, some lines seem
to be longer than 72 characters. Normally these lines would be
wrapped.

I have been looking into hooking up the native virtual keyboard,
but I have not been able to get it properly working yet.

Davy

Arthuro_Adam 2012-03-06 20:32

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
I tried the latest build on N9. It's great, it didn't overwrite Opera Mini, so all settings remain. It works properly in portrait mode too.
One thing is missing: usage of accelerometer. If you want to change between portrait and landscape mode you have to do it in the settings.

Thanks for your work.

DavyP 2012-03-06 21:30

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

Originally Posted by Arthuro_Adam (Post 1175452)
I tried the latest build on N9. It's great, it didn't overwrite Opera Mini, so all settings remain. It works properly in portrait mode too.
One thing is missing: usage of accelerometer. If you want to change between portrait and landscape mode you have to do it in the settings.

Thanks for your work.

Thanks for testing

Yes, I agree. On the N900, the auto-rotation happens out of the
box with the latest software upgrades and if you force allow
rotation for all devices. If you rotate your device, the Qt4 window
gets a window resize event which I then interpret to force
re-render the midlet in the new display size.

I have no idea whether auto-rotation works out of the box for all
other applications on the N9, and whether you need to modify
your application to support this. However, while it is technically
possible to monitor the accelerometer, I do think that auto-rotation
is a feature that MeeGo should handle (through passing events to
the applications), and not every application on its own.

Cheers,
Davy

DavyP 2012-03-06 23:39

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
I did some investigation, and it seems that Qt4 applications based on
QWidget() don't auto-rate on MeeGo. Unfortunately, that is what I use.

So, for auto-rotation to work on the N9, the UI front-end needs to be
rewritten using the MeeGo Touch APIs.

Davy

Arthuro_Adam 2012-03-07 07:43

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Thanks, so for autorotation, we have to find somebody, who can rewrite the UI front-end?

freemangordon 2012-03-07 07:51

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

Originally Posted by DavyP (Post 1175574)
I did some investigation, and it seems that Qt4 applications based on
QWidget() don't auto-rate on MeeGo. Unfortunately, that is what I use.

So, for auto-rotation to work on the N9, the UI front-end needs to be
rewritten using the MeeGo Touch APIs.

Davy

Well, no idea how it is on Harmattan, but judging from my experience with Qt on Maemo5, one should listen to QDesktopWidget::resized signal and decide on current orientation. You have CSSU with forced rotation enabled, so h-d rotates applications no matter if they want to be rotated. Don't rely on that. The correct way is:

in you MainWindow::MainWindow() you should:

Code:

    setAttribute(Qt::WA_Maemo5AutoOrientation, true);
    connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged()));

and in orientationChanged() slot

Code:

    QRect screenGeometry = QApplication::desktop()->screenGeometry();
    setUpdatesEnabled(false);

    if (screenGeometry.width() > screenGeometry.height())
    {
        /* Do landscape stuff */
    }
    else
    {
        /* Do portrait stuff */
    }
    setUpdatesEnabled(true);


DavyP 2012-03-07 08:12

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

Originally Posted by freemangordon (Post 1175706)
Well, no idea how it is on Harmattan, but judging from my experience with Qt on Maemo5, one should listen to QDesktopWidget::resized signal and decide on current orientation. You have CSSU with forced rotation enabled, so h-d rotates applications no matter if they want to be rotated. Don't rely on that. The correct way is:

in you MainWindow::MainWindow() you should:

Code:

    setAttribute(Qt::WA_Maemo5AutoOrientation, true);
    connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged()));

and in orientationChanged() slot

Code:

    QRect screenGeometry = QApplication::desktop()->screenGeometry();
    setUpdatesEnabled(false);

    if (screenGeometry.width() > screenGeometry.height())
    {
        /* Do landscape stuff */
    }
    else
    {
        /* Do portrait stuff */
    }
    setUpdatesEnabled(true);


I do it a bit differently. I actually don't care if I am in landscape or
portrait mode. If I just get informed after rotation, that the window
width and height has changed, that is all I need.

Based on what I have read, it is a limitation of pure Qt4 on MeeGo.
The MeeGo SDK has APIs that are somewhat similar to Qt4. I
might have a go at implement it myself, but have no way to test
auto-rotation with the emulator so you guys could give me a hand
with that.

Davy

freemangordon 2012-03-07 08:22

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

Originally Posted by DavyP (Post 1175714)
I do it a bit differently. I actually don't care if I am in landscape or
portrait mode. If I just get informed after rotation, that the window
width and height has changed, that is all I need.

Based on what I have read, it is a limitation of pure Qt4 on MeeGo.
The MeeGo SDK has APIs that are somewhat similar to Qt4. I
might have a go at implement it myself, but have no way to test
auto-rotation with the emulator so you guys could give me a hand
with that.

Davy

And my code is an example for how to get this information in the correct way on Maemo5, relying on hildon-desktop force-rotation option is a hack. Would you mind to share how exactly you are doing it now?


All times are GMT. The time now is 10:31.

vBulletin® Version 3.8.8