[Q] Programmatically Turn Wi-fi Hotspot on/off - Desire HD Q&A, Help & Troubleshooting

I'm thinking about building an application for personal use. The details aren't important but one of the things i would like to be able to do is turn the wifi hotspot on or off. I've looked around, but haven't been able to find anything on the subject, or whether or not it's even possible.
Does anybody have some information on this?

Most ICS ROM's have that option built in...have you tried app store search or just a google search?

01satkins said:
I'm thinking about building an application for personal use. The details aren't important but one of the things i would like to be able to do is turn the wifi hotspot on or off. I've looked around, but haven't been able to find anything on the subject, or whether or not it's even possible.
Does anybody have some information on this?
Click to expand...
Click to collapse
If you intend to have your phone automattically turn on wifi hotspot based on certain profiles, Tasker will do that for you. You can find it in the playstore. It's a paid app though.

Well, i suppose suggestions for apps that do the sort of thing i want to do. Unfortunately there's nothing out there that does what i want, because I want something rather unusual.
I spoke to a friend yesterday and he pointed me in the direction of the API i want (which contrary to my initial assumptions was not DHD specific), so when i have the time i can put together my tool.
Thanks anyway

Related

Newbie question

Hi. I am really interested in getting the TP2 and I've been using the search function to try to find out whether the TP2 can work with third party applications through wifi only, but I can't find an answer. This is important because I can't afford a data plan and want to be able to reference things on my phone while at work. The programs are epocrates, qxmd, and the like. I've read that 3rd party apps only work through data on blackberries (even though they have wifi antennas) and was wondering if the same applies to any of the HTC phones (mainly the touch pro2)? Any help is greatly appreciated. Thank you.
Welcome. Please try to use more descriptive thread titles in posts.
Whether an app can support Wifi is not really a function of the phone. I have yet to find one that didn't on either my Tilt 2 or the Incite it replaced. The app itself doesn't usually care which connection it uses so long as one is present. The real trick is to not use ANY data at all. Almost any WinMo phone will access the network for something, usually for something like aGPS or to download weather info. These will be relatively small amounts of data, but it takes some effort to set your phone up to not use ANY data. I use a couple of tracking and GPS programs that would not be possible without a data plan. Having one of these smartphones and not letting it use data seems a waste to me. Wifi is only so accessible.
Miami_Son said:
Welcome. Please try to use more descriptive thread titles in posts.
Whether an app can support Wifi is not really a function of the phone. I have yet to find one that didn't on either my Tilt 2 or the Incite it replaced. The app itself doesn't usually care which connection it uses so long as one is present. The real trick is to not use ANY data at all. Almost any WinMo phone will access the network for something, usually for something like aGPS or to download weather info. These will be relatively small amounts of data, but it takes some effort to set your phone up to not use ANY data. I use a couple of tracking and GPS programs that would not be possible without a data plan. Having one of these smartphones and not letting it use data seems a waste to me. Wifi is only so accessible.
Click to expand...
Click to collapse
Thanks for your answer. I really don't want a smartphone, but it might be required and I just want a way to access it without paying extra money.

Best way to setup one action for serial tasks (e.g. wifi off, data on, vpn start)?

I've started using OpenVPN, and to use it I disable wifi, enable data, and then get into OpenVPN to establish the connection. That's not convenient at all, and neither is getting off the VPN.
What's the best way of creating a single icon for such things?
I thought perhaps Tasker, which I've read about but not used yet, but I have a sneaking suspicion that I'm overlooking something else.
I'm on stock 4.1.2 now but am considering CM10.
rseiler said:
I've started using OpenVPN, and to use it I disable wifi, enable data, and then get into OpenVPN to establish the connection. That's not convenient at all, and neither is getting off the VPN.
What's the best way of creating a single icon for such things?
I thought perhaps Tasker, which I've read about but not used yet, but I have a sneaking suspicion that I'm overlooking something else.
I'm on stock 4.1.2 now but am considering CM10.
Click to expand...
Click to collapse
Tasker + Secure Settings can do this but you may need to figure out a script to get it to also enable OpenVPN's connection.
Tasker is worth every penny
moe6 said:
Tasker + Secure Settings can do this but you may need to figure out a script to get it to also enable OpenVPN's connection.
Tasker is worth every penny
Click to expand...
Click to collapse
OK, thanks, I'm beginning to bludgeon my way through Tasker now (a bit of a steep learning curve). I'm curious, though, which part of what I want to do is Secure Settings for? I've read its description, but it's hard to pick out which particular thing there you had in mind.

