Automating Chrome Cast Ambient Mode settings or Google Photo Album content - google-cast

I want to rotate out/toggle two images within my Chrome Cast's Ambient Mode (via Google Photo Album).
Possible routes that I see:
Delete image 1 and add image 2 of an album one day, the next delete image 2 and add image 1.
Each day, switch the selected Album within the Ambient Mode settings.
Methods I see:
https://developers.google.com/cast/, however there doesn't seem to be any mention of settings or ambient mode. I suspect these methods are not public.
ifttt, sadly I don't see anything even remotely along these lines already out there.
Is this possible, where could I look?

The Ambient mode content is managed by the Cast platform based on the selected content you have provided. There isn't an API to be able to control what content is selected to be displayed.

Related

Can I configure the Orchard Media Library Picker Field to require an image with specific dimensions?

In the past I've used the Image Field Module to require a user to provide an image of specific dimensions and it's worked great. I like the new Media Library Picker Field and it's integration with the Image Editor module to allow for cropping and re-sizing.
What I'd like to do is use the Media Library Picker Field but require the user to crop and/or re-size the image to specific dimensions. Is there any way to configure it that way? So far, the best I've come up with is to provide some help text to the user suggesting that they re-size the image to desired dimensions.
Should I just stick with the Image Field if I must have the image meet specific dimensions or is there a better way with the Media Library Picker Field?
You can't enforce that the image is supplied with specific dimensions using the Orchard 1.7+ media processing features, however you can ensure that it is displayed with correct dimensions.
Orchard 1.7 introduces the concept of media profiles, which effectively allow you to create a bunch of image transformations, name them, and then use them arbitrarily throughout your site.
On a recent project I was given a load of customer profile pictures for a testimonial page on an Orchard site. They were supplied in a variety of different sizes, and I knew I needed at least 2 different sizes (one for the main testimonial page, and a smaller one for testimonial widgets shown on other pages).
In the Admin Dashboard, I went to Media -> Profiles and created a new Media Profile called Customer_Profile_Regular, then added a Resize filter to scale it down to 100x100px (the resize filter is quite flexible, and you can create your own filters easily by implementing the IImageFilterProvider interface).
I did the same for a second profile, Customer_Profile_Small, scaling down to 50x50.
Then, using Shape Tracing, I overrode the existing Media Library Picker field display shape, and replaced it with this:
#{
var imagesField = Model.ContentItem.Testimonial.CustomerProfile;
}
#if(imagesField.MediaParts.Any()) {
<div class="customer-profile-image">
#Display.MediaUrl(Profile: "Customer_Profile_Regular", Path: imagesField.MediaParts.First().MediaUrl)
</div>
}
For the testimonial widget, it was simply a case of creating a similar shape override, supplying the other profile name.
Now I can upload any image to my media library, and use it as a customer profile image on a testimonial. Orchard will automatically resize (or perform other operations on) the image based on the profile I tell it to use, the result of which is stored in the site's Media folder so that it is only regenerated when necessary.

Is there a way to lazyload images before they become visible in the viewport using mod_pagespeed?

I configured my .htaccess to lazyload images using mod_pagespeed, but I don't want to affect the user experience by showing an image that is not loaded yet.
Is there a way to set a configuration and lazyload images some pixels before they become visible in the viewport using mod_pagespeed?
If you enable image lazy-loading in mod_pagespeed, the default behavior is to load images on "on scroll". We do have existing code paths to change this to "onload" - aka, load images after onload has fired, but unfortunately we haven't yet exposed it as a configuration flag. A feature for one of the upcoming releases! :-)
Current filter documentation:
https://developers.google.com/speed/docs/mod_pagespeed/filter-lazyload-images
Unfortunately, there is no current way to add an "offset" to when lazyload starts loading the image. It's currently set to the bottom of the viewport, and no option is exposed to configure this. However, I think this would be a valuable option to expose, and I've recorded your feature request at https://code.google.com/p/modpagespeed/issues/detail?id=644.

Orchard CMS create theme view for my content type

I am using orchard cms with the bootstrap theme.
I have created a content type: House
it contains FIELDS
image (media picker field)
Property Type (taxonomy field)
Location (taxonomy field)
It has PARTS
common
body
publish later
Title
Autoroute
I want queries of houses and be able to choose the view/ layout for them
e.g. layout called HouseList (for sidebars mainly) which will render: title, image and link to house, possible location and type but with out the links as defaulted. And then a fullDetails layout and a image only layout (so i can show a jquery image reel a widget say in a quadzone) How can i do all this please, i have tried in view Content-House.cshtml etc but i cant access the details model.content to choose what to display.
Im sure when i get the idea of how to do 1 i should be able to sort the rest. I have read documentation etc but there are so many different ways, ie placement file, change the parts, contents, create classes to handle display etc. sureley i am missing something simple like create a view for each list i want eg. houue-list, house-details, house-imageONly and then manipulate content.
Please help i have been trying different things for getting this site running for weeks and not getting very far. Examples would be fantastic but i have searched google for hours and found similar but nothing with enough details for a meer beginer.
Thanks
The standard way of doing that is placement to move things around and alternate templates for the different parts and fields. You can specialize placement and alternates with the display type, which is Summary when rendering in a list such as what a projection returns, and Detail for the detail view. More info on placement can be found here: http://docs.orchardproject.net/Documentation/Understanding-placement-info and on alternates here: http://docs.orchardproject.net/Documentation/Alternates
Now if you prefer to completely take over the rendering and do without placement, here are a few posts that may help:
http://weblogs.asp.net/bleroy/archive/2011/07/31/so-you-don-t-want-to-use-placement-info.aspx
http://weblogs.asp.net/bleroy/archive/2011/03/27/taking-over-list-rendering-in-orchard.aspx

How to create Android Google Play's Grid View like Widget with different size images loaded dynamically

Hi
I have enclosed two app images which has grid view like widgets with different image heights and widths, loaded dynamically ,i need to create the same type of UI ,i could be glad if someone guide me to start with.
A similar question was asked previously and this is the answer.
The developer used Bucket List Adapter to create the google play like list view.

UIImagePickerController to set a background image, not working

I am writing an iPhone app, where the user should be able to choose, an in-app background picture from his own photo album.
I am trying to enable this feature using a UIImagePickerController.
At this point I get the the box asking me to choose a picture and I save the picture.
But after that, when I want to use the image chosen as background, with this kind of code (which is the same as how I set the default background at start):
UIColor *backGrndPict=[[UIColor alloc] initWithPatternImage:
[UIImage imageNamed:pngPath]];
self.view.backgroundColor=backGrndPict;
Nothing works. I just get a white background.
Thanks for any tip.
Michel,
Just for clarification, are you saving the picture that the user selects as a .png file or in an UIImage?
If you did use the UIImage method, try double checking the retain count of the UIImage. Again, it may not be as simple as this, but that is what I did with my app and was getting the exact same issue.
If you did save it as a .png file, did you do an error check? Also, I have the "Applications" folder for my iOS simulator loaded on the screen perchance I have to verify both the availability and the integrity of the file in question.
Also, I tend to slip on the path sometimes too. I have have messed up the path one too many times by forgetting to use the saved path (the file that my app saved, almost always under the documents folder) vs. the default bundle path for the app which is where the bundled images are saved.
Hope it helps.

Resources