Author Topic: NETWEBEND not work on Pre2  (Read 3007 times)

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1594
    • View Profile
    • AMpostata Website
NETWEBEND not work on Pre2
« on: 2012-Mar-22 »
ALLOWESCAPE TRUE

PRE2: The app is closed and the browser is not opened.

TP: The app is closed and the browser opens.

ALLOWESCAPE FALSE

PRE2: The app ignores the netwebend command.

TP: The app is sent back and browser opens.

Notice that I installed always the very same ipk file.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10708
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: NETWEBEND not work on Pre2
« Reply #1 on: 2012-Mar-28 »
There was a memory issue. Do you allocate/load a lot of stuff before this? Then try to release it before the call to NETWEBEND.
I'm really sorry. What does the stdout print for you?

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1594
    • View Profile
    • AMpostata Website
Re: NETWEBEND not work on Pre2
« Reply #2 on: 2012-Mar-28 »
Not sure, it load only around 10-12 sprites, being 2 of them around 1024 pixels. When the app starts, it loads the sprites and display a wait-10-seconds msg. If you touch the screen, it runs "netwebend...", so really no program is really run (im talking about Glowing Sky demo)

Will do more tests later.

Also, in my app DIGITAL PHOTO FRAME there is a "bug" that only appears in the webos version.

The app will crash with no apparent reason after a few hours. I did a few tests and a custom log-file, but the crash point was not in any remarkable place (it was not in the loading routine).

I had also the bug and minimized it if I disable over-clocking; a displayed photo was shown for n seconds, so I inserted a "sleep 50" in the "delay loop" to minimize cpu usage; in the end I though it was a temperature thing. But some users report it, and one of them had very early crashes (half hour), and said me that the time was longer if he had no other apps opened, so he assumed there was a memory leak somewhere.

Notice that my TouchPad can run DFP forever in Android mode.

(I can not use webos stdout, as my devices/computer refuses to use it).
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
Re: NETWEBEND not work on Pre2
« Reply #3 on: 2012-Mar-29 »
Not sure if this should be in a separate forum thread but, I also have a problem with NETWEBEND on Android.

I use NETWEBEND with to open the Android Market app. This works and it opens Market and goes to the specified app page. However, when I then close the Market-app, my GLBasic app seems to be hanging. It still shows the screen as it was at the time of the NETWEBEND but the app doesn't react to anything.

So my code is like this:
Code: GLBasic [Select]
AUTOPAUSE FALSE

//..

NETWEBEND "http://play.google.com/store/apps/details?id=com.rovio.angrybirds"

//..

SUB GLB_ON_QUIT:
  SaveSettings()
ENDSUB
 

This is what happens, I think something goes wrong in step 3:
1) When the user presses a button in my app, the app calls NETWEBEND with the URL.
2) an AndroidOS popup appears, asking wether to open in browser or Play-store (this is as expected).
3) While the pop-up shows, you see in the background my GLB app re-starts, as if it is closed and then immediately started again
4) User selects Play-store to open the URL
5) User closes Play-store app
6) GLB app is still running but hangs and doesn't react

I don't allocate/load a lot of graphics or sound or anything like that just before the NETWEBEND. Btw you could also use "market://details?id=com.rovio.angrybirds" as URL to open the Android Market app directly without a popup appearing, but this still hangs the GLB app. I've already uploaded the app here Break The Code Lite (it's a sort of a test app). It happens with the Full Version button which opens an app-page that doesn't exists yet. (btw the button on the title screen uses market:// and the button on the settings screen uses http://)
« Last Edit: 2012-Mar-29 by BdR »

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1594
    • View Profile
    • AMpostata Website
Re: NETWEBEND not work on Pre2
« Reply #4 on: 2012-Mar-29 »
GLB apps on Android can not be sent to background and front (as in iOS). Once the app is sent to background, it crashes and had to be re-launch again. This has been since the beginning.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10708
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: NETWEBEND not work on Pre2
« Reply #5 on: 2012-Mar-29 »
try using
Code: GLBasic [Select]
autopause false
allowescape true
netwebend url$
end
// paranoia
INLINE
*(int*)0=0;
ENDLINLINE
// /paranoia
 

on android.

MrTAToad

  • Guest
Re: NETWEBEND not work on Pre2
« Reply #6 on: 2012-Mar-29 »
I find that minimising and restoring an Android program up to 3 times works okay - any more after that and the program hangs/stops responding...

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
Re: NETWEBEND not work on Pre2
« Reply #7 on: 2012-Apr-10 »
try using
Code: GLBasic [Select]
autopause false
allowescape true
netwebend url$
end
// paranoia
INLINE
*(int*)0=0;
ENDLINLINE
// /paranoia
 

on android.
With this extra END and "*int*0" thingy, the GLB app still crashes but then after the user closes the external Android Market app, the GLB app is somehow restarted automatically. I *think* this is due to the extra END command, although maybe it's some AndroidOS feature? I don't know.. :doubt: When you view the taskmanager on Android after the NETWEBEND, you see the started task (android market) but also the GLB app in red, meaning that it has crashed.

So it's still not pretty, but for the average user I guess the immediate restart is workable, I mean at least he doesn't see the frozen screen of the crashed app. I tested on a Samsung  Galaxy S2 with android 4 btw.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10708
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: NETWEBEND not work on Pre2
« Reply #8 on: 2012-Apr-12 »
GLBasic V11 will support the multitasking feature of Android. It worked last night, but somehow the grahpics driver was corrupted after a few tries. I'll have to see if it's just the crappy CM7 or my problem.

MrTAToad

  • Guest
Re: NETWEBEND not work on Pre2
« Reply #9 on: 2012-Apr-12 »
It won't be your problem  =D