Android FF does not have about:config but did initially about 2 years ago. Why was it removed when all of the other FF versions desktops and the test versions for Android have about:config functionality.
You can go to
chrome://geckoview/content/config.xhtml
To get to what you'd normally see with about:config. There, you can also turn on general.aboutConfig.enable, but that is reset after closing the app for some reason.
about:config is disabled in builds other than Nightly
From this answer:
You can access about:config in the Nightly build of Firefox for Android, available from the Google Play store .
Videos
I'm having 2 issues:
-
most of the time when I type About:config in the address bar, I get immediately sent to the search engine rather than the config page
-
the rare single time I have managed to get to what I assume is the settings page, it is blank.
I'll add to this that I'm using an eink tablet which means I may not see some buttons if they are light coloured, but other settings pages are visible, so I just think the page must be blank.
I'm using daylight 87
Ultimately I want to stop Firefox from focussing on the frame that has input in focus (overrated on an a4 screen), so if someone knows how to do it without accessing the config page I'll take that solution too!
Thanks
PS: the search in the sub brought no answer, but I have the same issue on my phone that I can't access the config page, so I can't be the only one?
The Android version of Firefox Daylight (Fenix) blocks about:config on the stable/release version of the app. I'm not entirely clear on the design details behind this (partly becaseu the dev response actually makes no sense), but the claimed reason is that a lot of the elements exposed by about:config no longer function with the new engine, or function differently than they do on the desktop version or did in Fennec (why about:config would even expose or contain unusable toggles in the first place in an application that has supposedly been entirely rebuilt is an open question), so it is disabled entirely in order to prevent normie users from completely borking their installations (again, that doesn't really make sense, since a reset to default should fix any issues caused by editing config options, and the about:config page tracks and displays which options have been changed from defaults, so that reason doesn't match reality).
The about:config page is functional in the beta and nightly releases of Firefox (Daylight/Fenix) for Android, and you could try using one of those instead, or rolling back to the final Fennec APK (I've been continuing to use Fennec as my primary browser while using the beta and nightly release channels for test use because Fenix is still far, far too bugged in ways that make my daily use cases non-fucntional e.g. tab unloading from memory behavior stopping background media streams after five minutes and reloading pages almost every time a tab or the entire app is put in the background, wiping page scroll/playback position and any entered text and thus making browsing and media streaming all but impossible).
You can't open about:config in release Firefox. If you want to access it, you'll need to use Beta or Nightly.
If your application is going to be released to the public, and if you have sensitive data in your config, such as API keys or passwords, I would suggest to use secure-preferences instead of SharedPreferences since, ultimately, SharedPreferences are stored in an XML in clear text, and on a rooted phone, it is very easy for an application to access another's shared preferences.
By default it's not bullet proof security (in fact it's more like obfuscation of the preferences) but it's a quick win for incrementally making your android app more secure. For instance it'll stop users on rooted devices easily modifying your app's shared prefs. (link)
I would suggest a few other methods:
Method 1: Use a .properties file with Properties
Pros:
- Easy to edit from whatever IDE you are using
- More secure: since it is compiled with your app
- Can easily be overridden if you use Build variants/Flavors
- You can also write in the config
Cons:
- You need a context
- You can also write in the config (yes, it can also be a con)
- (anything else?)
First, create a config file: res/raw/config.properties and add some values:
api_url=http://url.to.api/v1/
api_key=123456
You can then easily access the values with something like this:
package some.package.name.app;
import android.content.Context;
import android.content.res.Resources;
import android.util.Log;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public final class Helper {
private static final String TAG = "Helper";
public static String getConfigValue(Context context, String name) {
Resources resources = context.getResources();
try {
InputStream rawResource = resources.openRawResource(R.raw.config);
Properties properties = new Properties();
properties.load(rawResource);
return properties.getProperty(name);
} catch (Resources.NotFoundException e) {
Log.e(TAG, "Unable to find the config file: " + e.getMessage());
} catch (IOException e) {
Log.e(TAG, "Failed to open config file.");
}
return null;
}
}
Usage:
String apiUrl = Helper.getConfigValue(this, "api_url");
String apiKey = Helper.getConfigValue(this, "api_key");
Of course, this could be optimized to read the config file once and get all values.
Method 2: Use AndroidManifest.xml meta-data element:
Personally, I've never used this method because it doesn't seem very flexible.
In your AndroidManifest.xml, add something like:
...
<application ...>
...
<meta-data android:name="api_url" android:value="http://url.to.api/v1/"/>
<meta-data android:name="api_key" android:value="123456"/>
</application>
Now a function to retrieve the values:
public static String getMetaData(Context context, String name) {
try {
ApplicationInfo ai = context.getPackageManager().getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA);
Bundle bundle = ai.metaData;
return bundle.getString(name);
} catch (PackageManager.NameNotFoundException e) {
Log.e(TAG, "Unable to load meta-data: " + e.getMessage());
}
return null;
}
Usage:
String apiUrl = Helper.getMetaData(this, "api_url");
String apiKey = Helper.getMetaData(this, "api_key");
Method 3: Use buildConfigField in your Flavor:
I didn't find this in the official Android documentation/training, but this blog article is very useful.
Basically setting up a project Flavor (for example prod) and then in your app's build.gradle have something like:
productFlavors {
prod {
buildConfigField 'String', 'API_URL', '"http://url.to.api/v1/"'
buildConfigField 'String', 'API_KEY', '"123456"'
}
}
Usage:
String apiUrl = BuildConfig.API_URL;
String apiKey = BuildConfig.API_KEY;
You can achieve this using shared preferences
There is a very detailed guide on how to use Shared Preferences on the Google Android page https://developer.android.com/guide/topics/data/data-storage.html#pref
version 95.2
I want to remove the annoying blue dot over the menu prompting me to open pages in apps.
Why does a browser want me in an app anyways???