I haven't seen this capability with any android app, nor have I seen anyone ask it. Is there any way that the Bluetooth or something can be used within your app to see a list of all the other android devices around you? For example, if my friend is using my app and he is in the same room I can see his device on a list in my app, and he can see mine...
There would have to be something that ties to two devices together, for example being on the same Wifi. As it is there is nothing that broadcasts to other devices that you are there by default. Even Bluetooth requires you to turn on discovery mode, or discoverable mode, and even then it will only stay on for a few minutes. If you wish for two devices to tie together, I am almost sure you could use the Bluetooth, but you would have to go through the normal process of discovery, synchronization, and permissions.
I don't think you can use BT to see what OS any phones around you are using, and they would also have to be set to discoverable.
If you want to make an app, it's possible to construct one where people agree to be located, but that's a voluntary issue, and it would be based on GPS radios in the various phones. I'm working on an app right now that has this capability, but again, it's something people sign up for so they can be located specifically for this purpose.
I would explore using the Google Latitude API as a possible avenue of exploration, before you reinvent the wheel creating a similar service.
Related
I am planning a social app that needs a functionality to detect when two people are really close to each other, and preferably something that would be hard to cheat. I know I could use GPS but since there are GPS spoofing apps and the accuracy is not as narrow as I would need (for instance, two people on the same building but many floors apart should yield negative) I wanted to see if I could do it through WiFi or Bluetooth.
Is it possible to have two Android devices detect each other on the same wifi network from an app? No other information besides their presence is necessary.
I know Bluetooth can easily be done if the devices agree on the connection everytime. But I needed automatic detection, meaning the devices would accept the connection only once, and everytime they get close to each other the detection would be automatic without asking for permissions, and without requiring one of them to perform any actions to scan for bluetooth devices. I assume this is not possible for privacy reasons, right? Although no exchange of data is necessary, just the presence.
If anyone has any suggestions of other ways to achieve this, feel free to suggest. I don't need details about the code, just to know what is possible and what isn't and what do I need to look into (for instance libraries or components from the sdk).
I know detecting devices unconditionally is very unlikely to exist, for obvious reasons, but what I am looking for should go through an initial "handshake" or permission between the two devices, in order to enable the detection to happen (over a limited time window of maybe a couple of days), so I guess it may be possible, although I couldn't find anything.
My company is looking at developing a mobile(Tablet) app that will need to connect to various sensors made by others using Bluetooth. These other companies have their own apps to connect with their individual sensors.
I need my app to be able to connect to their hardware (sensors).
Working with each manufacturer... What is the best way for their development teams to offer what I need without giving away all their code? In almost all cases their current sensor and app provide many more features than what we need.
Is there some middle ground where we ask only for the portions of code to perform the couple of functions we need?
Should they even be concerned about sharing their Bluetooth App code when they are the manufacturer of the sensor itself? Our app is only used to talk to their device which still needs to be purchased from them.
It's going to depend on their business model. Just ask. If they are willing to open up their peripheral, they will provide you with the API. Some might charge you for the "SDK".
You may be able to become a vendor and sign some contracts to ensure that they will continue providing the peripherals and support for them to some degree.
If they say no, it's generally not a good idea to reverse engineer it outside of hobby work. If they change their API, you'll have to change the app, and maybe they'll change it just to make your app stop working.
They can't really limit what devices can connect to it, but knowing how to communicate with the peripheral and having any credentials that it might ask for, is a different matter.
Is there any way to simulate the behaviour of a cellular mobile network (GSM/UMTS) in the Eclipse Android emulator?
More specifically: I want to develop an app to show information about the network, such as coverage level, parameters of neighbouring cells etc, as provided by the TelephonyManager and other related classes. I would like to do as much debugging as possible with the emulator, before testing in an actual phone.
For that I would need the emulated phone to "see" a functioning cellular network, with its protocols and parameters. Is that possible?
Emulator doesn't give you the option of setting that things. I have developed a toy app for showing network parameters and the only way I found was using a real phone.
By the way, not all phones implement all methods of Android's API, so you will find that some parameters will not be shown. And also many parameters are not available from API and you will need to get them throw AT commands (you will need a rooted device)
Note: I realize this question is two years old, but since this question received a slight edit from its original author 5 minutes ago and so got bumped back up to the front of the site, I am assuming that he may still be looking for an answer.
Yes, AT&T provides such a free tool to simulate and analyze different network conditions to a certain extent. And it can be used in conjunction with Eclipse ADT, Android Studio, or something else entirely. So it's not tied to any particular IDE.
http://developer.att.com/application-resource-optimizer
That being said, I have no idea if it will give you any cell tower related meta data.
Every now and then, the radio of my android phone silently dies because of some network related issues.
On the Nexus 4, it shows the empty triangle as if there where no service available in this area. On other phones it does not even do that. It looks like signal is fine.
Anyway, after the radio died silently no phone call / text message / data is going through in any direction.
The only hint I get from the System is the android.net.conn.CONNECTIVITY_CHANGE broadcast fired when the signal dies and wifi is not connected.
The only thing, that fixes the problem is restarting the phone.
Finally my question:
Does anybody know how to restart the radio completely by code?
I mean, it is a separate image running on a separate CPU. There must be a way to reboot it without rebooting the phone.
Maybe there is something, I can path into the Android ROM. I'm running CM here and be happy to patch it (again).
I tried fixing it by launching a system app by pressing *#*#4636#*#* on the dailer and stopping the radio and starting it again. But it did not help at all.
I recently made an app that checks the radio every time the connection changes. It shows a simple notification that tells me, I should reboot my phone. [1]
Issues reproduced on:
LG Nexus 4
Samsung ACE 2
multiple Apple iPhone 4*
Issues not reproduced on:
Apple iPhone 5
All phones running in the Dialog.lk network.
[1] https://github.com/felixb/network-checker
On a rooted device, one can issue the pkill command for all processes running as the user radio. I tested this on a Oneplus 3. The system seems to immediately restart the service:
pkill -u radio
Yes it is possible, but it will be difficult to perform on device without a deep understanding of the modem communications code of which multiple versions exist and even that will be dependent on if the system will permit you to even perform the communications on device.
The only one I am aware of that you can fully manipulate on device at this time is Qualcomm's (Qualcomm is standard in the majority of devices, but Samsung has used VIA in some cases which is a whole different monster, and even still another chipset or two exist), but to even be able to perform what your asking with Qualcomm's chipset, the following must be true:
The device must be rooted.
The application must have root access.
The system ROM must have the ability to place the cellular radio into modem diagnostics mode.
The device must have the appropriate permissions to permit the access.
At this point most people would connect their computer to their device and manipulate the cellular radio using QPST, CDMAWare, or QXDM. Options available to those users include everything from manipulating cellular subscriber data to restarting the cellular modem.
But, this is where things get tricky, you need to be be able to access this from the device side, which depending on the device, the operating system, and the configuration of it...may very well not be possible.
Also your application must be able to communicate with the cellular radio using the special protocol that the applications above use to do their communications which will require you becoming intimately familiar with that specification. The whitepaper for the Qualcomm diagnostics protocol is floating around on the web if you look hard enough for it.
Also on the not so cool side, if your application has access to the radio...so does any other rooted application (or even non-rooted, if you don't set the device permissions correctly) thus enabling rouge applications the ability to change your radio's configuration data potentially even bricking your device (which I have seen people do using the applications named above).
So my answer is Yes, you can do it, although:
Depending on your device you may not be able to, you should be well prepared to study and develop the needed tools to perform what you are wanting to do
No quick-start guide exist to be followed
Remember that you do so in the knowledge that your device could potentially be bricked either by a mistake in your coding or by a rouge application.
Rebooting the radio, as you have done in the device menus, may not help your problem, you may still require a device reboot
My advice is to use a much easier method and include a timer with automatic reboot in your current application, it is much safer, won't brick your device, and you won't have to become a cellular engineer to figure out how to accomplish it.
Your timer could begin counting down when the radio dies, and provide you an option to stop the reboot if your doing something important, otherwise it would restart your device and all would be ready when you reached for it to make a call or check your email.
Hopefully I was able to help, even though I know this is not the answer that you wanted.
Side note, if you could hijack Android's system configuration menus from an outside application you could potentially manipulate the radio state using the same methods used in Android...but you already discovered that restarting the radio in this method does not help your situation. Plus Android is designed to prevent such manipulation to prevent malicious applications from overtaking the UI of other apps and the system.
I've very interested in a new project, but it requires the user be able to access the phone's display via a wireless trackpad and screen. I'm thinking bluetooth is the best way to go. I can find a few resources regarding the bluetooth classes, but I can't find any resources for mirroring the phone's display or manipulating the ui with a trackball using blue tooth.
Are these two things possible? Could someone give me some information or point me towards some resources?
So you want to remotely control your Android Device with a Trackpad using Bluetooth for the connection? Do you need this for the whole Android System or just for your App?
If just for your App, their should be a way of doing this since communication between two Bluetooth-Devices runs over Sockets (like Client-Server communication). See the Androids Bluetooth API. But I'm also not sure how you plan to make the Android Device understand the Bluetooth-Commands which the Trackpad is sending to it (if you can even get both of them to connect to each other).
If you need it for the whole System, I'm not sure if this is possible (without rooting the phone and maybe writing some drivers for it), as I don't know any way of emulating a touch/click on the screen (which is basically what you want).
Although I know that there are some experiments running to connect a Bluetooth-Keyboard with an Android Device. But their is nothing official yet and nothing to look into (like SourceCode) as far as I can tell.
But maybe I'm looking at this a lot too complicated...