Julie Carming
- Forum posts: 1
Jul 5, 2012, 1:26:00 PM via Website
Jul 5, 2012 1:26:00 PM via Website
I am still learning, and my development experience is next to nothing, but in the current Eclipse project I am working on, there is one call that is being made to a static website address:
Example: webview.loadUrl("http://sampledomain.com/EN-US-com_company_appname/");
I would like to retrieve the variables above from the user's phone based on the following structure:
var1 = the android phone user language (ISO 2-digit code I suppose??)
var2 = the user's location (country - ISO 2-digit code I suppose??)
var3 = the application's package with underscores instead of periods
So it would ultimately end up looking something like this:
webview.loadUrl("http://sampledomain.com/var1-var2-var3/");
The application asks for all kinds of permissions in the manifest (see below) so I am sure that I would have access to make this happen, I just don't know how?
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"/>
<uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.VIBRATE" />
Your help / advice would be greatly appreciated!
Example: webview.loadUrl("http://sampledomain.com/EN-US-com_company_appname/");
I would like to retrieve the variables above from the user's phone based on the following structure:
var1 = the android phone user language (ISO 2-digit code I suppose??)
var2 = the user's location (country - ISO 2-digit code I suppose??)
var3 = the application's package with underscores instead of periods
So it would ultimately end up looking something like this:
webview.loadUrl("http://sampledomain.com/var1-var2-var3/");
The application asks for all kinds of permissions in the manifest (see below) so I am sure that I would have access to make this happen, I just don't know how?
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"/>
<uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.VIBRATE" />
Your help / advice would be greatly appreciated!
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.