2014-02-12 Miguel de Dios <miguel.dedios@artica.es>

* src/pandorafms/pandorafmsandroidconsole/PandoraWebView.java: fixed
	the access with passwords or users with non-ascii characters.
	
	* AndroidManifest.xml: update the version.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9433 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-02-12 15:42:17 +00:00
parent 9b0807da45
commit 347b3023e8
3 changed files with 38 additions and 4 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="pandorafms.pandorafmsandroidconsole"
android:versionCode="1"
android:versionName="1.0" >
android:versionCode="2"
android:versionName="1.1" >
<uses-permission android:name="android.permission.INTERNET" />

View File

@ -1,3 +1,10 @@
2014-02-12 Miguel de Dios <miguel.dedios@artica.es>
* src/pandorafms/pandorafmsandroidconsole/PandoraWebView.java: fixed
the access with passwords or users with non-ascii characters.
* AndroidManifest.xml: update the version.
2013-12-16 Miguel de Dios <miguel.dedios@artica.es>
* res/values/strings.xml, res/values-es/strings.xml,

View File

@ -24,6 +24,9 @@ GNU General Public License for more details.
package pandorafms.pandorafmsandroidconsole;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import pandorafms.pandorafmsandroidconsole.R;
import pandorafms.pandorafmsandroidconsole.Help;
@ -56,7 +59,19 @@ public class PandoraWebView extends Activity {
String url_pandora = preferences.getString("url_pandora", "http://firefly.artica.es/pandora_demo/mobile");
String user = preferences.getString("user", "demo");
try {
user = URLEncoder.encode(user, "UTF-8");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String password = preferences.getString("password", "demo");
try {
password = URLEncoder.encode(password, "UTF-8");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
WebView myWebView = (WebView) findViewById(R.id.webview);
WebSettings webSettings = myWebView.getSettings();
@ -140,8 +155,20 @@ public class PandoraWebView extends Activity {
Activity.MODE_PRIVATE);
String url_pandora = preferences.getString("url_pandora", "");
String user = preferences.getString("user", "");
String password = preferences.getString("password", "");
String user = preferences.getString("user", "demo");
try {
user = URLEncoder.encode(user, "UTF-8");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String password = preferences.getString("password", "demo");
try {
password = URLEncoder.encode(password, "UTF-8");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
WebView myWebView = (WebView) findViewById(R.id.webview);
myWebView.loadUrl(url_pandora + "/index.php?action=login&password=" + password + "&user=" + user);