Turn data off on Gnex

Found several references to this question but all outdated or not relevant to the Gnex... is there a way to restrict a search to a specific forum ie the Gnex forum?
I just discovered that my disconnected Droid X can still access the net and the Play store, etc. I want to use my Gnex phone to do that too; but worry that it won't know I'm on WiFi and chew up data, and get git with a big, unexpected, bill for excess data use.
Is there an app or a Widget that will turn off, or disable, Data use when there is an active WiFi connection? So that I don't have to remember to do it when I get home or leave home?
I wonder about public WiFi connections; I wonder if automating the process would be a good idea after all; unless there were a way to choose the WiFi connection to access.
ps It looks like I may have found the answer in "Data On-Off" :victory:
mikeacox said:
Found several references to this question but all outdated or not relevant to the Gnex... is there a way to restrict a search to a specific forum ie the Gnex forum?
I just discovered that my disconnected Droid X can still access the net and the Play store, etc. I want to use my Gnex phone to do that too; but worry that it won't know I'm on WiFi and chew up data, and get git with a big, unexpected, bill for excess data use.
Is there an app or a Widget that will turn off, or disable, Data use when there is an active WiFi connection? So that I don't have to remember to do it when I get home or leave home?
I wonder about public WiFi connections; I wonder if automating the process would be a good idea after all; unless there were a way to choose the WiFi connection to access.
ps It looks like I may have found the answer in "Data On-Off" :victory:
Click to expand...
Click to collapse
Great you found the "answer", reported this to moderation team for closing.
Why would you even bother to bump/report it 72 hours later? The thread was fine where it was.
good day.
chopper the dog said:
Why would you even bother to bump/report it 72 hours later? The thread was fine where it was.
good day.
Click to expand...
Click to collapse
Because it had no replies; Because OP did not edit the title thread to include the [SOLVED] tag; Because the OP should have done it himself (reporting the thread for closing); Because it was 72h old, and not 3 months; I reported it to prevent the thread from being necrobumped, on a matter as trivial as this. If it's a 3rd party app OP was looking for, then this might even be more appropriate on Android General, since he "didn't want to remember" himself to shut data connection off, and there isn't a sw or a hw issue so..
Now, if my report didn't get this thread closed, this post (or the following) will.
Sent from my Nexus

[Q] Best way to strip the phone components from the software

