How to test the performance of an Android phonegap-app - android

i made a little nice app with phonegap and mgwt.
Now i want to do the same app with jquery mobile and to compare the mgwt app with the jquery mobile app.
I want to compare the size and the performance of the both apps.
For example the speed of the change from one view (or side) to the next view (side).
Is this possible to test the speed with a stopwatch for example?
How could i do this testings?
Does i need an android phone or is it better to test it in a desktop browser?
How to test the performance and which tools are needed?
Please help.

One option you can use is Traceview. Here in this blog post you can see a method to measure the time of events in a phonegap application.
I hope it helped

You could use the Browsers DeveloperTools (Firebug, Chrome DevTools, Safari Web Inspector) to measure the performance of the different apps.
With Safaris Web Inspector it is possible to measure the performance of an Phonegap app running on a real device. see Safari Docs It can connect to the browser on the iOS device and also to WebViews used by an app, e.g. when it uses PhoneGap.
For Android you can use Weinre to get the Web Developement Tools for an app that is running on a device.
The Web Developer Tools offer a lot of possibilities to look at your Application e.g. inspect your DOM Elements, Resources, Network Traffic, Console and also to profile your app. You can call console.profile() to start profiling and end it with console.profileEnd(). So this would e.g. be an easy way to measure how long a function is executed.

In case of jQuery Mobile and only jQuery Mobile you can use this js script: https://github.com/jquery/jquery-mobile/blob/master/tools/page-change-time.js
At the bottom of my other article: https://stackoverflow.com/a/14469041/1848600 you will find how to use it.

Related

iOS and Android App Shell for website - What technology works best? WebView? Progressive App?

What is the proper way to have an app shell that simply loads a website. and properly handles orientation, etc?
We are releasing our app in a fragmented roll out - We have our mobile website completed, but require a native app to download, we will be swapping the 'guts' of our app in a few months with proper native code, so want to simply open the website up if people download our app for now
I found stuff like this
https://developers.google.com/web/fundamentals/codelabs/your-first-pwapp/
I also know that a webview can be used, but is that the proper way to do that?
For iOS, WKWebView is definitely the way to go moving forward after iOS 8.0 with its technology almost similar to Safari's Web View Controller. It is highly customizable and you may want to check out the documentation here to learn more.

How to make android application for responsive website

I am having mobile compatible website, it is highly responsive and do all what I need in mobile.
I just like to have an android/ios application, either it can represent my website as container.
Do we have any tool for the same. Is there any way to achieve it, as I do not want to use any mobile hardware like camera, geolocation and any other.
If any container of android or ios can provide a simple interface by opening my site in it, it will be a great option.
Kindly share your view on the same.
Have a look at this article about layouts.
A mobile application provides a different user experience than a mobile website. In your case if you don't want to use the mobile version of your site in the browser, then you need to create an application with a native UI.
For Android:
In my opinion, you should consider using the Empty Activity template from Android Studio to add a WebView inside it that will point to your website.
For iOS:
Seems like iOS Dev kit has the same kind of view.
For Windows Universal Apps:
Their Dev Kit has it as well.
Alternative:
If you feel more comfortable with web technologies, you can consider using Apache Cordova to build a mobile app from web sources.
Conclusion
All the native solutions presented are not that hard to implement (Less than a few hours), they just need you to play a little bit around with the native developing.
Cordova, the web-to-mobile solution, would also need you to play around with it.
Happy mobile developing !

native app using url in cordova/phonegap HTML5 performance

So we're developing using NodeJS, angular, html5 and all that jazz. But we want to have a more native app experience. So we're going to use ionic. However, instead of building the app as a local app and pulling in the data we want, they've decided to just build a web app and point the native app to the wep apps url.
So it's a glorified browser that looks like a native app.
Do we lose the ability to harness the devices hardware? Such as hardware acceleration and access to the devices tools like the camera. If you could provide a link to an article detailing the cons of this approach, that would be fantastic.
#Chauncey, If you are using phonegap, you are a liberty to use any of the hardware devices you have permission to use, as long as you have the plugins loaded.
However, both Google Play and Apple iTunes frown on having Apps that are just glorified browser. There is another misconception. Phonegap Apps can have as much look and feel as native Apps. With Ionic and others, those things are done for you, and hidden from you. So with Ionic, your native look and feel is only as good as Ionic gives you.
Oh, and your request for for links to articles lgtfy --Jesse
Pointing on an external URL is not a good idea.
A mobile app should have all images/css/scripts on device in order to shrink network access.
That you want to do will be really slow and does not offer a good user experience. In this way, your application can be rejected by Apple when you will submit it to AppStore.
Cordova/Phonegap needs to run some scripts at start and then raises events. You can't use device specific hardware before that. And if you redirect the main frame to an URL, you will overwrite these scripts ...

mobile simple application, drag and drop

i didn't want to ask a question, but i don't have any solution at all.
i've not seen such a kind of problem. i decided to write applications on mobile platforms (android and iOS), but nothing found.
lots of tutorials and documentations
lots of samples
lots of libraries and frameworks
but nothing found... i'm fed up, still looking for difference between mobile web application and desktop. i wanted to write simple drag and drop calculator, searched and found phonegap + jQM. first, i installed eclipse + ADT + cordova and created project. when i started writing, i decided to use jQuery (cause i needed drag and drop effects), and suddenly found that i needed applaud plugin and so on... as i understand applaud app and native phonegap app are differenet. when i searhed, i found that phonegap + jQM are web apps and needed NET to start application. I don't want to write web app, i only want 3 - 4 line to undestand what' going on... what is difference between web and client app in mobile and how i can write simple drag and drop calculator NOT WEB. i'm really fed up with these tutorials and documentations, i only need correct starting way and then i will do myself. damn, i'm tired...
A web app is an HTML5, JavaScript, CSS app running in a mobile browser typically published on a web server but can be run locally on a device without a network connection in some cases.
A native app is downloaded and installed on the mobile device and must be published to an external app store of some sort. There are also hybrid apps that combine both characteristics.
Native and hybrid apps have more complete access to the device platform and can be more performant than web apps but require more specialized language skill (Objective C, Java, C#).
Web apps can be as simple as a web site displayed on a mobile device and require much more broadly utilized skills such as HTML, JavaScript, and CSS.
The requirements of your drag and drop calculator are not specified but I would suggest that a very simple web app could meet your needs.
This IBM article might be overkill for you but it also happens to discuss the offline web app option. http://www.ibm.com/developerworks/web/library/wa-offlineweb/index.html

Phone Gap or native Android wrapper?

I want to develop an application which works both in a regular browser and as an Android app. Both seem suitable but would I be right in saying if I went with Phone Gap, deploying the same html content as a regular, server hosted website is not trivial and would require modification? Also, are multi page applications not desirable in a Phone Gap wrapper?
Are there any alternatives I should consider? I'm surprised someone hasn't already written an Android wrapper with all the hardware access wiring done already. Or have they?
There are few things you should know,
If you are going to publish your app also on iOS, you can't use server hosted website for your app.
All of your basic functionality must stand on your app assets, is one of the iOS guidelines, and its also make-sense for best ui performance (both iOS & Android).
Use server-side wisely, when you want to fetch data which have to be up-to-date.
there are some new mobile browser features which will be available in the future, that allow your website to use the device hardware functions:
Device API on W3C
Good luck dude ;)
You can try with jquery mobile framework:
http://www.jquerymobile.com
It is jquery based framework for developing web apps that works on standard web and on multiple mobile devices (with cordova)

Categories

Resources