Firefox Android add-on does not allow Button? - android

I made a Firefox extension using the Add-on SDK with a Button. This works fine in the Desktop Firefox: button shows up and it works. But when I push the add-on to Firefox for Android using jpm-mobile and ADB (see here for what that means), the button is missing.
Are Buttons not supported in Android for Firefox? Or am I doing something wrong?

I don't think so, in order to do it on android you have to use NativeWindow and add item to the menu: https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/NativeWindow/menu

For future reference, this is probably everything possible in Firefox for Android Add-ons:
https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API
An alternative to a toolbar button could be a URL bar action.

Related

ModernListView looks different on Windows and Android platform

I need your help.
Can someone explain to me why the appearance of ListView (I use ModernListView -> https://github.com/rzaripov1990/ModernListView) is different on Windows platform and Android platform. I am using Custom Style, StyleBook which is modified for Platform Default.
I use Delphi 10.4 CE, Update 2.
On Windows platform both Accessory (Type=More) and GlyphButton (ButtonType=Checkbox) in EditMode are visible.
On the Android platform, however, neither the Accessory (Type=More) nor GlyphButton (ButtonType=Checkbox) in EditMode is visible.
The source code of example can be found on github -> https://github.com/sax15/ListViewExample
Thanks for your help.
i didn't use Firemonkey in the past 2 years now(maybe even longer...), but from what i remember the controls will always look different between Windows and mobile.
sometimes also the behavior is different.
i think even when you set the controls to look native.
Edit -
Here are some useful link about styles and different devices :
https://books.google.co.il/books?id=euJDEAAAQBAJ&pg=PA164&lpg=PA164&dq=delphi+firemonkey+different+styles+in+different+devices&source=bl&ots=Xq55fI6L1z&sig=ACfU3U2mvWi7_DXu6hP2tca-WRJmNjEPIA&hl=en&sa=X&ved=2ahUKEwj5ho_K_qz4AhXUiP0HHZQVAIMQ6AF6BAglEAM#v=onepage&q=delphi%20firemonkey%20different%20styles%20in%20different%20devices&f=false
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Working_with_Native_and_Custom_FireMonkey_Styles
https://www.fmxexpress.com/add-firemonkey-mobile-styles-into-your-desktop-apps-in-delphi-10-seattle-for-android-and-ios/
Thanks to Eitan Arbel, I realized that I had not changed Style for the Android platform. The Default style was not displaying correctly on the Android. Now I added the Style for the Android and everything works as it should.
I've also updated the example on github -> https://github.com/sax15/ListViewExample
THX Eitan

How to change Flutter DevTools default browser?

Can I change the default browser that is used for Flutter DevTools? Is it compatible with Firefox or other browser? In my case, I don't like Chrome very much, i's a little slow and heavy compared to firefox and others. I haven't found any solution so far, even changing the settings through VS Code. Thanks!
Use flutter run -d web-server
open app with browser other than Chrome
I don't think that anyone has properly answers this question yet so I'll give it a go.
In my case, my computers default browser is set to Safari but Safari doesn't work well with Flutters Dev Tools at the moment. So.. how can you keep your computers default browser and specify a browser you want to use when starting dev tools?
In Android Studio open up your Preferences and in the top left there is a search bar.
Type in "Web Browsers".
You will see a list of web browsers and you can click and drag.
Place the one you want to use by default on top. For example I have chrome on the top of my list.
Now just set this from "System default" to "First listed" and apply your changes
When you press this button to open dev tools it will now, in my case, open chrome instead of safari even though Safari is my computers default browser.
The other answers here pointed out solutions in Android Studio and starting a local server separately. But I wanted to start the whole debugging session in one command. So this is what I came up with in Linux:
I wanted to use Brave as the default browser. First run which brave-browser. Copy the outputted path (in my case, it was /usr/bin/brave-browser). Then open your bashrc or zshrc and paste the following line:
export CHROME_EXECUTABLE=THE_COPIED_PATH_FROM_PREVIOUS_STEP
# for me it became, CHROME_EXECUTABLE=/usr/bin/brave-browser
Lastly restart the shell:
source ~/.zshrc
# or source ~/.bashrc
Now, simply running flutter run -d chrome would open up the debugging session in Brave instead of Chrome(though in the console output, the messages will still be referring to Chrome).
its actually depends on code editor / ide
for vs-code
open setting
search dart.devToolsBrowser
change to default or any other browser

Select drop down in Android Webview version 50.+ not functional

We're facing a new and peculiar problem when using a simple Select drop down in a hybrid app in Android Webview after the latest update (50.0.+).
Behavior of the select drop down: Blinks twice and opens the Android options list. Upon selecting an item, it doesn't show that item selected - No change in the displayed list.
When we downgrade the Android System Webview to factory settings (v46 or v37), the select box seems to work just fine.
Is anyone else having issues with similar html components and current Android Webview??
We do use JQuery Mobile v 1.4.5 in our app.
And yes, javascript is enabled on the webview.
Yes, the problem is different devices have diffenent Android versions and Webview versions.
There is a PROBLEM on webview version 50,51,52, that when I use Webview.loadUrl, it won't work until I touch the Webview once or Twice.
And then, I replace Webview.loadUrl to Webview.evaluateJavascript hoping to solve the problem, but it didn't work neither.
After I upgraded my Webview version to 53 through Google Play, the Problem was solved. But it doesn't make sense.
CrossWalk Engine will add about 20MB to the APK size, so it won't be my first choice.

Why does my href command in my phonegap app work on iOS and not on Android?

i have built an iOS app with phonegap (and dojo) and now i want to portate this app to android and update the phonegap version to the newest one (3.0). I have some images witch open a function and gave some parameter to it. It looks like this:
this.svgImageDiv.innerHTML = '<a class="linkIcon" href="javascript:goToNextNode('+this.child_id+','+ this.parentNodeId+','+parseInt(this.id)+')"><img class="nodeIcon" src="img/IconSubItems.png"/></a>'
There are many links generated like this and everyone is saved with different parameters.
This works well on the iPhone but doesnt work on my android devices with android 4.2.2 (it works in the android emulator).
Does phonegap or android really support no href command?
ialso tried to avoid the href command and use onClick in the image tag:
this.svgImageDiv.innerHTML = '<img class="transparentImageSmall" src="img/transparent.png" onclick="javascript:imgtest(parameter1,parameter2)"/>'
or witout javascript:
this.svgImageDiv.innerHTML = '<img class="transparentImageSmall" src="img/transparent.png" onclick="imgtest(parameter1,parameter2)"/>'
both dont work. Does Phonegap 3 on android not support onClick?
I solved it by using ontouchstart instead of onclick.

Titanium iOS app to Android

I built an iOS app for a company i know, now I'm trying to make that same app for android. Just clicking the "Android" button in the xml file doesn't work. Do I have to rewrite the whole app again or is there some other way I can easily make that same app for android?
No, You don't need to rewrite the whole code again. But you should have to make some platform specific codes. Also some controls like Toolbar will not be available for Android. You can check the platform using Ti.Platform.osname or getOsname() method, which will return the osname(android/ios). In short, all other code will be work in android platform also.

Categories

Resources