1

I have a bootleggers ROM (Android 9 pie) installed on a Motorola Moto E 2015 phone. Can I add a quick settings tile that would switch between 2G only and 2G/3G/4G network modes?

In Lineage and ResurrectionRemix ROMs there is an "LTE" tile, which can achieve this, I think. But Bootleggers rom doesn't have it. I solved this with Shortcutter app, but it opens a list of network modes every time, so I have to click twice instead of once. Ideally, the tile should switch between these two network modes and display the current mode.

1

For everything you want to automate on your Android phone I highly recommend you to use Automate. Automate is a powerful visual scripting app. Imagine it to be the BluePrints for Android. Or should you know Scratch, it's just like that. Changing default Network Type is a system setting you can easily do using Automate.

Automate offers the "Quick Settings Tile Show" block that sets up an QS Tile and can be interacted with. For use of that block, refer to https://llamalab.com/automate/doc/block/quick_settings_tile_show.html

This app is an scripting app. This means you still have to create your program according to your wishes, but I suppose that should not be a problem for you. https://llamalab.com/automate/

Your script will look like this: CODE PICTURE

At first you need to set your preferred network type. Let's go with LTE here. You pick the "System Settings Set" Block, choose "Network Preferrence" and enter LTE. Note: The actual value your system uses to express "LTE" may vary from device to device. To find out which term YOUR device uses, you can utilize the "System Setting Get" block: In your settings, set LTE as preferred network. Then, within Automate, you use the System Setting Get block and ask for the current preferred network. You assign the block output to a variable (You don't need to manually create one. A variable with the name you enter will be created automatically), for example "Type". Then, you pick the "Toast Show" Block, and enter the name of the variable. Note: Automate uses text as primary input. You can change between these modes by clicking the "fx" icon right next to the input field. Variable and Text Input

It will change into a Stamp then. Text always has these "" around them, while variables don't. When entering the variable into the Toast Show block, be sure to switch into Variable input mode and enter the name of your variable without these "".

When you have found out how your device calls "LTE" in the settings, go back to our original script. Here you can add it to the System Setting Set block.

So far, our script has two blocks: The Flow Start and System Setting Set block. Now we add the Quick Settings Tile. For that, you pick the Quick Settings Tile Show block and set it up according to your wishes. For example you can call it LTE, choose an appropriate Icon and make it "Active".

Now, add another System Settings Set block, that changes the network preferrence to whatever you want to have instead, for example EDGE or WDCMA. To find out by which name your system calls these network types, you can recycle the "System Settings Get - Toast Show"-Script.

And then, once again, put another Quick Settings Tile Show block with the same input arguments, except for the "Active" button, which should be left inactive this time.

  • "For example, post a notification, and when it's clicked it changes that setting." - Cool, but can I add a quick settings tile, that displays the current preferred network mode and can switch between two predefined preferred network modes? – mnd Jun 18 '19 at 10:52
  • @mnd I have updated the answer to properly react to your question. It should be much more helpful now. For further inquiries, please ask me just like yesterday, here within the comments. Good luck! – ULTRACOMFY Jun 19 '19 at 12:19
  • This worked beautifully. I'm not sure, though, if I used the same settings block as in your screenshot. I chose the "Mobile network preferred set" block from the "Telephony" category. And I think that I didn't need to fetch the settings values from my system for different network types. There was already a list of network types, that I could choose from. I just used "System default" type for 2G/3G/4G and "2G" for 2G only. and that successfully toggles the preferred mobile network type for me. Thanks a lot. – mnd Jun 20 '19 at 5:31
  • Also this helped with my other similar question android.stackexchange.com/questions/213758/… – mnd Jun 20 '19 at 5:32
  • @ULTRACOMFY - do you know if there is any chance, that this app could control the notification led or the settings for ambient display (see my other questions android.stackexchange.com/questions/213768/… and android.stackexchange.com/questions/213756/…)? The app is so easy to use that I want to use it for more. Tried the "Attention light on" block for the led, but it didn't work for my device. (if this kind of linking to other questions is not allowed here, I'll delete my last 2 comments) – mnd Jun 20 '19 at 5:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.