API or Class to find out whether the HotSpot is turned on or not? - windows-phone

I'm working over the "HotSpot" is the there any Api or Class whether is "HotSpot is Turned ON or Not".

You could simply identify the Wifi status by using the DeviceNetworkInformation.IsWiFiEnabled Property . However you'll not be able to identify any HotSpot which is the Internet Sharing feature in WP.
Another point which i would like mention here is that, you could not programmatically turn on or off the Wifi status up to now, but you could simply allow the user to change it via ConnectionSettingsTask.
Turn Windows Phone Settings On/Off
You could refer these for more:
Windows Phone 8 network information
Detect network changes for Windows Phone 8

Related

UWP access buttons

Helloo all
I'm currently developing an app for surface pro 3 that should be capable of:
detecting whether touchscreen was tapped and where
getting device information (product ID, amount of RAM, CPu model etc.) done by launching console application first which is capable of getting this information and saves it to a specific folder, UWP app can read its results from there and log them.
accessing sensor data like: accelerometer, gyroscope and ambient light sensor
testing cameras as i can command an app to make picture using either front or rear camera
testing microphones (both front and back)
testing speakers (i made synthesizer that is able to make beeps at given frequency at given stereo mode (left or right if both)
testing wifi - so it can connect to desired wifi network
bluetooth (swill working on it...)
I have already figured out quite a lot and put out a lot of work into it already, all listed tests are already developed on that UWP application so switching to completely different platform means rewriting whole app which I don't have time anymore.
UWP was chosen because this can run on different windows 10 devices and after completing this app the same app (with minor modifications) will be used on other windows 10 devices (like other surfaces and many different windows 10 phones)
This app will be automatically installed on a factory-resetted surface pro 3 that has no special configurations enabled, so tinkering with its settings is resource-hungry and not recommended process at all.
Now I have some other serious issues regarding of device:
how can I test the functionality of all the buttons Surface pro 3 has ?
It has 3 buttons: Volume up, Volume down and power button
but pressing power button sets screen to clack and locks device.
Can I make app override basic functionality of a button so that if button is pressed it detects it and logs its result.
same question goes to volume up and down buttons.
Only similiar questions about this are here:
Another thread on StackOverflow
I also cannot use same solution as I did with getting device information because test must be repetitive while app is running. (and UWP app cannot launch console application by itself)
Any help regarding this topic is highly welcome.
First for the power button behavior try this :
https://www.windowscentral.com/how-customize-power-button-action-when-pressed-windows-10
I don't have a surface so I cannot test it
also, I do have some inputs and thoughts about your app:
it seems to me that you are doing some sort of sanity check software for pieces of hardware I'd suggest looking into this
https://support.microsoft.com/en-my/help/4037239/surface-fix-common-surface-problems-using-surface-diagnostic-toolkit
https://www.lovemysurface.net/surface-diagnostic-toolkit/
additional thoughts of mine :
Overriding hardware behavior programmatically ould be considered as a harmful action especially when it comes to prebuilt devices such as the surface and by extension, I don't foresee MS providing API's for such a capability also such button might be communicating to the hardware directly rather and doesn't go through the software, runtime or the OS at all, changing it manually using the link i provided might be reflecting some registry settings changes but since UWP apps run in containers and cannot directly edit registry there is a dirty workaround look into this
read/write registery key file in uwp
hope this would help
You can use SystemInformation helper class from windows community toolkit it gives you a lot of details about the device.
https://learn.microsoft.com/en-us/windows/communitytoolkit/helpers/systeminformation

CLI interface for avaya 9608G IP Phone

I've a Avaya IP-Phone 9608G and I want to control it from my CLI.
Can anyone help me to know CLI interafce for avaya IP phone
Since you did not specify what specific task you would like to achieve, I list the technologies I use for interacting with Avaya phones below. You can use them to implement CLI applications to do what your use case is screaming for.
The following interfaces you can use to interact with the Avaya phones:
AES/CTI Server using the CVLAN or TSAPI protocol. You can control/monitor the PBX objects with it so you can see what is happening on your desk phone or you can initiate a call, answer an incoming one, etc...
You can use the TSAPI for C programs or JTAPI for Java programs.
TSAPI overview
AES Server using the CMAPI/DMCC protocol. With that you can register on to your desk phone. Using CMAPI/DMCC you can "pushing" your physical buttons, check what the desk phone display is currently showing, etc.
DMCC overview
You can use the Push SDK for pushing unsolicited content to the phone's display.
PushSDK overview

Controlling Network Settings in IOS 5

I have a project where it's highly desired to have some control over network settings in IOS 5 for an iPad device. The ideal scenario would be to have to ability to change the device's wifi connection to a specific SSID. My gut tells me that this is probably functionality that isn't exposed in the SDK but I figured I'd ask.
An alternate goal, if my first assumption about directly changing a connection is correct, would be to allow the app to prompt the user to change network settings and direct the user to the settings screen. I've seen a handful of apps offer this when, for example, the device is in airplane mode and the app requires an internet connection. The major difference in my case is that I'm not necessarily looking to prompt the user just when the device is not on the internet but when whatever connection the device already may (or may not) have isn't the one I'm looking for (in this case, I'm looking for a closed/non-internet-facing Wifi ssid on an aircraft).
I appreciate any pointers that can lead me in the right direction.
It might not fit perfectly what you want but I think CaptiveNetwork is the closest you can get.
The API bindings for CaptiveNetwork are available in recent MonoTouch releases.

Turn iPhone into a server programmatically?

I want to make my iPhone app display on a Mac's screen, kind of like AirPlay does with other machines. The only way I have heard to do this is, although I do not like it, turn the iPhone into a server. Unfortunately, I cannot figure out how to do so. I also wanted to set it up in such a way that my Mac automatically detects it. I have seen a similar setup in the game Chopper 2. My Mac app will have a simple timer that fires every few seconds to look for the iPhone, in the same way that Chopper 2's "Find iPhone" button does.
Is there a simple way to turn the iPhone into a server, or start a "session" like Game Center does?
One last thing: I know it is somehow possible, because another app I have actually gives my iPhone a web address at the click of a button. It is called the Dicenomicon, if you want proof.
First there is no easy way to redirect your display to Mac, even if you made it a server of some kind.
Second, to discover or publish customized services on WLAN, you may want to refer to the samples on Bonjour:
CocoaHTTPServer: a simple TCP/HTTP server.
WiTap: an app that discovers and connects to services of the same kind on WLAN by Bonjour.
I'm not really sure what you mean by "server", because there is no way to share the screen of an iPhone using the official SDK, although this is possible by jailbreaking.
It would be possible, however, to send data back and forth between the Mac and iPhone, and display the data on the iPhone, on a Mac. Using that data, you could try to recreate the interface on the Mac. All of this could be accomplished using sockets. A class that might help with that would be cocoaAsyncSocket, which makes network programming a lot easier.
The auto-discovery of iPhones on the local network is achievable with Bonjour. Without getting into too many details, NSNetService would allow you to publish a service for your app from an iPhone, and NSNetServiceBrowser would allow you to find that service on the local network from the Mac. From the NSNetServiceBrowser, you could establish a socket connection with the iPhone.
Good luck!
You might want to take a look at the GameKit APIs, I know they do something similar between two iOS devices.
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/Introduction/Introduction.html

How to get notifications when I reach internet enabled area (wifi circle)?

Presently I'm working on a Windows Phone application that will work in both online and offline mode. So that if the net is available means I need to sync my offline data to the respective server. My requirement is if my app is working and when I reach a wifi-enabled circle (area) I need to get a notification. Otherwise need to race an event.
How can I achieve this? Is there any notification channel present in WP7 to inform about this? If yes please demonstrate some code to achieve the goal.
You can determine if you are connected to a network, you can get the connection type and the phone informs you when it goes on/offline:
NetworkInterface.GetIsNetworkAvailable() checks if you are online or offline
DeviceNetworkInformation tells you more about the network type (Wifi, ...)
NetworkChange.NetworkAddressChanged += new NetworkAddressChangedEventHandler(OnNetworkChangeHandler); registers a listener to listen for changes
Click here for an example on how to listen for changes. Also very good is this tutorial from MSDN, demonstrating all the goodies mentioned above!
I also recommend reading this blog post as it contains much valuable information about the different APIs.
PS: It is not possible to get a list of all available WLANs around the phone. You can only see the WLAN you are connected to (if). That is a limitation of the Windows Phone API.
The platform does not include support for the "GeoFencing" scenario you describe.
The best solution currently available is to periodically (using a Background Task) check to see if a connection is available and to begin the sync then.