Beacon UUID vs BeaconLayout - uuid

I am currently interested on how Beacons are working but I have some questions about it.
For iOS, I only see source code about Beacon UUID. But for Android, I only see "beacon layouts".
Are they the same? Can they be converted from one format to another?
Let's say I have this Beacon UUID:
636f3f8f-6491-4bee-95f7-d8cc64a863b5
Is this possible to get the beacon layout? But more specifically, what's a beacon layout exactly?
Thank you!

A beacon "layout" refers to the beacon format, specifically how the different fields are encoded into bytes needed to transmit the information inside Bluetooth LE advertising packets.
Some companies like Apple maintain their beacon formats as trade secrets, so they don't allow them to be published. Open source modules like the Android Beacon Library can't include ways to decode these beacons without publishing them. So they use a layout string, which is a way for a user to quickly and easily tell the library to decode that beacon.
Here's an example for the open-source AltBeacon format, which doesn't mind folks publishing it:
m:2-3=beac,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25
This means that a bluetooth LE beacon transmission matching this layout can be encoded/decoded like this:
Uses a manufacturer advertisement packet (m) with a two byte type code of 0xbeac in byte positions 2 and 3.
Has its first identifier (ID1 equivalent to iBeacon UUID) in bytes 4-19.
Has its second identifier (ID2 equivalent to iBeacon major) in bytes 20-21.
Has its third identifier (ID3 equivalent to iBeacon minor) in bytes 22-23.
The "p" and "d" parts of the layout refer to a "power" calibration value for distance estimates and a "data" field to store battery level and other manufacturer-specific information.
There are several other popular beacon formats like iBeacon and Eddystone. They have their own layout strings, which are both very similar to the one shown above.
While you can't use different beacon formats interchangeably, you can use all these beacon formats on both iOS and Android. Using a proprietary format on Android is just a matter of doing a Google search to find the right layout string for the beacon format, then configuring it like this:
BeaconManager.getBeaconParsers().add(
new BeaconParser().setBeaconLayout("<paste layout string here>"));

Related

CodeNameOne LocationManager w/o GPS

on Android device there are at least two options for geolocation:
GPS Satellites
WiFi & Mobile network location
if #1is checked then LocationManager.getCurrentLocationSync gets a proper location but what if only #2 is checked? On my device I simply get LocationManager.OUT_OF_SERVICE and thats it...
If I use LocationManager.getCurrentLocation when #1==false && #2==true I get null...
How can I read devices location based on WiFi & Mobile network location if GPS is turned off? ( or we are not outdoors for example )
As discussed here (3rd paragraph): http://www.codenameone.com/blog/easy-demos-flip-more.html
You can just define the build hint: android.includeGPlayServices=true
Which will implicitly switch the location API to use the Google Play Services hybrid location. This will use the GPS when available, but also many other sensor elements to produce a more accurate and battery efficient location.

Phones dialing wrong number from tel-hyperlink

We received a complaint that some visitors to our website are dialing the wrong number to get in contact with us.
Our website has a hyperlink in the following form in the footer:
Call us at 12345678
Note that the "+47" (international code) is NOT displayed visually, it is only included in the hyperlink. But now it turns out a limited number of people (circa one a day) is actually calling a private local number at 47123456. Not many considering the size of our business, but still a major nuisance for the family receiving these calls.
The people calling say they just pressed the link to dial.
Has anybody else had these problems? Is anybody aware of mobile phones that do not properly support the tel hyperlink? Any suggestions for a solution? (Apart from changing our or their phone number, of course.)
There are different ways smart phones pick a telephone number.
some are reading the text of your website - some use the tag
on my first try: I would add the +47 to the displayed telephone number
on my second try (or both together): I would replace +47 with 0047 (its norway - or?)
and before posting i got a third idea: which encoding has the webserver and which encoding has the html / PHP page in sourcecode? Both UTF-8 or something else?
Maybe your server is sending it in a different way than the website is created and somehow some smartphones can't handle it correctly.
The problem here is pretty simple: this is the URL-Encoding.
The + char is an reserved character within the URL and represents an space.
To get an actual + sign replace it with the URL encoded version: %2B
See Links for details:
Wikipedia
W3Scools

call recording on samsung phones(TAB 2)

I have been working on a call recorder app which is working fine on MEDIATEK(XOLO, Micromax etc) phones and Sony Xperia SP.
But Samsung is giving me nightmares. I have tried two samsung phones specifically Galaxy Tab2 and one I don't remember name of(let me know if you want to know).
Can anyone tell what settings are needed for Samsung. I have used these:
mRecorder = new MediaRecorder();
mRecorder.setAudioSource(AudioSource.VOICE_COMMUNICATION);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
mRecorder.setOutputFile(outputFile);
I have tried almost all the combinations of every audio source VOICE_COMMUNICATION, VOICE_CALL, DEFAULT, MIC etc with every audio format and every audio encoder namely 3gpp, mp4, AMR_NB, AMR_WB etc.
I have read many forums regarding this problem but most of them are either unsatisfactory or too old to consider.

What is Smooth Streaming Media Element TotalBytesDownloaded

I want to know what is TotalBytesDownloaded field, in Microsoft.Web.Media.SmoothStreaming. MSDN conveniently states it as "The number of bytes downloaded.". But is it the number of video-bytes downloaded by the player or all the bytes including any other server requests and response you might be making on top of the player(for logging purposes)
It's the total number of bytes downloaded for both video and audio requests for an AV presentation.

Google Waves - basic structure

Is a wave limited to the sharing of textual information (HTML), or am I correct in assuming that a wave can contain arbitrary data (represented in XML), so long as it also contains the javascript necessary to render it in a meaningful way?
I ask because the collaborative document preparation demonstrated in the Google I/O video looks very powerful, but there are many other types of documents than simple rtf text. In my case I would be looking interactively to develop gantt charts.
There is a lot that can be done inside each Wave. They have not yet made all features available, but here is a link to some samples: http://wave-samples-gallery.appspot.com/ which includes my Slashdot Gadget:http://wave-samples-gallery.appspot.com/about_app?app_id=18006
The Slashdot Gadget actually takes the RSS feed for Slashdot and displays the latest headlines.
Here is the XML: http://www.m1cr0sux0r.com/slashdot.xml
alt text http://www.m1cr0sux0r.com/xml.jpg
I got access to Google Wave a few days ago, and here's what the raw data for their Sokoban game (which supports two players playing simultaneously on the same board) looks like, for example:
<blip>
<p _t="title">
</p>
<p>
<w:gadget author="blixt#wavesandbox.com" prefs="" state="" title="" url="http://sokoban-server.appspot.com/com.example.simplegadget.client.SokobanGadget.gadget.xml">
<w:pref name="playerAllocation" value="1 1,blixt">
</w:pref>
<w:pref name="totalMoves" value="8">
</w:pref>
<w:pref name="playerPositions" value="1 4,2">
</w:pref>
<w:pref name="rockPositions" value="6 2,2 3,2 14,2 15,2 16,2 4,3">
</w:pref>
</w:gadget>
</p>
</blip>
So yes, you can store any data you like in a single blip, with the possibility to go backwards in "time" to see older versions of the data etc.
By the way, if you're interested in seeing some code for a robot that sits in a wave and interacts with users, I made one for a game I'm developing: Google Code Project for multifarce (and the game in question, it's not really public yet and as such not particularly functional.) The bot source is here: multifarce Wave robot source
Basically, all you need to get a bot running are the 14 last lines in that code. I love it! =)

Resources