Showing posts with label PhoneGap. Show all posts
Showing posts with label PhoneGap. Show all posts



https://play.google.com/store/apps/details?id=com.jappster.countmoomoo

MooMoo counting is a fun counting app for family. Wanna teach your kids how to count while playing with them? Then this is just the right app for you. We have counting modes that can make it challenging enough for the whole family.


Device privileges
Count with MooMoo app runs with a minimum of privileges. No data will be transferred from Count with MooMoo to any server or any third party. The app only require an Internet connection to display advertising.

Tally Marker


https://play.google.com/store/apps/details?id=com.jappster.TallyMarker

Count with Tally Marker is a counter app, that allows you to count everything with tallies.

Imagine you went to a bar one day, order beers after beers until the end you lost track of the number of beers you have ordered and the total price for the bill. 
This is when Count with Tally comes to the rescue. Download the app, make a stroke every time you ordered a beer (or anything you can think of) and preset the price per beer in the settings. Now you can track how many you beers have ordered as well as their total prices. You can even track when you have ordered that beer.

Use this counter to
★ Count cups of beer you drank in the bar
★ Count the mistakes that you significant others have made
★ Count the cigarette you have smoke in a day/week/month
★ Count the money you have to pay for the items you count
★ Count any other things you might think of

Tally Marker Features:
★ Add new counter tallies by name
★ Get an actual count overview
★ Display additional price information in your preferred currency
★ Edit your counter tallies
★ Remove and reset counter tallies
★ Count up and down just by swiping
★ Automatic offline saving. Means all your count data is "always" saved offline
★ Initial filling of the newly created tallies(counts)
★ Personalise your tallies! Change them to your favourite color (Requires Android 4.4+)
★ Vibrate on count/swipe (optional)
★ Set default currency for your counter
★ History tracking of your counts

Device privileges
Count with Tally Marker runs with a minimum set of privileges, because Tally Markers mission is to count, nothing else. Tally Marker only require an Internet connection to display an interstitial ad on startup. That's it. Have fun counting!




When I ported a Cordova app to Android 5 (Lollipop), I noticed, that the login does not work anymore. In prior versions of Android it works like a charm (app login is based on session cookies).

Part of the Android Lollipop changes:
Apps that target KITKAT or below default to allowing third party cookies. Apps targeting LOLLIPOP or later default to disallowing third party cookies.
https://developer.android.com/reference/android/webkit/CookieManager.html 
Android 5.0 changes the default behaviour for your app.
If your app targets API level 21 or higher:
The system blocks mixed content and third party cookies by default. To allow mixed content and third party cookies, use the setMixedContentMode() and setAcceptThirdPartyCookies() methods respectively.
The system now intelligently chooses portions of the HTML document to draw. This new default behaviour helps to reduce memory footprint and increase performance. If you want to render the whole document at once, disable this optimization by calling enableSlowWholeDocumentDraw().
If your app targets API levels lower than 21: The system allows mixed content and third party cookies, and always renders the whole document at once.
https://developer.android.com/about/versions/android-5.0-changes.html#BehaviorWebView

Indeed, if the app rely on session cookies it will stop working as expected.

However. Here is a fix to make session cookies work again on Android Lollipop and above:

/*
       Licensed to the Apache Software Foundation (ASF) under one
       or more contributor license agreements.  See the NOTICE file
       distributed with this work for additional information
       regarding copyright ownership.  The ASF licenses this file
       to you under the Apache License, Version 2.0 (the
       "License"); you may not use this file except in compliance
       with the License.  You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing,
       software distributed under the License is distributed on an
       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
       KIND, either express or implied.  See the License for the
       specific language governing permissions and limitations
       under the License.
 */

package com.blogspot.tol8;

import android.os.Bundle;
import org.apache.cordova.*;
import android.os.Build;
import android.webkit.CookieManager;
import android.webkit.WebView;

public class MyApp extends CordovaActivity
{
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        super.init();

        // Allow third party cookies for Android Lollipop
        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
        {
                WebView webView = (WebView)super.appView;
                CookieManager cookieManager = CookieManager.getInstance();
                cookieManager.setAcceptThirdPartyCookies(webView,true);
        }
        super.loadUrl(Config.getStartUrl());
    }
}

