J2ME Location API on the N95 - Need to open Nokia Maps to warm up GPS? - java-me

The location API only seems to work for me when I warm up the GPS by opening Nokia Maps or Google Maps.
The Google Maps app has a status balloon which shows the number of satellites and lets the user know when the connection is active, however I have not found anything in the J2ME Location API docs which specifies how to do this.
It seems like these apps are calling some function which kick-starts the GPS. Without opening them the Location API will just time out in my app.

Use LocationListener ... :)

Related

Smart home google action not responding and device is always offline

I created a smart home action using action-on-google and nodeJs, and it works fine. When you say turn on switch off, it sends MQTT request to my server, means that onExecute function works fine but the problem is that google doesn't respond to my command by OK it says "sorry it looks like your device not available right now", I observed also that my device is always offline in Google home app. Is it required to work with firebase and get device state from there?
Firebase is one of web services allowed to store a device's states. You can feel free to use other web services.
If your device is offline, it may be because your Google Home App hasn't received your device's states.
Here are two paths for Google Home App receiving your device's data:
Google Server will send a action.devices.QUERY intent and callback your function (e.g. onQuery) to get the data of your device through your fulfillment, see action.devices.QUERY.
Thus, please print logs in the onQuery function and make sure that your function works fine.
Your smart home action must use the API of reportStateAndNotification to update your device's data in the Home Graph, see Method: devices.reportStateAndNotification.
If Google Assistant gives you "Sorry, device is not available right now", it probably is because the Google server hasn't received correct information from your fulfillment. Please follow the suggestions above and try it again.
If you're still having issues, check your logs to identify the particular issue for that device.

Getting spotify desktop player status

I come from an electronics background, with a project whereby I'd like to be able to obtain various information about the state of the desktop player, eg
Current track name
Current track artist
Position in song
Play/pause status
Is there an active API or other method which will allow me to obtain this information and get it out of the desktop app itself, such that I might be able to send that information out via a COM port?
Thanks in advance.
You could use my .NET Library SpotifyAPI .NET
It combines the spotify-local and spotify-web API.
Also, it provides all your required information and is simple to use.
Small example:
SpotifyLocalAPIClass spotify = new SpotifyLocalAPIClass();
if(!spotify.Connect())
return;
SpotifyMusicHandler mh = spotify.GetMusicHandler();
SpotifyEventHandler eh = spotify.GetEventHandler();
Console.WriteLine(mh.GetCurrentTrack().GetTrackName());

How to lookup Spotify User metadata (playlists, currently playing, etc)

I only see Artist, Album, and Tracks lookups in the docs. I want to display what I'm currently listening to. Is there a way to do this using the API?
https://developer.spotify.com/technologies/web-api/lookup/
Spotify does not provide this at this time. You can either get it by turning on last.fm scrobbling or accessing facebook music data.
As Thomas said Spotify does not provide such a feature 'directly'.
But there are some ways to get it work.
You have to me some more sprcific what you want to do. Web/Desktop/App
I wrote a tiny console app using an external dll
"File/Link removed" - send pm for further information!
If this is what you need just message me. It's a rly tiny application just for test purposes! Because I currently develop a overlay.

Cisco call manager api to conference a device

I'm trying to implement some click to dial functionality as follows:
A user finds a number on a webpage (say employee extension)
Clicking that extension will dial a phone number that I've picked
Upon answering that call, I am immediately "conferenced" into
calling the number I actualy wanted to dial.
I've done something very similar using a Twilio API but want to use our corporate Cisco Call Manager capabilities instead of paying per minute for this functionality.
The WebDialerSOAP doesn't seem to be able to give me this functionality. I think doing a conference would work but can't find anything to do that. Possibly an open source call manager wrapper?
why not a FreeSWITCH server alongside the CUCM? It can set up conferences, and it's one of themost programmable products with as much control over API as you want.
It has also an RTMP module, so you can actually run a Flash-based softphone out of your browser
Use TAPI3 or JTAPI
Connect the code using TSP, and Application user
use CreateCall function to the number from HTML page with implementing the trigger.
use CreateCall to the other phone.
use Finish(FINISH_MODE.FM_ASCONFERENCE) to complete conference.

Foursquare API for mobile application

Im new to foursquare api. I would like to know whether foursquare api will return the latitude and longitude of the user location(when GPS enabled), or should we use another method to get current user location.
Thanks in advance
You should get current user location reading GPS data from user device and use it when requesting Foursquare API endpoints. For an example, see https://developer.foursquare.com/docs/venues/search
As far as I know, a server API (such as Foursquare) has no means to get your current location except for Geo-IP services (not always accurate).
I have found that when using venue/search, etc. to find information, the response back to the api web call is filled with all sorts of information, including a "field" called location, that on android systems had to cast to JSONobject then you can get the lat and long of that place and distance from you if used with radius. Like above, use your gps and the development language to get that information.

Resources