What are the allowed values for Huawei AdsKit `AdParam.Builder`? - huawei-mobile-services

What are the allowed enum values in AdParam.Builder, eg. setGender(int value)?
I've tried using 1 and 2, but having Root obj class .. is invalid in the log:
2021-01-13 00:20:22.041 2138-2324 W/HiAdSDK.jd: Root obj class (class java.lang.Object) is invalid
2021-01-13 00:20:22.042 2138-2324 W/HiAdSDK.jd: toJson jsex
PS. using implementation 'com.huawei.hms:ads-lite:13.4.37.300'

What are the allowed enum values in AdParam.Builder, eg. setGender(int
value)?
Please kindly refer to com.huawei.hms.ads.Gender,value 0 is for MALE, value 1 is for FEMALE.
For more details, see API documentation here.

It seems you used old version from the link you posted.
Please refer to the info. Here for latest info for the service.
BTW, 1 or 2 are correct for the setGender(int value) function.
Please try after you use the latest Ads SDK and function as above.
Could you please share more detail logs if the error occurs again?

Related

Not getting CatalogEntryDataBeans using CategoryDataBean

I am using a UseBean in my Jsp
<wcbase:useBean id="category" classname="com.ibm.commerce.catalog.beans.CategoryDataBean" scope="page" />
then I try to get 'CatalogEntryDataBeans' value using 'category' instance, something like
category.catalogEntryDataBeans
but i get nothing.
Please tell me what I am missing?
I have researched a lot , specifically set the targets (passed catalogId and categoryId to CategoryDataBean) but all in vain.
I have been trying to get catalogEntryDatBeans value for almost 7 hours, now no idea/debug-method left in my mind.
I would really be grateful if someone please help me get this value.
Is the request properties object containing the categoryId and catalogId parameters?
Also, does this return a value: ${category.description.name}?
Are you getting the catalog entries returned in any other way? I.e. is your store, category and products correctly configured (including the description tables) and the issue is just with this data bean through this tag?

CQ5 QueryBuilder Search Not Working as Expected (when property NOT present)

