Go inside of settings on button press - android-activity

I'm new to android application development. My question is how to show directly inside of android settings on press of a button of an application.
example on button press show directly VPN settings or Tethering & portable hotspot settings.

try this way working in 4.0.4 not tested in another version
Intent tetherSettings = new Intent();
tetherSettings.setClassName("com.android.settings", "com.android.settings.TetherSettings");
startActivity(tetherSettings);

Related

How to select devices in IntelliJ IDEA new UI?

New UI:
The app is currently running on a connected device, but I don't see any option to connect to another devices (for example, emulator). Here's the previous version of IDE, where I can see multiple devices.
Old UI:
It is a known problem https://github.com/flutter/flutter-intellij/issues/6270 Currently, you can customize the toolbar manually:
Right-click on main toolbar and select Customize Toolbar
Select the needed group and click on Add Action
Dropdown Plugins | Flutter and select Flutter.DevicesSelector

I can't find the location to select for the target device in VS Code. (Flutter)

I usually use Android studio for application development with Flutter.
I'm trying to use VSCode, but as the title says, I can't find the selection of the target device I want to run.
For the time being, I selected [Run and Debug] from the icon on the left and executed it, and I was able to run the app on the actual iphone, but I want to run it on macOS.
I would appreciate it if you could tell me where it is.
At the very bottom of your editor, there is a bar, in this bar you should see the name of the currently selected platform, if you click on the platform, you will bring up a menu where you can select the device.
here is a closeup:
In my case you would click on "windows (windows-x64)"
You can also press Ctrl+Shift+P and write Flutter: select device to bring up the same menu

How to debug js code inside a wkwebview of safair app extensionn popover?

It's not just a wkwebview, it's a single page app running inside a wkwebview which is the popover of Safari app extension.
I need to communicate between my SafariExtensionViewController and this spa inside wkwebview.
I totally lost the idea of how to deal with it.
if you want to debug javascript code that wkwebview is presenting you need to go to Safari -> Preferences -> Advanced -> Show Develop Menu In Menu Bar
then a new tab will appear on Safari "Develop"
press on it and select the simulator or the device that your app is running on
(if you don't see any device or a simulator its because you ran Safari before the app was running. close it by left click -> close and open it again, it will work)
it will show you the html that the app is currently presenting.. press on it
the you have the option to debug your app, see logs/error on the console
hope I helped

Ionic custom keyboard

I'm trying to build a custom keyboard on Ionic.
I'm targeting iOS and Android devices.
I have a searchbar and my goal is to display a keyboard and just above it add a button that would, when clicked, open something in the place where the keyboard is.
I'm trying to use the #ionic-native/keyboard module but I didn't find any help on the internet. Plus the keyboard doesn't show when I try to display on a navigator, I have to type with my computer keyboard in the searchbar.
Cordova Doesn't supported in computer browser you need to check in real mobile devises
use ionic cordova run android This will start an android emulator that should allow all the cordova plugins to function

How to bring back "Add to home" banner for progressive web app after removed the icon from home screen?

The reason - I made a Progressive web app, opened in the browser - all is fine and browser offered me to add it to home screen.
Now, I want to demonstrate this on a presentation, and so - removed the icon from home screen. But for the last whole day I've been playing with the website in chrome a lot, and the banner never appears back.
Is it really a once-in-a-lifetime thing? Or is there something specific I need to do?
The app-install banner prompt is normally presented after you've visited the site at least twice with at least 5 minutes between each visit. Using a Chrome flag, you can bypass these checks so that the banner always appears on every visit:
Open Android Chrome.
Go to chrome://flags/#bypass-app-banner-engagement-checks
Click Enable
Click Relaunch Now
You can also simulate an Add To Homescreen event from Chrome DevTools:
Open Android Chrome on your phone, and navigate to a PWA (e.g., the Paper Planes app from https://paperplanes.world).
Connect to your Android with a USB cable.
From desktop Chrome DevTools, select Menu > More Tools > Remote Devices. OR CTRLSHIFTP (or CMDSHIFTP for macOS), and enter "Remote devices".
Select your phone by name.
Click the Inspect button next to the list item corresponding to your PWA (e.g., Paper Planes).
In the new DevTools pop-up for your PWA, go to the Application panel, and click Add to homescreen. This should cause the app-install banner to appear in Android Chrome. Note the banner won't appear in the Chrome DevTools screen mirror.
(steps above verified with Chrome 55 on macOS Sierra, and Android Chrome 57)
I found another solution - when I go to the settings of chrome mobile and choose History -> Clear browsing data (make sure that the option to clear Cookies is ticked) then click the Clear Data button - after that I get again the app install banner to add the app to the home screen.
Apparently - it clears not only the data itself, but also makes the browser forget everything about this website.
(Strangely - the old icon doesn't go away ... so now I have a few icons on the home screen :D ...)