Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 11 total
Thread Phonegap and compression
Thu, May 4 2017 3:56 AMPermanent Link

Uli Becker

Hi,

I use Phonegap to create an Android app from an EWB project.
Works fine, but on older phones it takes quite a long time to load the app.

I don't know what Phonegap does with my EWB app, but: does it make any
sense to use a compressed output in EWB? I don't think so, but just want
to be sure.

Thanks Uli
Thu, May 4 2017 4:20 AMPermanent Link

Matthew Jones

Uli Becker wrote:

> does it make any sense to use a compressed output

I think I'd say yes. Saves load time, probably saves parse time, and will take less memory overall. When I did my PhoneGap app, the main thing I did to speed it up was load an HTML page with a redirect to the real application page. PhoneGap reported it as a fast load, the users sees a nice display "instantly", and it takes the pressure off.

--

Matthew Jones
Thu, May 4 2017 5:32 AMPermanent Link

Uli Becker

Matthew,

> I think I'd say yes. Saves load time, probably saves parse time, and will take less memory overall.

As I said: no idea what PhoneGap does with the EWB code. I tried the
compressed output but couldn't see a difference in loading time of the
PhoneGap app.


> When I did my PhoneGap app, the main thing I did to speed it up was load an HTML page with a redirect to the real application page. PhoneGap reported it as a fast load, the users sees a nice display "instantly", and it takes the pressure off.

That's interesting, but:
Probably I'm missing something: I tried that (and the PhoneGap app just
launches a browser with the real application page.

Thanks Uli



Thu, May 4 2017 5:57 AMPermanent Link

Matthew Jones

Well it is a while since I did this, so maybe things have changed. This is the index.html that I used:

<!doctype html>
<html>
<head>
  <title>Loading Interact HE...</title>
  <script>
    window.location='./poll123.html';
  </script>
 <body>
    <p>Loading Interact HE...</p>
 </body>
</html>

And checking, the EWB output was compressed.


--

Matthew Jones
Thu, May 4 2017 6:09 AMPermanent Link

Uli Becker

Matthew,

> Well it is a while since I did this, so maybe things have changed. This is the index.html that I used:
>
> <!doctype html>
> ...
> </html>
>

That's about the same I did, but as I said before: the app just launches
the browser with the EWB site. Does that work different in your app?

> And checking, the EWB output was compressed.

Sure, if you load the original site, but that's a different thing. The
question is: does it make sense to compress the output if PhoneGap
compiles an Android app from that.

Just to clarify: I use PhoneGap build (online).
https://build.phonegap.com/

Uli



Thu, May 4 2017 7:37 AMPermanent Link

D.C.

>Sure, if you load the original site, but that's a different thing. The
>question is: does it make sense to compress the output if PhoneGap
>compiles an Android app from that.

>Just to clarify: I use PhoneGap build (online).
>https://build.phonegap.com/

Hi Uli,
Despite it should improves the load time with compression, it helps to protect your code because of the obfuscation. An apk is just a compressed file, try to open your compiled app with 7zip or another compression tool.

Regards
Diego
Thu, May 4 2017 8:07 AMPermanent Link

Uli Becker

Hi Diego,

> Despite it should improves the load time with compression, it helps to protect your code because of the obfuscation. An apk is just a compressed file, try to open your compiled app with 7zip or another compression tool.

Since I'm quite new to PhoneGap and have never worked with Android apps,
that's an interesting info.

As of Matthew's post: maybe you know how to open a site in the
InAppBrowser of the App. Whatever I tried: the redirection is always
opened outside the app. (InAppBrowser plugin seems to be installed
according to the apk-content).

Thanks Uli
Thu, May 4 2017 8:14 AMPermanent Link

Matthew Jones

They didn't have fancy online builds in my day... (2013 FWIW!)

Perhaps you should explain the setup you have more? I have a config.xml which has <content src="index.html" /> as a line. That's the file that loads first, and then loads my EWB output file.

"Just launching the site" is sort of right, assuming you mean loading it on the phone. It shouldn't be loading anything from the web. I have a \assets\www folder in which all the html and .js and images etc are going.

I presume you are not in a test mode where it is loading from the web, or updating from it or something?

Maybe I should back out, not being up with the latest tools.

--

Matthew Jones
Thu, May 4 2017 8:34 AMPermanent Link

Uli Becker

Matthew,

> They didn't have fancy online builds in my day... (2013 FWIW!)

I see - yeah, that's very comfortable now. Smile
>
> Perhaps you should explain the setup you have more? I have a config.xml which has <content src="index.html" /> as a line.

Sure, that's what I have.
I just tried to replace "index.html" by the real URL
"http://www.xxx/index.html".
That works and the site is opened within the app's WebView.

Actually loading is slower by using this way and that's what I wanted to
check out.

Thanks Uli
Thu, May 4 2017 9:00 AMPermanent Link

Matthew Jones

Uli Becker wrote:

> I just tried to replace "index.html" by the real URL "http://www.xxx/index.html".

You'd be completely defeating the point of PhoneGap if you did that for real, but it proves the point!

--

Matthew Jones
Page 1 of 2Next Page »
Jump to Page:  1 2
Image