I'm trying to produce a query that will return all pages under a path where a property is NOT present.
Effectively I want the query builder query that will produce the following xpath: /jcr:root/content/site/my/path//element(*, cq:Page)[not(jcr:content/task/#finished)]
For CQ 5.3 the 'exists' property doesn't seem to be present (according to the docs: http://docs.adobe.com/docs/en/cq/5-3/javadoc/com/day/cq/search/eval/JcrPropertyPredicateEvaluator.html), however it looks like I can use 'not', so I've tried the following two examples but neither work as I expect in query debugger:
1
path=/content/site/my/path
type=cq:Page
property=jcr:content/task/finished
property.operation=not
2
path=/content/site/my/path
type=cq:Page
property=jcr:content/task/finished
property.operation=not
property.value=true
I've also seen pages that suggest these should work, and I can't seem to see any hotfixes that would cover fixing this (assuming it isn't actually working correctly).
Can anyone offer a solution or point out where I'm going wrong?
Using CQ 5.3, upgraded to crx 2.2.
Cheers
Chris
I have a few resource that I hope help you:
My blog post about query API options: http://itgumby.github.io/blog/2014/10/cq-queries-demystified/
6 Dimension's post about specific query examples: http://labs.sixdimensions.com/blog/2014-10-07/9-jcr-sql-2-queries-every-aem-dev-should-know/
Adobe QueryBuilder documentation: http://docs.adobe.com/docs/en/aem/6-0/develop/search/querybuilder-api.html
Non-empty SQL2 (From the 6D post):
SELECT * FROM [cq:PageContent] WHERE [jcr:title] IS NOT NULL
Which means you could convert that to WHERE [jcr:title] IS NULL
If using QueryBuilder predicates, the property generally won't exist (deleted from node) if it is false. Please manually verify in your case using CRX-DE lite and examining the node & its properties. If the property does exist, but its value is false, then:
path=/content/site/my/path
type=cq:Page
property=#jcr:content/task/finished
property.value=false
For any still struggling, this is how you do it
path=/content/site/my/path
type=cq:Page
property=jcr:content/task/finished
property.operation=exists
property.value=false

The ref property of an open graph action have no effect on app insights

http://developers.facebook.com/docs/opengraph/actions/
in the Opengraph actions docs there is an Optional Parameters: ref property, that suppose to help with A/B testing by:
By default, the ref parameter will accept 500 unique values for ref in
a 7 day period. These values will be used to display graphs grouped by
each unique value of ref in your application's insights.
I've start using it, i see that the ref property saved for my actions view graph API and i have have the fb_ref in the actions links, but i don't see any "graphs grouped by each unique value of ref"
Did i understand it wrong or could be its isn't implemented?
Thanks,
Bnaya.
You can see the Ref Parameter values on the insights under Open Graph › Demographics.
It's a shame its not documented well.

Foursquare API nearByVenue service issue

Using Foursquare api "Venue" service.. i am parsing nearByVenue details like shop, restaurant etc.
Suppose as an example i am getting following link:
https://api.foursquare.com/v1/venues.json?geolat=40.562362&geolong=-111.938689
Issue is I am getting only 10 nearbyDetails.. suppose I am standing in New York there should be number of venue details.. why I am getting only 10 details only ?
Is there any other service or i am following wrong approach to use it?
Thanks
Add l=n where n is your limit in query string. The default limit is set to 30.
https://api.foursquare.com/v1/venues.json?geolat=40.562362&geolong=-111.938689&l=10
https://api.foursquare.com/v1/venues.xml?geolat=40.562362&geolong=-111.938689&l=50&q=coffee
You can change the value of l="no of result" parameter.
And also if you want to search for particular keyword like ATM, Coffee
then you can add the parameter q and add it's value like q="atm", q="coffee", etc.
hope it will be helpful to you.

How do I create a manual link on a tree in Oracle APEX when Session State Protection is turned on?

Friends,
I'm facing another challenge in APEX and I hope you can help.
I have created a tree using the method described in John & Scott's superb book, "Pro Application Express" whereby the page link is stored in a table. Below is an example:
go to a page passing some parameters
f?p=&APP_ID.:3:&SESSION.::::P3_IDENTIFIER,P3_FAMILY_NAME:&P2_IDENTIFIER.,&P2_FAMILY_NAME.
When the page is run this works as expected. I can expand the tree and navigate to the page passing parameters if required.
However when I turned on session state protection these "hand crafted" links stopped working. Which I expected because the link contains no checksum.
After some investigation I see I have to use APEX_UTIL.PREPARE_URL to generate the URL with a checksum. Unfortunately this is where I run into problems. I can't seem to be able to pass the parameters values to the calling page.
The original tree query was:
select "IDENTIFIER" id,
"PARENT_IDENTIFIER" pid,
"TITLE" name,
"LINK" link,
null a1,
null a2
from <some table>
I then changed this to use APEX_UTIL.PREPARE_URL:
....
APEX_UTIL.PREPARE_URL('f?p='||:APP_ID||':3:'||:APP_SESSION||'::::P3_IDENTIFIER,P3_FAMILY_NAME:&P2_IDENTIFIER.,&P2_FAMILY_NAME.') link,
...
and this works, the page is called and I can see the values of the parameters passed. But I can't use this method as it is restricted to the one page!
Finally I tried storing the page number, parameters and parameter values in different columns of the table that the tree is based on and then bring them together:
...
APEX_UTIL.PREPARE_URL('f?p='||:APP_ID||':'||navigate_to_page||':'||:APP_SESSION||'::::'||parameters||':'||parameter_values) link,
...
Where:
navigate to page has the value of: 3
parameters has the value of: P3_IDENTIFIER,P3_FAMILY_NAME
parameter_values has the values of: &P2_IDENTIFIER.,&P2_FAMILY_NAME.
This now calls the page, but the parameter values have become literals. so where I'm expecting an identifier I see &P2_IDENTIFIER and ditto for family name.
What am I doing wrong? How can I pass values to my called page using apex_util_prepare_url?
In case of need, my environment details are: Apex 3.2.1, Oracle Application Server 10.1.2.3. Oracle Database 10.2.0.3
Thanks in advance for any help you may be able to provide.
I think you'll need to resolve those variables, using the v() function:
APEX_UTIL.PREPARE_URL('f?p='||:APP_ID
||':'||navigate_to_page
||':'||:APP_SESSION
||'::::'||parameters
||':'||v('P2_IDENTIFIER')||','||v('P2_FAMILY_NAME')) link,
On a side note, you might need to be careful about P2_FAMILY_NAME since it's being used in the url; it sounds like a plain text field which contains user-entered data?