BTW: Make sure that you use the latest Android SDK to compile the source code. I have also created an issue at the Cordova bug tracker (https://issues.apache.org/jira/browse/CB-8026).


Today I will tell you how to get reliable geolocation data on Cordova or Phonegap. It took me a lot of time to figure all this out, so I hope that I can save you some precious time with my article.

Note: I tested on Cordova 3.4.x and Android/WindowsPhone.

Before we start, make sure that you have not installed the Cordova or Phonegap geolocation plugin! In case you already have, remove it with the following command "cordova plugin remove org.apache.cordova.geolocation". We do not need this plugin since the native HTML5 support is much better! Further information can be found here. I don't know why this plugin is still available in the official documentation... But don't worry if you come from Cordova or Phonegap, you don't have to change a lot in your existing code (maybe you have to eliminate the frequency attribute).

Please pay attention that, also when you are not using the geolocation plugin, you have to set the following privileges in your:

AndroidManifest.xml

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
WPAppManifest.xml

<Capabilities>
               <Capability Name="ID_CAP_LOCATION" />
</Capabilities>
The code for the implementation itself is relative trivial. I would suggest you to implement it after the following action plan:

  • Before you do anything, check if geolocation is available (navigator.geolocation)
  • Try to get the current position with high accuracy, if the request timed out or an error occur > fallback to lower accuracy.
Important parameter:
  • enableHighAccuracy: true/false for high or low accuracy
  • maximumAge: Accept a cached position whose age is no greater than the specified time in milliseconds. (Number)
  • timeout: Maximum time of lenght in ms to get the position.
  • frequency: Stop using this attribute. It is not W3C compliant. Use maximumAge instead!
Suggested values:
  • enableHighAccuracy: true, maximumAge:3000, timeout: 5000
  • enableHighAccuracy: false, maximumAge:3000, timeout: 30000

Tips:
  • If you want to update your geolocation data continuously, use watchPosition(...) instead of getCurrentPosition(...). Also use the pause/resume functions of Cordova/Phonegap to start/stop the watch while the application is or return from background. The users battery will thank you.
  • Keep in mind that the logic behind getCurrentPosition(...) and watchPosition(...) is differently on different devices. So test your implementation as much as you can!


Please let me know if this article helped you to improve your geolocation results. If you tested successfully with iOS drop a comment (ideal with required privileges) as well. Thanks!


In this article I would like to show you how an app is published with multiple languages ​​to the Windows App Store.

As default, you can only select one default language on the Windows App Store. In order to add more languages, the language information must be added before uploading the XAP file.

In Visual Studio, go to Project Explorer > Solution > Project > Properties and open the WMAppManifest.xml file.

Switch to the tab "Packaging" and add the specific languages. Save the changes, rebuild the XAP file and upload it again. After uploading the XAP file, now you can select multiple languages.




In this article I would like to show you how to create a XAP file for the Windows App Store.

  1. Open MS Visual Studio
  2. Open your project
  3. Go to the "Project Explorer"
  4. Right click on the Solution > Properties
  5. Change the build properties as illustrated in the screen below
  6. Apply the changes
  7. Build your project ("F7")
  8. Make sure that the build was successful (console output)
  9. Open your project in the Windows Explorer and search for "*.xap". Choose the release version. Done.




I think everyone who deploy a first app on Windows Phone is facing the same problem: The app is running fine, but where the heck are my icons?

Apparently there is an issue present in Windows Phone 8 that prevents custom font-faces from working when HTML and CSS are hosted locally.

So we came up with the first solution: Hosting everything remote. But really, this is not a solution, right?

After spending some more time on google, I found another solution: Including the font-file instead of the base 64 encoded font.

Sample Code:
@font-face {
 font-family: 'Pictos';
 src:url('fonts/pictos-web.woff') format('woff');
 font-weight: normal;
 font-style: normal;
}
However, this code never worked for me. Some user reported that it works, but the rest said that it doesn't work for them too or only for some and not all of their font files.

Finally I came up with another idea: When I cannot rely on the CSS font-face, then I'll go back to the roots and display pictures instead. Of course this costs more effort and is not as elegant as using icon fonts, but so far this seems to be the only safe solution to get it done.

Before we start, let me tell you that we don't have to modify any of the Java Script Code and it will not affect other platforms like Android or iOS.

If you are already working with Themes (what I would suggest you) then you can just place the new CSS code to your WP.scss

To reduce the CSS markup, I created a small mixin. In this mixin we set a new background image with height and width, also we replace the characters in content with an empty string:

@mixin wpIcon($name,$dim) {
  $url:"../images/wp/#{$name}.png";
  background: transparent url($url) 0 0 no-repeat;
  content: '';
  height: $dim;
  width: $dim;
  display: inline-block;
}

The sample code above requires that your images are located in "/resources/images/wp".

Replacing images is very straight forward, lets take a look at another sample which shows how to use this mixin:
/* Replace the checkbox checked icon */
.x-input-checkbox:checked ~ .x-field-mask:after {
  @include wpIcon(checkmark, 20px);
}

/* Replace the back button icon and add a second rule for back button pressed */
.x-button-back:before {
  @include wpIcon(arrow-left, 32px);
}

.x-button-back.x-button-pressing:before {
  @include wpIcon(arrow-left-pressed, 32px);
}
As you can see we just pass the image name (without the file extension) + a size to the mixin.

If you don't use the WP.scss yet you can add ".x-windowsphone" as an additional class to your CSS rule. This makes sure that the rule will only apply on Windows Phone.

I hope this trick help you to get your icons back on Windows Phone. Please let me know when you have even a better idea/solution for this problem.


This article focuses on how to support SQLite (Web SQL) on the following platforms:
  • Android
  • iOS
  • Windows Phone

Why should a SQLite Plugin used in Cordova?

  • To follow the HTML5 Web SQL API as close as possible.
  • To support Web SQL on Windows Phone.
  • To deal with the same javascript functions on every platform.
  • Fail-safe nested transactions with batch processing optimisations.
  • Keeps sqlite database in a user data location that is known, can be reconfigured, and iOS will be backed up by iCloud.
  • Works with SQLCipher for encryption.

  Limitations of SQLite on Windows Phone

  • Drop table is not working, seems like a bug in the .NET or C# SQLite library. To work around this, empty the table instead of dropping it.
  • A high number of features in C# SQLite are disabled.
  • Missing failure-safe transaction mechanism.
  • Not (yet) working with SQLCipher for encryption.

What do I have to change in my existing applications?

Not much.

Just replace "window.openDatabase" with "window.sqlitePlugin.openDatabase".

Don't forget to take a look at the limitations of Windows Phone Plugin.

How to install the SQLite Plugin

There are so many SQL Plugins available. I choose "lite4cordova", because it supports Cordova 3.x, it is easy to install and it is still in development.
  • https://github.com/lite4cordova/Cordova-SQLitePlugin
  • https://github.com/lite4cordova/Cordova-SQLitePlugin-WP-2013.12
The second project is an extension of "Cordova-SQLitePlugin", because Windows Phone is not working on "Cordova-SQLitePlugin" yet.

Windows Phone 8

If you are starting to develop for Windows Phone, have a look at this article first.

To setup the project, type the following commands in the command line:
$ cordova create hello com.example.hello Hello
$ cd hello
$ cordova platform add wp8
$ cordova plugin add https://github.com/lite4cordova/Cordova-SQLitePlugin-WP-2013.12.git

Remove all files in "hello/www", except "config.xml".
Copy the testfile to "hello/www".

To build the project type the following commands in the command line:
$ cd hello
$ cordova build

Finish! Open and run the project, execute the testfile to see if all works fine.

Android and iOS

To setup the project, type the following commands in the command line:
$ cordova create hello com.example.hello Hello
$ cd hello
$ cordova platform add android
$ cordova platform add ios
$ cordova plugin add https://github.com/lite4cordova/Cordova-SQLitePlugin.git

Remove all files in "hello/www", except "config.xml".
Copy the testfile to "hello/www".

To build the project type the following commands in the command line:
$ cd hello
$ cordova build

Finish! Open and run the project, execute the testfile to see if all works fine.


In the early years of the Internet, it was possible to breach users security by using of JavaScript to exchange information from one website to another that has less reputation.

Therefore, all modern browsers implement the same origin policy that prevents attacks like cross-site scripting.

However, sometimes cross-origin HTTP request is a must-have requirement for a web application. This article will discuss about methods of how to deal with cross-origin HTTP requests. Lets start with some background information.

Origin policy

The algorithm used to calculate the "origin" of a URI (Uniform Resource Identifier) is specified in RFC 6454.

There are two different cases:
  1. Absolute URIs, the origin is the triple {protocol, host, port}
  2. If the URI does not use a hierarchical element as a naming authority (RFC 3986) or if the URI is not an absolute URI, then a globally unique identifier is used.
Two resources are considered to be of the same origin if and only if all these values are exactly the same.

The table below illustrates a check against the URL "http://www.example.com/pages/index.html":
URL to compare Result Why?
http://www.example.com/pages/index2.html ok Same host and protocol
http://www.example.com/pages2/index.html ok Same host and protocol
httpː//username:password@http://www.example.com/pages/index.html ok Same host and protocol
http://www.example.com:8080/pages2/index.html fail Same host and protocol, but different port
https://www.example.com/pages/index.html fail Different protocol
http://sub.example.com/pages/index.html fail Different host
http://example.com/pages/index.html fail Different host
http://www.example.com:80/pages/index.html - (Different port) Depends on the browser implementation


If the policy cannot be applied, the web browser will respond with an exception message, such as the following:

XMLHttpRequest cannot load ...
Cross origin requests are only supported for HTTP.
Uncaught NetworkError: A network error occurred.

Relaxing the same origin policy

Here are some techniques to relax with origin policy:
  • JSONP. If the requirement was to get only the data from a different domain, then a JSONP request is the best choice. JSONP includes external data via the <script> tag.
  • Cross origin resource sharing. This extends HTTP with a new origin request header and a new Access-Control-Allow-Origin response header. This article describes how to enable CORS.
  • Disable web security (for development mode only). If an application is under development, the web security can temporarily disabled for the web browser. While the web browser is in an unsecured mode, it is highly recommended not to surf on public Internet pages (since the browser is vulnerable for all cross site scripting attacks). See "Disable web security for a web browser".
  • Reverse Proxy. A reverse proxy (or gateway), by contrast, appears to the client just like an ordinary web server. No special configuration on the client is necessary. The client makes ordinary requests for content in the name-space of the reverse proxy. The reverse proxy then decides where to send those requests, and returns the content as if it was itself the origin. See "Setup a reverse proxy".
  • Whitelist (PhoneGap). If a web application is deployed to a mobile device with PhoneGap the domain can whitelisted (Whitelist Guide).

Disable web security for a web browser

For Google Chrome, the following command must executed in Terminal (browser must be closed):

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security

Setup a reverse proxy

Nowadays there are many http servers on the market, however this article focuses on how to configure a reverse proxy with XAMPP.

Install XAMPP

XAMPP is a free and open source cross-platform web server solution stack package, consisting mainly of the Apache HTTP Server, MySQL database, and interpreters for scripts written in the PHP and Perl programming languages.

You can download XAMPP here http://www.apachefriends.org/en/xampp.html.

Configure a virtual host

A virtual host gives you the possibility to run several name-based web applications on a single IP address.

Configuring the virtual host on your web server does not automatically cause DNS entries to be created for those host names. You can put entries in your hosts file for local testing.

Make a local host file entry

  1. Open your Terminal.
  2. Type: "sudo vi /private/etc/hosts" to open the host file.
  3. Add the following entry "127.0.0.1 local.app.com" to the end of this file. You can modify this domain name to your needs.
  4. Save the file and close it.

Configure XAMPP

  1. Open your Terminal.
  2. Open the XAMPP virtual host file. "sudo vi /Applications/XAMPP/etc/extra/httpd-vhosts.conf"
  3. Add the following virtual host entry to the end of this file:
<VirtualHost *:80>
  DocumentRoot "/Volumes/workspace/myHtml5App"
  ServerName local.app.com
  ProxyPass       /service.php       http://yourExternalHost.com/communication/service.php
</VirtualHost>

Short explanation:
  • "*:80" Listen for virtual host requests on all IP addresses.
  • "DocumentRoot" Destination of the web application on the filesystem.
  • "local.app.com" Server name, must be the same name as in the host file above.
  • "ProxyPass" Proxy path holds the service address.
Before you restart the server, make a quick check to the httpd.conf file. ("sudo vi /Applications/XAMPP/etc/httpd.conf").

Make sure that the following entries are not commented with a "#"
  • "Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf"
  • LoadModule proxy_module modules/mod_proxy.so
  • LoadModule proxy_connect_module modules/mod_proxy_connect.so
If all is fine, restart your server.

If you call "local.app.com" in your browser, the web application should open. But you will still receive a cross origin policy exception, because your web application still sends the requests to "http://yourExternalHost.com/communication/service.php".

To fix this, replace the URL "http://yourExternalHost.com/communication/service.php" with "local.app.com/service.php" in your web application.


You might want to try to run Cordova with Windows Phone. The first thing that came up when I started with this project was, that the Cordova (PhoneGap) documentation is really lack of information. So I wrote this article to make it easier for you to make a successful and even quicker installation.



Note: This installation guide can be used for both, physical machine and Virtual Machine. There are a lot of Virtual Machine servers available on the market. I decided to focus on VMWare Fusion only, but it is also possible to use software like Parallels.

Before you start

It is very important that you have a 64 bit version of Windows 8 installed, otherwise it will not work.

The Windows Phone simulator relies on Hyper-V, which only comes with Windows 8 64 bit.

In case you did not installed, a evaluation ISO (Windows 8 64 bit) can downloaded at the evaluation center.

Configure the Window 8 installation for WP 8 simulator

The first thing you need to do is to prepare the Windows 8 installation for Windows Phone 8 simulator.

Choose your target system (Virtual Machine or Physical System):

Windows 8 installation on a VM

To make the required Virtual Machine settings, use the VMWare Fusion settings below:




Important:
  • Hyper-V requires at least two cores. Of course, for a better performance you can also set more.
  • You should use 2048mb RAM at the minimum, because not only Windows will consume RAM, also the simulator will consume another 256-512mb of RAM.
You also have to modify the "*.vmx" file. Add the lines below to the end of the vmx file:
  • hypervisor.cpuid.v0 = "FALSE"
  • mce.enable = "TRUE"
  • vhv.enable = "TRUE"
Make sure that you have no duplicate keys in this file.

Windows 8 installation on a physical machine

To be able to run the Windows Phone simulator on a physical Windows 8 machine, you have to enable hardware-assisted virtualisation in the BIOS. For more information, take a look at this article:

Install Microsoft Visual Studio

After the initial Windows 8 configuration you are ready to install Microsoft Visual Studio. Here you have to options:
  1. Using the Visual Studio Express 2012 for Windows Phone edition. This version is free of charge to you, but not recommended by PhoneGap (no templates can be used in the express edition). But since you are able to create PhoneGap projects via CLI, maybe this version is what you are looking for. Go to the Visual Studio Express products.
  2. Installing Visual Studio 2013 Pro / Premium / Ultimate (If you need templates)
In all cases the additional required Windows Phone 8 SDK is already included in the installation package.

Don't forget to enable the WP 8 SDK checkbox while you are installing Visual Studio.

Tip: If you are using VS 2013, Microsoft asks you to authenticate the product with a MS Account. But there is also a way to use the product key. Take a look at this article.

When the installation process of Visual Studio is finished, your computer will be restarted by the installation routine. After the restart, login again, but wait some seconds, the installation process will go on. Wait until you see the "Installation successful" message.

Add the .NET framework directory to the PATH system environment variable

Later on you need the "msbuild.exe" executable your PATH variable. In my case I have to add the following path:
C:\Windows\Microsoft.NET\Framework\v4.0.30319
The path may differ (different version of .NET), so make sure that it matches.

Test the WP 8 simulator

As soon as Visual Studio is completely installed you are able to test the simulator. Open Visual Studio and click on "File" > "New Project".

Go to your preferred language section and select a simple Windows Phone project.

If the project is created, just start the project. The simulator should come up. If the simulator open successfully, you can close Visual Studio. Otherwise follow the further instruction which VS will show to you.

Install Node.js

Those of you who are not familiar with Node.js, Node.js is a platform that is used to build scalable network applications. For more information click here. In this case we use Node.js to install Cordova (PhoneGap).

Just go to http://nodejs.org and install Node.js. The installation process is pretty clear (no custom settings required).
After you installed Node.js, RESTART your computer or Virtual Machine.

Install Cordova

To install Cordova, open "node.js command prompt" and type “npm install -g cordova”.

Fix broken Cordova 3.1.0 version

At the moment Cordova is really a mess. So if you installed the Cordova version above, you have two options: Installing a prior version of Cordova (3.0.x) or fixing the current one.

If you want to fix your current installation, you have to replace the two files in the Cordova installation directory:

~\AppData\Roaming\npm\node_modules\cordova\src\metadata\wp8_parser.js

with

https://github.com/sgrebnov/cordova-cli/blob/181aa1b7e8f3c8b2f7c4db12e1f79d64c26e8b42/src/metadata/wp8_parser.js

and

~\AppData\Roaming\npm\node_modules\cordova\src\platform.js

with

https://github.com/sgrebnov/cordova-cli/blob/181aa1b7e8f3c8b2f7c4db12e1f79d64c26e8b42/src/platform.js

Otherwise you'll receive the following error message when you are creating a Cordova project:

"Error: An error occured during creation of wp8 sub-project. The system cannot find the path specified."

Fix broken Cordova 3.2.0 version

Maybe this error message depends on your type of .NET installation, but with Cordova 3.2.0 I cannot add a WP8 project anymore. The following message is displayed:
The command `msbuild` failed. Make sure you have the latest Windows Phone SDKs installed, AND have the latest .NET framework added to your path (i.e C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319).

To fix this, open "c:\Users\%user%\.cordova\lib\wp\cordova\3.2.0\wp8\bin\check_reqs.js":
Replace:
var msversion = output.match(/Microsoft\s\(R\)\s+Build\sEngine\s[a-z]+\s4\.0\.30319/i);

with:
var msversion = output.match(/\.NET\sFramework\,\sversion\s4\.0/i);
or simply set "var msversion = true;" if you have the right version of "msbuild.exe" in your path variable.

Create the final Cordova project

At this point you are able to build the final Cordova project. As mentioned earlier, I use the CLI of Cordova to create the project, not the Visual Studio templates.
  1. Open the command line and type: "cordova create hello com.example.hello HelloWorld". The first argument specifies a hello directory to be generated for your project. The other two arguments are optional: the com.example.hello argument provides your project with a reverse domain-style identifier, and the HelloWorld provides the application's display text. You can edit both of these values later in the config.xml file.
  2. Open the "hello" folder ("cd hello") which you created above.
  3. Add a WP 8 platform to the current Cordova project. Type "cordova platform add wp8"
  4. Open the Windows Explorer and go to hello/platforms/wp8 and double click on the solution file "*.sln". Microsoft Visual Studio will open with your selected project. Just click the "Run Button" to show up the simulator.

It is a bit tricky to deploy a HTML5 application on a Windows Phone, but I hope this article helps...


Most cookies are disabled by default on Windows Phone. However, here is one workaround to allow cookies. Open Internet Explorer and follow the images below:







AJAX-Requests for local files are not working on Google Chrome.
XMLHttpRequest cannot load file:///Users/… . Origin null is not allowed by Access-Control-Allow-Origin
To bypass, either use a HTTP server or start Google Chrome with a command-line switch. Open the Terminal and type the command below:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-file-access-from-files
If you receive a message like:
XMLHttpRequest cannot load ... Cross origin requests are only supported for HTTP.
Open the Terminal and type the command below:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security

As long as web security is disabled, it is not recommended to surf on public internet pages. In this mode your web browser is vulnerable for any kind of cross-site scripting.

For more information about Google Chrome command-line switches, take a look at Google Chrome command line switches.