I created an application in j2me to get the current location of a device and I sent it to a nokia phone whenever I launch it, instead of showing the current longitude and latitude of the device it will open a bluetooth connection. Please help me with that what went wrong?
You may need to check what location methods you have enabled in phone's settings (in some Nokia phones, there is settings->application settings->location->my position->methods or something like that) to see if you have other methods except Bluetooth GPS enabled (Integrated GPS, WiFi, Network, ...).
But, I believe, that by default it would use internal GPS... does your Nokia really have it?
Related
Since the latest update (I think some time in December 2022), the built-in camera app on my Samsung Galaxy S21 asks for "Nearby devices" permission, and refuses to run if I don't grant it. By "Nearby devices" it means "Bluetooth". I don't know why it calls the permission
"Nearby devices": all other references to Bluetooth call it "Bluetooth",
and you can also access a nearby device using Wi-Fi or even NFC if the device
is close enough.
It doesn't actually need Bluetooth to take photographs, or even to record movies,
but you might have a Bluetooth microphone (I don't) and you might want to use
it to get better sound quality when recording a movie.
Of course the Android best practice advice at
https://developer.android.com/guide/topics/permissions/overview
is not to ask for runtime permissions unless and until you need them,
but Samsung aren't doing that.
I don't want the camera app to announce my presence by probing the Bluetooth headset of
anyone who happens to be near me, and they might regard such an action as intrusive.
So I don't want to give the camera app its nearby devices permission, but it won't
run at all without it.
So how do I get the camera app to run without accessing Bluetooth?
I found some workarounds for this. If your device supports it, you can download Expert Raw from the Galaxy Store. This will take still photos without requiring "Nearby devices" permission. However it doesn't seem to be able to do selfies because there seems to be no way to switch cameras, and it can't do movies or many of the extra tricks that the full camera app can do.
Another option is to run the camera app with Bluetooth disabled. Then it can have its "Nearby devices" permission, but it can't use it. The problem with this is that if you use Bluetooth at other times you have to remember to disable it and enable it.
So I wrote a tiny app which disables Bluetooth, runs the camera app, and restores the previous enabled or disabled state of Bluetooth when the camera app exits. I put this on my home screen instead of the camera app: it has the same icon. You have to remember to exit properly from the camera app using the Back button: the Home or Recents buttons leave my app and the camera app sitting on the task's back stack, so my app doesn't get to run and restore the Bluetooth state.
The app is available on github here in case anyone else wants to use this solution.
I am currently having some issues with connecting to my peripheral. The bluetooth module in our peripheral does not seem to be advertising a name initially. I've have found that once I connect to the peripheral for the first time it will update the name and my scanner is then able to see the correct name.
I have no understanding why this is the case. I have also tried it using the Swift app we are developing, as well as a range of Bluetooth scanners on iOS and Android so I do not believe that this is an OS or programming error on the scanner side.
Is there a specific parameter that should be set on the peripheral. As I am just the app developer I do not have very much understanding about how the module is handing the process.
Any help would be much appreciated.
Just to confirm the scanner does not see a name for the peripheral until it has connected once. After this it will start displaying the name. Once the peripherals name is changed the old name is still being displayed until I have connected to it once again.
To display the name of device you need to see in advertisementData Dictionary which contains several keys depending on your device, in callback of didDiscoverPeripheral from CentralManager.
- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary<NSString *, id> *)advertisementData RSSI:(NSNumber *)RSSI
You can look for key CBAdvertisementDataLocalNameKey.
If you do not see the name, you can make changes in your firmware to include a name in GATT characteristic .
You can use LightBlue app to verify once. This is a good app on app-store to test your BLE device.
I am writing a Tizen app (web app/Javascript) for Samsung Gear S2. I am trying to send XHRs, and this works fine as long as connected via WiFi. However, when connected to my phone via bluetooth, there is an error and the connection can't be established.
I have read different information that this might not be possible at all / not be possible due to an SDK bug / only possible when routing the information through an Android app on the phone / etc.
Does anyone of you know what the issue is and how it may be solved?
Thanks!
The bluetooth interface is managed by the SAP (Samsung Accessory Protocol) and you could the SAP SDK to achieve what you want.
http://developer.samsung.com/gear/develop/creating-your-first-app/setup-sdk
Does every j2me enabled mobile have GPS service so that the developer can locate its latitude and longitude?
Just because a phone can run J2ME it does not mean that it's manufacturer placed a GPS unit in it. As far as I know there are mobiles which can run Java applications but do not have a built in GPS. If you want to find the location of your phone, you can resort to triangulation, where you use cell towers to locate the phone. That being said, this method offers at best, a relatively large margin of error.
If the triangulation mechanism does not work for you, you will have to restrict your application only to GPS enabled phones.
I am from Bangalore-India. I have developed few J2ME applications that involves client/server interaction through HTTP connection.
I am testing my application on both the leading operators of the country- Airtel and Vodafone. My Midlet works fine with S60rd edition and S40 2nd edition(6030) phone. but as soon as i switch to S40 3rd edition phones like 6233, I am not able to acces the GPRS through my MIDLET. Though the GPRS is working fine with the native phone browser.
Even the MIDLET is not able to access GPRS on currently released phones such as 5310 Xpress Music and 3110 classic.
I have done some packet captures as weel at my server end but the observation is that my request is not reaching upto the server.
I have gone through tons of web references that talk abt APN settings, but no solution has worked for me :(
Is there anyone who can help me out so solve this S40 specific problem.
Thanks in advance.
Can you access GPRS from any MIDlets other than yours? If not, then it sounds very much like a GPRS settings problem.
If I remember correctly, S40 handsets have a Streaming settings option in the settings menu. Ensure you've created a GPRS access point which is referenced in the streaming settings option.