I am wanting to remove all the phone components to basically make the phone a portable media player.
What would be the best way to accomplish this. I am not sure what programs would need to be frozen.
slixzen said:
I am wanting to remove all the phone components to basically make the phone a portable media player.
What would be the best way to accomplish this. I am not sure what programs would need to be frozen.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2344890
This basically strips the phone to just that a phone with text and internet. You don't have to activate the phone or use any of the 3 to 4 total features. However, I think you need these things to at least get the phone recognize anything. Try that first. If you want to try something different, you can delete these as you see fit.
https://spreadsheets.google.com/spr...1gdDJRekl4QmkyNmIzUmRvX2h3UDVkQXc&output=html
bigmike6200 said:
http://forum.xda-developers.com/showthread.php?t=2344890
This basically strips the phone to just that a phone with text and internet. You don't have to activate the phone or use any of the 3 to 4 total features. However, I think you need these things to at least get the phone recognize anything. Try that first. If you want to try something different, you can delete these as you see fit.
https://spreadsheets.google.com/spr...1gdDJRekl4QmkyNmIzUmRvX2h3UDVkQXc&output=html
Click to expand...
Click to collapse
Is here a simpler way? Wouldn't removing the radio from the phone solve the problem of it constantly searching for a signal (besides it being in Airplane Mode)? I appreciate the list, as that is useful, but, I am looking for more then just freezing/removing apks.
I basically want the phone to become a PMP without the ability to call, text, etc.
slixzen said:
Is here a simpler way? Wouldn't removing the radio from the phone solve the problem of it constantly searching for a signal (besides it being in Airplane Mode)? I appreciate the list, as that is useful, but, I am looking for more then just freezing/removing apks.
I basically want the phone to become a PMP without the ability to call, text, etc.
Click to expand...
Click to collapse
Then go with the spreadsheet and delete away. Careful not to delete the stuff to at least get the phone to the homepage. The best way is to make a backup first. Then delete one thing at a time and reboot to ensure the phone will still work the way you want to.
X'ed out the game
slixzen said:
Is here a simpler way? Wouldn't removing the radio from the phone solve the problem of it constantly searching for a signal (besides it being in Airplane Mode)? I appreciate the list, as that is useful, but, I am looking for more then just freezing/removing apks.
I basically want the phone to become a PMP without the ability to call, text, etc.
Click to expand...
Click to collapse
You can't just remove the Modem... what more are you looking for? The only real way to do it is to freeze apps or remove them. Its not like we have a ROM for what you want. If you want it, you're going to have to do it yourself. If there is no service, it is useless for calling and texting. I suggest keeping the phone section active because it can still be used for emergency calls to 911. But as far as completely disabling call and text features, you will have to remove or freeze the apps. There is nothing to disable it from having a signal other than airplane mode. Wifi can still be turned on though.
Sent from my SGH-I337 using xda premium

SOS! Please HELP - XM10T5G Down[&up]grading..

