VAST Viewable Impression not firing - vast

Is there anything wrong I am doing, or maybe missing something?
I tried with different VAST testers online but it doesn't work firing one of the Viewable Impression (Viewable, NotViewable, ViewUndetermined) (the example.com/track/impression) not firing at all.
Code:
<VAST version="4.0" xmlns="http://www.iab.com/VAST">
<Ad id="20004" sequence="1" conditionalAd="false">
<InLine>
<AdSystem version="4.0">iabtechlab</AdSystem>
<Error>http://example.com/error</Error>
<Extensions>
<Extension type="iab-Count">
<total_available><![CDATA[ 2 ]]></total_available>
</Extension>
</Extensions>
<Impression id="Impression-ID">http://example.com/track/impression2</Impression>
<ViewableImpression id="1543">
<Viewable>
<![CDATA[http://example.com/track/impression]]>
</Viewable>
<NotViewable>
<![CDATA[http://search.iabtechlab.com/error?errcode=102&imprid=s5-ea2f7f298e28c0c98374491aec3dfeb1&ts=1243]]>
</NotViewable>
<ViewUndetermined>
<![CDATA[http://search.iabtechlab.com/error?errcode=102&imprid=s5-ea2f7f298e28c0c98374491aec3dfeb1&ts=1243]]>
</ViewUndetermined>
</ViewableImpression>
<Pricing model="cpm" currency="USD"><![CDATA[ 25.00 ]]></Pricing>
<AdTitle><![CDATA[VAST 4.0 Pilot - Scenario 5]]></AdTitle>
<Creatives>
<Creative id="5480" sequence="1" adId="2447226">
<CompanionAds>
<Companion id="1232" width="100" height="150" assetWidth="250" assetHeight="200" expandedWidth="350" expandedHeight="250" adSlotID="3214" pxratio="1400">
<StaticResource creativeType="image/png"><![CDATA[https://www.iab.com/wp-content/uploads/2014/09/iab-tech-lab-6-644x290.png]]></StaticResource>
<CompanionClickThrough><![CDATA[https://iabtechlab.com]]></CompanionClickThrough>
</Companion>
</CompanionAds>
<UniversalAdId idRegistry="Ad-ID" idValue="8465">8465</UniversalAdId>
</Creative>
<Creative id="5480" sequence="1" adId="2447226">
<Linear>
<TrackingEvents>
<Tracking event="start">http://example.com/tracking/start</Tracking>
<Tracking event="firstQuartile">http://example.com/tracking/firstQuartile</Tracking>
<Tracking event="midpoint">http://example.com/tracking/midpoint</Tracking>
<Tracking event="thirdQuartile">http://example.com/tracking/thirdQuartile</Tracking>
<Tracking event="complete">http://example.com/tracking/complete</Tracking>
<Tracking event="progress" offset="00:00:10">http://example.com/tracking/progress-10</Tracking>
</TrackingEvents>
<Duration>00:00:16</Duration>
<MediaFiles>
<MediaFile id="5241" delivery="progressive" type="video/mp4" value="100" bitrate="2000" width="200" height="200" minBitrate="1500" maxBitrate="2500" scalable="1" maintainAspectRatio="1" codec="H.264"><![CDATA[https://iabtechlab.com/wp-content/uploads/2016/07/VAST-4.0-Short-Intro.mp4]]></MediaFile>
</MediaFiles>
<VideoClicks>
<ClickThrough id="blog"><![CDATA[https://iabtechlab.com]]></ClickThrough>
</VideoClicks>
</Linear>
<UniversalAdId idRegistry="Ad-ID" idValue="8465">8465</UniversalAdId>
</Creative>
</Creatives>
<Description><![CDATA[This is sample companion ad tag with Linear ad tag. This tag while showing video ad on the player, will show a companion ad beside the player where it can be fitted. At most 3 companion ads can be placed. Modify accordingly to see your own content. ]]></Description>
</InLine>
</Ad>
</VAST>
Any help would be much appreciated.

Related

How can I open an App using it own background service

I'm creating Xamarin.Forms App and it has a service that runs in the background monitoring if any messages arrive. If a message arrives, the service should open the App.
I tried to open the App using Intent (Dependency Service) and I also tried using Xamarin.Essentials. Neither way worked.
My last attempt was with Xamarin.Essentials and gave the following error:
[Error][1]
[1]: https://i.stack.imgur.com/5jPGf.png
This is my code using Intent (Dependency Service):
//Intent (Dependency Service)
string teste = "com.saferit.saferproject";
openAppManager = DependencyService.Get<IAppHandler>();
openAppManager.Initialize(teste);
openAppManager.LaunchApp();
[enter image description here][2]
[2]: https://i.stack.imgur.com/lLx3g.png
This is my native code for Android
public void LaunchApp()
{
Intent intent = new Intent();
intent.SetClassName(Package, "activity");
intent.AddFlags(ActivityFlags.NewTask);
Xamarin.Forms.Forms.Context.StartActivity(intent);
}
[Complete Native Code][3]
[3]: https://i.stack.imgur.com/G4zOV.png
This is my AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.saferit.saferproject" android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="27" android:targetSdkVersion="29" />
<!--<application android:label="SaferProject.Android"></application>-->
<application android:label="com.saferit.saferproject" android:icon="#drawable/logo">
<activity android:icon="#drawable/logo" android:label="com.saferit.saferproject" android:name="com.saferit.saferproject">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="com.saferit.saferproject" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
This is my attempt using Xamarin.Essential:
//Xamarin.Essentials
var appname = "com.saferit.saferproject://";
var supportsUri = await Launcher.CanOpenAsync(appname);
if (supportsUri)
await Launcher.OpenAsync(appname);
Looking for here at stackoverflow I found this question:
Open Notification list page when user clicks on navigation
I tried to implement it on my App but I also couldn't get it to work.
In all three cases the errors are very similar.
I think the problem is in the configuration of the URI of my App.
Can someone help me?

EWS getting phone number from directory folder

I'm querying EWS with DistinguishedFolderId set to Directory. If I add
<t:FieldURI FieldURI="persona:PhoneNumber" />
to the field URIs I don't get the phone number returned. Also if I try to expand the BaseShape to AllProperties I get a failure.
<soap:Body>
<m:FindItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="persona:DisplayName" />
</t:AdditionalProperties>
</m:ItemShape>
<m:IndexedPageItemView MaxEntriesReturned="100" Offset="0" BasePoint="Beginning" />
<m:ParentFolderIds>
<t:DistinguishedFolderId Id="directory" />
</m:ParentFolderIds>
</m:FindItem>
</soap:Body>
What I'm trying to do is construct a query which will return me the person (not the contact, I need to look into the directory not the contacts) details with the phone number from the tenant.
Ok - found the answer to this one. FindPeople and FindItems aren't going to return the phone number by default, that's some kind of extension.
See here and here where it was partially answered on msdn forums. The solution proposal is to use the GetPersona method and query each PersonId individually.

How to create Orbeon custom control XBL with predefined visibility, control name, default value?

I have created a custom control (hidden text box with some predefined value), where I want to set visibility=false(), controlName="Mycustom", default value="This is my custom control" in XBL file. So that whenever we use that custom control from Orbeon Form Builder, it will come with all default values with no need to set anything.
XBL:
<xbl:xbl xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:saxon="http://saxon.sf.net/"
xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:exf="http://www.exforms.org/exf/1-0"
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl">
<metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
<display-name lang="en">Epson Custom Controls</display-name>
</metadata>
<xbl:binding id="fr-custom" element="fr|custom" >
<metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
<display-name lang="en">My Custom Control</display-name>
<icon lang="en">
<small-icon>/forms/orbeon/builder/images/input.png</small-icon>
<large-icon>/forms/orbeon/builder/images/input.png</large-icon>
</icon>
<templates>
<bind xxf:whitespace="trim"/>
<view>
<xf:input id="myCustom" ref="" xmlns="">
<xf:label>My Custom lable</xf:label>
<xf:hint ref=""/>
<xf:help ref=""/>
<xf:alert ref=""/>
</xf:input>
</view>
</templates>
</metadata>
</xbl:binding>
</xbl:xbl>
Using above control I want hidden text box with value='This is my custom control' and its control name should be Mycustom.
Update
I have tried with below changes, but it is not working
<templates>
<bind xxf:whitespace="trim" relevant="false()" xxf:default="'This is my custom control'"/>
<view>
<xf:input id="myCustom" ref="" xmlns="">
<xf:label>Success Message</xf:label>
<xf:hint ref=""/>
<xf:help ref=""/>
<xf:alert ref=""/>
</xf:input>
</view>
</templates>
With above changes now its working (control is hidden with some default value).
Can you please let me know how to put if condition
properties-local.xml:
<property as="xs:string" name="oxf.fr.detail.process.save-final-custom.*.*">
require-uploads
then validate-all
then save
if({xxf:instance('fr-form-instance')//customMessage} != null)
{
then success-message(message = "{xxf:instance('fr-form-instance')//customMessage}")
}
recover error-message("database-error")
</property>
Here I want to override this success-message if it properly configured from backed. If it's value is null then want to show OOTB message(don't override).
Update2
Integrated changes in Hybris. below are the changes I have made in Hybris
Create XBL > orbeon > custom > custom.xbl
<bind xxf:whitespace="trim" relevant="false()" xxf:default="'This is my custom control'"/>
Issue :- When we select custom control, it will bind without any lable/message/visibility etc. But if I refresh left control panel then label start appearing on the form. but still default message is not set.
Let's take the items you mentioned one by one:
visibility="false()" – I imagine you're referring to the relevant attribute in XForms, instead of the visibility attribute. (Form Builder calls this "visibility", because this is what it is, but in XForms, the attribute is relevant.) This can be done by having inside the <templates> a <bind relevant="false()"/>.
controlName="Mycustom" – You can't set the id of the control in XBL. (BTW, when using Form Builder, the XForms id is inferred from the control name defined by the form author in Form Builder.) The id is set by whoever uses the control, not whoever defines it, otherwise, for one, this would prevent you from having multiple instances of that control in the form.
default value="This is my custom control" – As in #1 above, you can do this with <bind xxf:default="'This is my custom control'">. Note the added single quotes, as the value of xxf:default is an XPath expression.

Orchard CMS Data Import

I am attempting to import data into Orchard CMS. I have a custom type, made up of parts and fields, and I am using the ImportExport module. I have exported some data from Orchard to ensure the XML schema is correct, but when importing, the only field that seems to be populating is the TitlePart Title. I have randomly generated a GUID for the identifier of each record. Orchard 1.4, ImportExport 1.4.
Example of one item of data:
<Orchard>
<Recipe>
<Name>Data Import</Name>
<Author>myaccount</Author>
</Recipe>
<Data>
<OurPropertiesDivision Id="/Identifier=94eff3237c714f98b021905c33d25ea9" Status="Published">
<LinkField.Link Text="This is a link" Url="http://stackoverflow.com" />
<MediaPickerField.ImageOne Url="~/test.jpg" Width="100" Height="100" />
<MediaPickerField.ImageTwo Url="~/test2.jpg" Width="100" Height="100" />
<MediaPickerField.ImageThree Url="~/test3.jpg" Width="100" Height="100" />
<TitlePart Title="Test Title" />
<CommonPart Owner="/User.UserName=myaccount" CreatedUtc="2012-04-04T23:03:39Z" PublishedUtc="2012-04-04T23:03:39Z" ModifiedUtc="2012-04-04T23:03:39Z" />
<IdentityPart Identifier="94eff3237c714f98b021905c33d25ea9" />
</OurPropertiesDivision>
</Data>
</Orchard>
This results in the following when looking at the imported entry:
Content list:
Edit screen:
The only field that is making it through the import is the TitlePart. How can I make this work in a way that I can bulk insert any type of field or part with data? I would also like to capture the Container for the Containable part.
EDIT: Adding content type metadata
<?xml version="1.0"?>
<!--Exported from Orchard-->
-<Orchard>
-<Recipe>
<Name>Generated by Orchard.ImportExport</Name>
<Author>myaccount</Author>
</Recipe> -<Metadata>
-<Types>
-<OurPropertiesDivision DisplayName="Our Properties - Division" ContentTypeSettings.Draftable="True" ContentTypeSettings.Creatable="True">
<CommonPart DateEditorSettings.ShowDateEditor="False" OwnerEditorSettings.ShowOwnerEditor="False"/>
<TitlePart/>
<OurPropertiesDivision/>
<ContainablePart/>
<IdentityPart/>
</OurPropertiesDivision>
</Types> -<Parts>
<CommonPart ContentPartSettings.Attachable="True"/> <TitlePart ContentPartSettings.Attachable="True"/> -<OurPropertiesDivision ContentPartSettings.Attachable="True">
<ImageOne.MediaPickerField DisplayName="Image One" MediaPickerFieldSettings.Required="False" HtmlFieldSettings.FlavorDefault="html"/>
<ImageTwo.MediaPickerField DisplayName="Image Two" MediaPickerFieldSettings.Required="False" HtmlFieldSettings.FlavorDefault="html"/>
<ImageThree.MediaPickerField DisplayName="Image Three" MediaPickerFieldSettings.Required="False" HtmlFieldSettings.FlavorDefault="html"/>
<Content.HtmlField DisplayName="Content" HtmlFieldSettings.FlavorDefault="html"/>
<Link.LinkField DisplayName="Link" HtmlFieldSettings.FlavorDefault="html" LinkFieldSettings.LinkTextMode="Required" LinkFieldSettings.TargetMode="NewWindow" LinkFieldSettings.Required="True"/>
</OurPropertiesDivision> <ContainablePart ContentPartSettings.Attachable="True"/> <IdentityPart ContentPartSettings.Attachable="True"/>
</Parts>
</Metadata>
</Orchard>
I ended up analyzing the database inserts generated by the admin, and manually importing the data in SQL.

Load page event in Flex?

I'm currently working on this website (http://www.jowannes.com/thomasschoof/flash/LauraBarsby.html) and I created a little gallery. When you press the image it becomes the background of the website. Now this has some problems if the background is white and you look at the other pages again, you can't read the text any more.
I would like it to be when you go back to another page, the background changes to it's original one. So basically I'm looking for the page (component?) load event or something alike, but I can't seem to find it.
CreationCompleted doesn't work for this, because when you navigate to it the second time it's already created, this the background doesn't change.
I'm setting the background like this:
Main page:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:component="component.*">
<fx:Script>
<![CDATA[
public function changeBackground(bitmapFillObj:BitmapFill):void
{
backgroundContainer.backgroundFill = bitmapFillObj;
}
]]>
</fx:Script>
<fx:Declarations>
<s:BitmapFill id="_bg1" source="#Embed('assets/bg1.jpg')"/>
<s:BitmapFill id="_bg2" source="#Embed('assets/bg2.jpg')"/>
</fx:Declarations>
<s:BorderContainer id="backgroundContainer" width="100%" height="100%" backgroundImage="#Embed('assets/bg1.jpg')" borderAlpha="0">
<component:home/>
</s:BorderContainer>
</s:WindowedApplication>
Component:
<fx:Script>
<![CDATA[
import mx.core.FlexGlobals;
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:layout>
<s:HorizontalLayout/>
</s:layout>
<s:Button label="click to show bg 1" click="FlexGlobals.topLevelApplication.changeBackground(FlexGlobals.topLevelApplication._bg1)"/>
<s:Button label="click to show bg 2" click="FlexGlobals.topLevelApplication.changeBackground(FlexGlobals.topLevelApplication._bg2)"/>
I also have the problem that the images become stretched, because I can't set the fillmode NOR can I center them, any ideas for this?
I hope somebody can help me, Thanks
Thomas
I found the solution: In a viewstack you have a handler called change=, I just put my method in there and it worked.

Resources