How to programatically replicate a mosaic style as in CardBuilder.Layout.COLUMNS? - google-glass

What are the components required to be able to do that dynamically?

I don't think GDK exposes APIs to make a mosaic style.
You can check out Comcast FreeFlow. It's open source and the example is also available on GitHub. The artbook example will give you a good idea how to use the library. (The example is an phone app but should be easy to modify to a Glass version.)

Related

Is it possible to call QR Scanner via Intent in GDK?

Native app for pairing Wifi on Glass contains QR scanner. Is it possible to use it via Intent in GDK? It would be useful for many use-cases.
At the end I solved it by using ZBar instead of ZXing. It was easier to integrate.
I have based my implementation on glassware GlassWifiConnect.
Result can be seen in glassware Glasquare.
As far as I know, that's an in app feature of the setup app. I'm currently working on porting over the ZXing barcode scanning app to Glass. Feel free to steal from it. The source is located on GitHub.
Also, one of the intents of this port is to allow other apps to request for barcode scanning, just like the original did, but it's not currently there yet. From a usability standpoint though, I feel that asking a user to install another app to do just the scanning is not ideal but it depends on user base or case. Either way, you are more than welcome to contribute if you feel that feature is necessary.

Open source c++ program that receives GPS (NMEA) sentences or x,y coordination and play a location on a map

My program reads GPS (NMEA) sentences from the serial port. I want to be able to see the location in those sentences (some of which contain x,y coordinates) in a map.
Is there a library (preferable open source) I can use to to that?
(It would really help me if it will work on both Linux and Windows, but if not, Windows is OK too)
Is the map component for system integration or just for diagnostic purposes? If just for diagnostic purposes, it might be easier to load the points into a web GIS solution such as Google Maps API or Esri's ArcGIS Explorer. ArcGIS Explorer is stand-alone, but Google Maps can be embedded. With Google, you'll have to use JavaScript to design the control.
In the Java world, OpenMap is popular.
If you need an open source C++ library, consider OpenStreetMap. It is a collaborative project that provide users and developers tools for mapping. In particular, checkout the frameworks wiki for a list of widgets and tools to use their framework. I believe they have C++ widgets you can leverage (although I haven't tried it myself).
For OSM, the widget controls for C++ are COSMCtrl (MFC), Marble (Qt), and QMapControl (Qt).
I'm certain there are other open source C++ widgets out there, but I don't have experience with them.
Did you try this :
http://nmea.sourceforge.net/#platforms ?

Can I make a game using c++ that will run on the web?

There is some libraries that lets you run C++. So, it is it possible to run a game that uses directx full mode screen?
Google is developing a tool to allow this kind of thing via Chrome. It is called Chrome Native Client, or NACL for short. http://blog.chromium.org/2010/05/sneak-peek-at-native-client-sdk.html
In general, no. Most online games are written with Javascript, Flash, the newly hatchedd HTML5 and similar technologies. Perhaps C++ integration is possible on some level, but you definitely cannot write a browser-hosted game purely and entirely in C++.
it could also be done with an ActiveX control. ActiveX only works in IE. there are Netscape plugins that work in other browsers. so make a solution that contains both. you need a book on ActiveX/COM/OLE. Better yet, take a class if you can find one, you will learn far more, because COM is not an easy subject to just read about and then really do - versioning is a big problem.
nope, not supported in firefox. but read this: http://www.google.com/chrome/intl/en/webmasters-faq.html#activex
some people may have activex controls disabled. if this is the case, your game will not run. you will have to tell the user that they will need to change their security settings in IE. you can get feedback from the object element in javascript as to whether or not the activex loaded. there is code out there for that.
http://msdn.microsoft.com/en-us/library/7sw4ddf8%28v=vs.85%29.aspx
examples are all over the internet.

What SDK should I use? c++

I have this program in mind that I would like to attempt and create in c++. I am not sure what SDK I should use, Here is the idea:
Basically like Facebooks status' or twitter but strictly for your desktop. Window like AIM or MSN would allow you to view your friends and their current status, allow you to comment on it, etc. When someone changes their status, all of their friends get a little notification on the bottom right of their screen saying what their friends current status is. There would obviously be much more that sets it apart, but this is the basic idea that I'm starting from.
If you plan to release it as OpenSource, the Qt GUI Framework is very much worth considering (you can buy a commercial license too). It is crossplatform (Linux/Win/Mac) - eg. Google Maps desktop app uses it.
It will give you networking support, HTML/XML rendering if necessary, SQL and much more.
As for communication protocols, go with Greg's suggestion.
A good choice for a cross-platform GUI system is wxWidgets. For communication between users, something like XMPP would be a good option, because it is a platform-agnostic open standard with solid support for user "presence".
Qt is a good crossplatform toolkit. Take a look at that.

Need a client-side interactive 2D world map: best map package? Or best C++ graphics/canvas library to make one?

I need a 2d political map of the world on which I will draw icons, text, and lines that move around. Users will interact with the map, placing and moving the icons, and they will zoom in and out of the map.
The Google Maps interface isn't very far from what I need, but this is NOT web related; it's a Windows MFC application and I want to talk to a C++ API for a map that lives in the application, not a web interface. Ideally I don't want a separate server, either, and any server MUST run locally (not on the Internet). What canned map package or graphics library should I use to do this? I have no graphics programming experience.
This is strictly 2D, so I don't think something like Google Earth or WorldWind would be appropriate. Good vector graphics support would be cool, and easy drawing of bitmaps is important.
All the canned options seem web oriented. SDL is about all I know of for flexible canvas programming, but it seems like making my own map would be a lot of work for what is probably a common problem. Is there anything higher level? Maybe there's a way to interact with an adobe Flash object? I'm fairly clueless.
Perhaps:
http://www.codeplex.com/SharpMap
ESRI MapObjects
http://www.esri.com/software/mapobjects/index.html
ESRI MapObjects LT
http://www.esri.com/software/mapobjectslt/index.html
See
http://www.esri.com/software/mapobjectslt/about/mo_vs_lt.html
for a comparison of the two MapObjects feature sets.
ESRI may have a replacement to the MapObjects libraries
You could extend your search by using the term GIS (Geographic Information System). I'm sure its gonna be easier. There's a lot of stuff out there on that subject.
Here's a page I found: http://www.ucancode.net/Gis-Source-Code.htm
or: http://opensourcegis.org/
You might want to try the Mapnik C++/Python GIS Toolkit.
You can take a look at the Marble Widget, which is part of KDE's Marble project. There are Windows binaries for this, too, but they might be dependent on Qt.
Yes, Marble has also the advantage that it provides kind of a ready made solution in a single control (called "widget" in Qt's technical terms).
The dependency on Qt (which is the only dependency btw.) might also be seen as an advantage: Qt's upcoming version is licensed under the LGPL, so even if you plan to use this in a proprietary application then there shouldn't be any real worries. And of course Qt and Marble are cross-plattform and provide an API that is very intuitive and easy to understand. Unlike common GIS solutions the Marble API and the usage of the widget is rather focused on people who don't know much about GIS. So its usage is quite easy to understand even if you feel scared by technical terms used in GIS.
Marble offers several interfaces to programming:
You can either create your own Marble plugins and paint inside those or you can subclass the MarbleWidget control. For a simple HelloWorld application see:
http://techbase.kde.org/Projects/Marble/MarbleCPlusPlus