Have the Xiaomi Mi 10T 5G, which comes with Android 10 / MIUI 12 [Sort of combination of them i think], and i wanna install an older version of android only, lower than 10 [Preferably 7.0], is it possible to do at all? If so, then how exactly can i do that? if possible with exact instruction or guide to it..
Thanks ahead..
PEACE AND LOVE!
Not possible. I am really curious why would you even want that.
_mysiak_ said:
Not possible. I am really curious why would you even want that.
Click to expand...
Click to collapse
For many reasons.. They changed it in some very bad way for my opinion.. like the auto turning on WiFi by some apps, like some apps that don't have widgets, the call recording issue and many more very annoying unreasonable changes they did on A10 on.. saw also they only allow FBE encryption instead of FDE which is much better [That i can see for huge 128, 256 or maybe 512 Gigs Storages but still it should be up to the user decision not forcing]
So you say it's completely impossible? even if flash universal / rooted ROM? no way at all?! cause man those are really annoying stuff especially to the tech Pros and/or savvy's like us, and i know that since i saw many threads and posts in other forums about those issues too.. Maybe some giving up or thinking it's advancements, but really, maybe big money involved, espionage, and many more possible reasons they doing it.. It's bad, really bad..
* BTW sorry for the multiplication threads didn't knew it's SPAMing and not very involved it forums world..
Thank ahead.
Jeff1976A1 said:
For many reasons.. They changed it in some very bad way for my opinion.. like the auto turning on WiFi by some apps, like some apps that don't have widgets, the call recording issue and many more very annoying unreasonable changes they did on A10 on.. saw also they only allow FBE encryption instead of FDE which is much better [That i can see for huge 128, 256 or maybe 512 Gigs Storages but still it should be up to the user decision not forcing]
So you say it's completely impossible? even if flash universal / rooted ROM? no way at all?! cause man those are really annoying stuff especially to the tech Pros and/or savvy's like us, and i know that since i saw many threads and posts in other forums about those issues too.. Maybe some giving up or thinking it's advancements, but really, maybe big money involved, espionage, and many more possible reasons they doing it.. It's bad, really bad..
* BTW sorry for the multiplication threads didn't knew it's SPAMing and not very involved it forums world..
Thank ahead.
Click to expand...
Click to collapse
To be honest I don't understand none of your points.
1. Wifi can be still turned on by apps, you just need to enable the permission (allow always vs. allow only when app is running in foreground).
2. Call recording is working in regions where it's not forbidden by privacy laws.
3. FBE is much better because it allows you to start the phone with basic service without using the password. Not sure why do you consider FDE to be superior.
4. Well, you can try to build your own Android 7 ROM from old sources, but you're going to have a fun time adapting to vendor partition/proprietary files created for Android 10 or 11. Also using several years old code which is not supported or patched anymore is quite interesting approach to security.
_mysiak_ said:
To be honest I don't understand none of your points.
1. Wifi can be still turned on by apps, you just need to enable the permission (allow always vs. allow only when app is running in foreground).
2. Call recording is working in regions where it's not forbidden by privacy laws.
3. FBE is much better because it allows you to start the phone with basic service without using the password. Not sure why do you consider FDE to be superior.
4. Well, you can try to build your own Android 7 ROM from old sources, but you're going to have a fun time adapting to vendor partition/proprietary files created for Android 10 or 11. Also using several years old code which is not supported or patched anymore is quite interesting approach to security.
Click to expand...
Click to collapse
Maybe it's regional or SROMs based issue, but the vendor of the app said it's not allowed on Android 10 and on, and i did confirmed the permission to turn on WiFi automatically, but maybe there's some other settings that i missed and that guy was wrong, i'd love if you can show how to enable it globally and/or to just the auto file sync i use, cause i tried many times even with manual syncing [by clicking the Sync button when WiFi is off, it started and turn it off automatically on Android 7.0.. Of course also for time interval based sync]..
Jeff1976A1 said:
Maybe it's regional or SROMs based issue, but the vendor of the app said it's not allowed on Android 10 and on, and i did confirmed the permission to turn on WiFi automatically, but maybe there's some other settings that i missed and that guy was wrong, i'd love if you can show how to enable it globally and/or to just the auto file sync i use, cause i tried many times even with manual syncing [by clicking the Sync button when WiFi is off, it started and turn it off automatically on Android 7.0.. Of course also for time interval based sync]..
Click to expand...
Click to collapse
App info, permissions.
_mysiak_ said:
App info, permissions.
Click to expand...
Click to collapse
Hi.. Thanks for your reply.. i did that already before, but still it doesn't work.. i use FolderSync, that currently in my old Android 7.0 device, does syncing when i click Sync from within the app, while i was totally offline [Data and Wifi] so it turned on the Wifi connection [Specific home network], and also on Scheduled i inserted the Allowed Networks SSID [Which BTW when i turn on WiFi manually and it does sync it with GDrive, it say on top 'Unknown SSID' for case it matters {Had the feeling that it very much does}], I also switced it on in Data and WiFI limit it does on that Security app, which i guess is kind of firewall, and BTW i remember like 5-6 years ago i had the Lenovo A8 "Golden Worrier" has that same kind of Security app built in with firewall and all that, but still manually at least, as i checked, it doesn't turn on the Wifi via FolderSync app.. Got a strong feeling it's due to that Unknown SSID stuff or that Security app.. Could it be?..
Jeff1976A1 said:
Hi.. Thanks for your reply.. i did that already before, but still it doesn't work.. i use FolderSync, that currently in my old Android 7.0 device, does syncing when i click Sync from within the app, while i was totally offline [Data and Wifi] so it turned on the Wifi connection [Specific home network], and also on Scheduled i inserted the Allowed Networks SSID [Which BTW when i turn on WiFi manually and it does sync it with GDrive, it say on top 'Unknown SSID' for case it matters {Had the feeling that it very much does}], I also switced it on in Data and WiFI limit it does on that Security app, which i guess is kind of firewall, and BTW i remember like 5-6 years ago i had the Lenovo A8 "Golden Worrier" has that same kind of Security app built in with firewall and all that, but still manually at least, as i checked, it doesn't turn on the Wifi via FolderSync app.. Got a strong feeling it's due to that Unknown SSID stuff or that Security app.. Could it be?..
Click to expand...
Click to collapse
FolderSync doesn't turn Wifi On automatically, this feature seems to be missing in the app. But I've just tested with Tasker and it is able to turn Wifi On and Off, so it's not a problem of Android version.
For Allowed SSID feature in FolderSync you must enable permanent location access.
Btw. I see no point in turning Wifi Off at any point, it uses so little power that there is next to none benefit in doing it. If you insist on some kind of automation, use Tasker in a fully controlled manner.
_mysiak_ said:
FolderSync doesn't turn Wifi On automatically, this feature seems to be missing in the app. But I've just tested with Tasker and it is able to turn Wifi On and Off, so it's not a problem of Android version.
For Allowed SSID feature in FolderSync you must enable permanent location access.
Btw. I see no point in turning Wifi Off at any point, it uses so little power that there is next to none benefit in doing it. If you insist on some kind of automation, use Tasker in a fully controlled manner.
Click to expand...
Click to collapse
Well your first argument is actually not tru, FolderSync does turns on Wifi automatically as i do for like 4 years with my older Galaxy s6 [Great dev BTW, Samsung's first 64 bit device i thinks] running now Android 7.0, and also the other day and im sure if ill try this right now it will actually turning on WiFi from off mode and also automatically closed it when done syncing, but no matter what i did it doesn't doing it on the XM10T5G, and it both updated to the latest FolderSync version the one with those tiles.. so it must be something with the operation system.. again it's some kind of Andro/MIUI OS so it has to do with one of them..
About the SSID, i did confirmed the location access all the time [not just when it's used] on the Security app, is there any other place that i should enable location or any other settings that may be relating to this?..
And really? you don't see the point in using Wifi? It's much more faster, secure, and reliable than data.. of course i don't care if it'll be 4G or 5G even better to sync, but obviously not any connection, but thanks for the Tasker Tip, i'll try that.. i've heared that somewhere i think from the gut of FolderSync..
And BTW, the call recording is legal in my country, so i did also many years but here only after trying several apps i found Cube ACR working good.. And also, some apps ask you if you confirm that Call recording is legal in your country but of course if you flash custom or different ROM, the system obviously can never tell..
Peace..
Jeff1976A1 said:
Well your first argument is actually not tru, FolderSync does turns on Wifi automatically as i do for like 4 years with my older Galaxy s6 [Great dev BTW, Samsung's first 64 bit device i thinks] running now Android 7.0, and also the other day and im sure if ill try this right now it will actually turning on WiFi from off mode and also automatically closed it when done syncing, but no matter what i did it doesn't doing it on the XM10T5G, and it both updated to the latest FolderSync version the one with those tiles.. so it must be something with the operation system.. again it's some kind of Andro/MIUI OS so it has to do with one of them..
About the SSID, i did confirmed the location access all the time [not just when it's used] on the Security app, is there any other place that i should enable location or any other settings that may be relating to this?..
And really? you don't see the point in using Wifi? It's much more faster, secure, and reliable than data.. of course i don't care if it'll be 4G or 5G even better to sync, but obviously not any connection, but thanks for the Tasker Tip, i'll try that.. i've heared that somewhere i think from the gut of FolderSync..
And BTW, the call recording is legal in my country, so i did also many years but here only after trying several apps i found Cube ACR working good.. And also, some apps ask you if you confirm that Call recording is legal in your country but of course if you flash custom or different ROM, the system obviously can never tell..
Peace..
Click to expand...
Click to collapse
I see no point in turning wifi OFF.
Anyway, good luck finding/building your perfect Andoid 7 ROM.
_mysiak_ said:
I see no point in turning wifi OFF.
Anyway, good luck finding/building your perfect Andoid 7 ROM.
Click to expand...
Click to collapse
Again security and energy reasons.. Think about it..
Anyway i barely know how to flash ROM, so i'm very far from building a custom one.. But at start you said it's impossible to install / flash an older Android ROM to it [XM10T5G], so you say it's possible with custom ROM?
Jeff1976A1 said:
Again security and energy reasons.. Think about it..
Anyway i barely know how to flash ROM, so i'm very far from building a custom one.. But at start you said it's impossible to install / flash an older Android ROM to it [XM10T5G], so you say it's possible with custom ROM?
Click to expand...
Click to collapse
Again - not possible, such ROM doesn't exist.

Categories

Resources