Google glass clear cache - google-mirror-api

I was trying to resize an image to fit into a timeline template. (if it matters, I'm using the html attribute of the timeline) However, it was not rendering it properly. I got frustrated. Then I figured out that glass is using the same image. I just changed the name of the image and the url and it worked. Is there a way to clear the cache ? There might be a scenario where you change images on the server side and have the same timeline item (say a pinned item) access them at some other time interval. Thoughts ?
UPDATE
Request submitted in issue tracker
https://code.google.com/p/google-glass-api/issues/detail?id=30&thanks=30&ts=1367387959

There's no built in feature that triggers the timeline to clear it's cache, but it does respect the cache headers that you set. During development, use cache control headers to prevent the image from being cached.
If this isn't possible, you can work around this by adding a random GET parameter to the end of the image URL when you insert the card into your user's timeline.
All that being said, this seems like a useful development feature. You may want to request it in the API issue tracker.

put the same answer on your g+ but here it goes:
If you can enable adb, try using "adb reboot recovery" and see if you can get the option to pop up there.
Usually to get a menu up in recovery you have to press power and the up volume key (which i would assume would be the only other key on glass in this case) at the same time. then the volume key(s) scroll through options and the power button selects one.
Let me know if it works out.

Related

How to get the current state of the tablet

Is there a way to get the current state of the tablet - if it is in sleep mode, in screen saver mode or if a picture is loaded - to get the name of the loaded picture for example. I didn't find anything in ALTabletService API, but judging on ALTabletService::resetTablet() - Reset the tablet as if no one used it before, i.e. clean the stack of activities, the web browser content, and the web browser cache. there is a stack of tablet activities and perhaps there is what I am looking for.
I don't think you can actually do that. You have to assume it's doing the right thing. If you need to check if your webview is loaded properly, why not raising an Event every 15s from the javascript and subscribe to it from Python? then as soon as Python does not receive this event for 15s, it can reload the page !

GPS tracking in Kinetise application

Anyone here familiar with Kinetise? I try to add to my app some kind of remote tracking functionality, where backend will trigger from active user his GPS position. What first come to my mind was PUSH notifications, but it's rather message notification than event triggering in this tool. In taxi template there is a map with live changing positions, realized by longpooling requests I think. I found that you can add your current position in request params or body and I consider to use this technique to send user location to server, but I think that I would have to add empty lists in each screen, just to send a location. A bit weird but maybe there is any better solution?
#Marek for GPS purposes you have also functions:
GPS TRACKING START
GPS TRACKING STOP
You can add it to buttons from widget "EVENTS" tab.
EVENTS tab
I know it's not triggered by server but can help you meet your requirements.

WP7 WebBrowserTask without url entry textbox

This might not be possible but I thought I'd check with everyone.
Is it possible to load a WebBrowserTask on WP7 but to have the url entry box collapsed? I'd also like to set IsHitVisble to false?
The reason I want to do this is to load a url (through databinding) but ensure that the user can't browse to other links on the page. I also need to keep the phones share control in the tool bar so I can't just use a webbrowser control and set the source to the url.
Does anyone have any ideas?
Not possible. You can use a WebBrowserControl inside your own app, but it's not recommended.
Basically such odd/weird limitations as this, don't belong in any modern day craftsmanship. And thus why it isn't a possibility (thanks Microsoft!)

Most efficient way to transfer images to a Silverlight client

I have an application that shows a screen of image thumbnails, each image is around 80k and they are stored in a database. To keep response time reasonable, the appilcation displays a placeholder image when it first starts and later downloads the images from the server. I'm expecting to show around 40 images on the screen at once so that's my batch size. What's the best way to serve these images up to the client? I've got two options in mind.
Create an ADO.NET Data Service that exposes the Images database table to the client. The client can asynchronously request the images, one at a time, and display them as they come back from the server. I've implemented this solution and it seems to work Ok; the speed isn't great and I feel like I could utilize the Http pipe better by requesting maybe 3 images at a time.
Create an HttpModule on the server that looks for requests that look something like /Images/1.jpg and then reads the database and returns the requested data. On the client side I can have many Image objects whose source points to the virtual Urls on the server. My theory is that by just giving Silverlight many Urls to deal with it may be able to transfer the images more efficiently than my code in option 1.
Would either of these methods be more efficient or is there another technique for getting this done? Thanks!
I don't know if it's more efficient, but I've accomplished a very similar task using an HTTP Handler (ashx). The handler pulls the image in from the database based on the Parameters in the uri (image ID), and then Silverlight fetches them asynchronously by setting the Source property of an Image control to the URI of the handler with the specific ID that I want in the query string. The Image control, in turn, is inside of an ItemsControl which allows me to display multiple images.
We are doing something very similar, and we are just using an ASPX page to server them up with a query parameter of the image identifier. We are also caching the images, and the ASPX page will used the cached value if it exists. If not, we pull it from the data store, cache it, and send it down. It is working really well for us.
Have you looked at using Deep Zoom? It's very efficient about progressive image loading, and gives you a nicer user experience when the images are fully loaded.
Examples:
Hard Rock Memorabilia site
Deep Zoom Pix

Why do analytics use 1x1 pixels?

What are the reasons that cause plugin analytics to use 1x1 img pixels to call their code? What permissions does this shortcut?
The server hosting the 1x1px image logs the request. This allows collecting statistics about who loads (and renders) the page with the image. Browsers in general allow cross origin in img tags.
Also, this allows javascript to be loaded from the same domain as the image.
Behind these image is a server-based script like php, python or so on which can get and log information about the visitor (visited page, referer, ip, ...) for the tracking-stats. The server will be able to get all information you can get on the serverside from a http-request. The benefits of this methods are that it works on nearly all browsers and devices. Its also lightweight because an 1x1 image will cause nearly zero bandwitch.
Its a common solution to track pageviews. To get more flexible, some alternative tracking-methods like pwiki don't even use javascript. They're inserting a tracking-pixel which also works when the user has javascript disabled or he is using some plugins which remove tracking-scripts.
It also works on emails so that the sender has information about which and how much users read for example a newsletter-mail. But nowadays nearly all deskto- and webclients are blocking images in emails by default to prevent these tracking-methods. Images will only be displayed when the user explicit allow this for a specific domain.

Resources