Is there any API avialable in j2me through which we can access the sensor "accelerometer"? - java-me

I want to make a game based on the sensor accelerator. Is there any API available in j2me through which we can access the accelerator sensor. or is there any other idea regarding the same ?

Yes, there's such API - called JSR-256. Try to Google and you'll find appropriate resources.

Related

Rust STM32: webUSB publishing sensors

For a hobby project using the stm32f1xx-hal, I'm wanting to periodically read a sensor and then push the values such that I can graph them realtime in a webUSB app.
I have found an example in webusb_blinky by mvirkkunen which demonstrates the connectivity portion, but it's not clear to me how I would adapt it to publish sensor values. Should I be overriding control_in?
Any suggestions/help would be appreciated. Thanks!
You could define a control transfer that requested the device respond with the current sensor values but the more natural USB mechanism for publishing sensor updates is with an IN endpoint.
The usbd-serial module is the best example I can find of creating and using endpoints with this framework. A serial port consists of both an IN and OUT endpoint for bidirectional streaming of data. For your application you would only need the IN endpoint since the device only generates data.

HoloLens Geolocation Scenarios

I have a number of required business cases for HoloLens that require the device to understand a general geolocation, such as the current wearer longitude and latitude within 10 meters or so, as well as sending location information to and from an endpoint during various processes. Users WILL have a mobile device with geolocation capabilities that could assist in the process if necessary, and could also be used as a WiFi hotspot.
Is this a reasonable and reliable use case for HoloLens? Can apps be created that use geolocation and maintain connectivity during an experience, either on their own or with real-time communication to and from a mobile device that has these capabilities?
Yes - definitely is a realistic scenario. I've done some integration between a blue-tooth GPS and the Hololens. Let me know the particular device you're looking at and I'll see if I can get it working with the Hololens. //Lance Larsen (Microsoft MVP) - www.lancelarsen.com

libspotify register device for remote control

Firstly, what I would like to achieve. I am building media system using Raspberry Pi device. So far there is mopidy service which as far as I know uses libspotify to play music from Spotify. Everything works really well. Except I would like to control my Raspberry Spotify playback from my desktop Spotify client or from my Android phone. Official clients do allow this feature to switch device.
I would like to implement same feature using libspotify.
I'm not even sure if it's possible using public API.
Any ideas how to achieve such thing are welcome.
Libspotify does not expose Spotify connect functionality. It's a limitation of the library and Spotify show no interest in improving it. So, this is not possible.

How to communicate with mobile devices using Bluetooth in j2me?

I need to develop a project based on Bluetooth in mobile. Since I am new to j2me I studied some of the articles and run the project until the discovery of devices and services. I need to communicate between devices and transfer the desired files. I search code for client server communication through Bluetooth and got it but I didn't know how to run those code and implement further.
I have go through articles and I can run client server communication. Now I need to transfer the file and communicate to the user which was beyond the limit of my mobile through the another mobile which was within my limit.
JSR82.com has many articles and tutorials about how to use bluetooth from J2ME.
Better you refer the book, "BLUETOTH APPLICATION PROGRAMMING WITH JAVA API" by C.Balakumar. It is helpfull to you.

can J2ME access camera(image capture) event from N73 device

I am working on project where I need to catch the image capture event.
It's for nokia N73 having platform S60 3rd edition.
Is there any possible way using J2ME only (without using symbian).
Description:
J2ME application running in background, on click of capturing image from camera J2ME application initiates and comes in front. Takes the captured image and transfers it to J2ME app and displays on screen.
if not possible using J2ME , Is there any possible way using symbian? can anyone provide tutorial or code snippet?
Thank you.
Regards,
Rajiv
Not possible to access the native camera from J2ME. You'd need to get the user to start your app first, then access the camera from your app (using JSR 135, spec here, introduction and examples here). Then you can use the captured image however you wish.
HTH
The N73 in particular has a fairly large hardware limitation when you want to use the camera.
You need to have the user manually open the camera cover before you can use the camera.
This launches the native camera application included in S60.
The user then needs to close that application.
From that point on, J2ME can use the camera, via the mobile media API defined in JSR-135.
If the user reboots the phone, the camera cover needs to be re-opened before J2ME can use the camera again.
You may have better luck using J2ME and JSR-135 to capture images using the front camera on the N73.
I seriously doubt that J2ME would see the user pressing the camera key in javax.microedition.lcdui.Canvas.keyPressed();
JSR-135 doesn't really provide a system-wide camera capture event for J2ME.

Resources