I have a problem during creating the campaign. I have test account on google Adwords. I used code from google: AddCampaigns.java
Im getting error:
[OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED # class campaignmgmt.campaign.MutateAction (ADD) requires CREATE_CAMPAIGN, OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED # class campaignmgmt.campaign.MutateAction (ADD) requires CREATE_CAMPAIGN]
It occurs in line:
// Add campaigns.
CampaignReturnValue result = campaignService.mutate(operations);
I found one problem this type on a google dev webpage, however the 'solution' did not help. Anyone have any idea why is it happening?
Thank you so much and have a nice day!
I solved it setting the clientCustomerId.
With Google AdWords Account you can manage several clients account with several campaigns.
Example of my c# code:
// Get the CampaignService.
CampaignService campaignService =
(CampaignService)_user.GetService(AdWordsService.v201409.CampaignService);
// Set ClientCustomerId
campaignService.RequestHeader.clientCustomerId = myClientCustomerId;
Related
I am looking for a solution using Maven and Java (Not Spring) where I can upload all my Key and labels and flag value by Json to deploy.
When I configure my project in Jenkins it should apply all the values which are changed.
Kindly provide me some directions, I tried lot with less material on this topic
I managed to workout the solution. Basically following this Microsoft Azure Link
, but not completely solved my problem by this link though. Below is the Code Snippet which solved my problem. Code is not testable or productionable , this is just for reference.
public void process() {
String value = "{\"id\": \"test\", \"description\": \"Sample Feature\",\"enabled\": false,\"conditions\": { \"client_filters\": []}}";
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();
ConfigurationClient configurationClient = new ConfigurationClientBuilder()
.connectionString(END_POINT)
.buildClient();
final ConfigurationSetting configurationSetting = new ConfigurationSetting();
configurationSetting.setKey(format(".appconfig.abc/%s", "abc"));
configurationSetting.setLabel("lable");
configurationSetting.setContentType("application/vnd.microsoft.appconfig.ff+json;charset=utf-8");
configurationSetting.setValue(value);
configurationClient.addConfigurationSettingWithResponse(configurationSetting, NONE)
}
Key points here is ".appconfig.abc" , At this point of time we don't have direct call to Feature Management , but we can add Key and labels to configuration as I said in the code snippet but with the Key as ".appconfig.abc" which you can get this info from portal. And the value should be a Json object, how we make this Json is upto you really.
Overall so much of information around the sites but none of them are connected in Java world for Azure. May be helpful to any one.
End Point , one can get from the Configuration Access Keys.
I have never used a RESTful API. I want to use this API to get historical weather data, but I can't find a simple tutorial taking me from end to end making an app that uses a RESTful API in Java. I'm not sure what steps I should take to get the data.
The steps listed on the getting started page are not Java specific, so I'm not sure how to use that info. I have requested a token and got it, so I'm good on that front.
What I need help with is getting a minimal example showing how, with just a token and formatted URL, you can get JSON data from the API.
Some things I've looked into are javax.ws.rs and jersey client, but I'm not sure how to use those either.
Thanks in advance :)
Using Fetch you can do:
fetch(url, {options})
.then(data => {
// Do some stuff here
})
.catch(err => {
// Catch and display errors
})
Where the url is the one from the getting started page.
And you can get whatever data you need from data.
Say you need to save just the name in a local var, then you do:
.then(data => {
name = data.name
})
I would like to send an email regarding a newly created invoice to a customer programmatically using the Java SDK for QuickBooks Online. After successfully creating an invoice e.g.
com.intuit.ipp.data.Customer customer = getCustomer();
com.intuit.ipp.data.Invoice invoice = createInvoice(customer);
// what do I do now ??
The Invoice object doesn't seem to have any function that would send the email. I've looked through the QBO v3 JavaDoc and I can't see any relevant class that would help me do this (maybe something that expects an Invoice as parameter).
The preamble for the Invoice class in that JavaDoc says ...Invoice can be printed and emailed to a customer... which is why I'm assuming it is possible to do with the SDK, but I don't know that for sure.
I've also tried setting the EmailStatus field on the Invoice during creation, e.g.
invoice.setBillEmail( customer.getPrimaryEmailAddr() );
invoice.setEmailStatus( EmailStatusEnum.NEED_TO_SEND );
The only other possible values for that ENUM are NOT_SET and EMAIL_SENT. I've created a test invoice but no email has come through.
I know that there is a Restful endpoint at:
https://quickbooks.api.intuit.com/v3/company/[companyID]/invoice/[invoiceId]/send
...that can be used to email an invoice, but my question is specifically whether or not it's possible to do this using the Java v3 SDK and if so, how?
I seem to have found the answer here: https://intuitdeveloper.lc.intuit.com/questions/810174-qbo-v3-api-sending-and-linking-to-invoices
Within the Javadoc for the QBO Java SDK, see this folder: ipp-v3-java-devkit-javadoc-2.5.0
Look at the index.html and find the DataService class. It has various sendEmail() methods.
Hope this helps!
I am new to Android and Windows Azure. I have successfully inserted data from Android application but how do I retrieve single data and post that data on a TextView?
The read function after the gettable class is also not working. What is the exact function use for it? I have followed these instructions but they did not work for me, also I do not understand the documentation.
Currently, I just can provide some tutorials about how to use query data from azure database. I recommend you can refer to this official document about how to use Azure Client Library using Java: https://azure.microsoft.com/en-us/documentation/articles/mobile-services-android-how-to-use-client-library . You can focus on two part: “how to query data from a mobile service” and “how to bind data to the UI”.
At the same time, you can view this video from Channel 9: https://channel9.msdn.com/Series/Windows-Azure-Mobile-Services/Android-Getting-Started-With-Data-Connecting-your-app-to-Windows-Azure-Mobile-Services.
The sample code project of this tutorial, please go to the GitHub link https://github.com/Azure/mobile-services-samples/tree/master/GettingStartedWithData .
For the ‘getTable(Class )’ function is not working, please double check whether the class name is same as table name. If they are same, you can use it like below:
MobileServiceTable<ToDoItem> mToDoTable = mClient.getTable(ToDoItem.class);
If not, you can write you code like this:
MobileServiceTable<ToDoItem> mToDoTable = mClient.getTable("ToDoItemBackup", ToDoItem.class);
For further better support, please share more detail about your code snippet .
I am trying to create a simple login/register system for my Android app. I am following a tutorial by David Kelley (http://davidjkelley.net/?p=48). I downloaded the project David created and it works fine.
However, when I try making a copy of the project and change the relevant lines of code (and package name) to link to my own server, I get errors when I try registering a new user. The two main errors that show up in the logcat are:
<b>Fatal error</b>: Class 'DB_Functions' not found in <b>/home/paid2read13/paid2read.net/android_api/index.php</b> on line <b>18</b><br />`
- Error parsing data org.json.JSONException: Value db of type java.lang.String cannot be converted to JSONObject
...FATAL EXCEPTION: AsyncTask #1 ... java.lang.RuntimeException: An error occured while executing doInBackground()... Caused by: java.lang.NullPointerException at com.moneytree.RegisterTask.doInBackground(RegisterTask.java:85)...
In order for this post to be as useful as possible for me and anyone with similar issues, let me be very clear about what I changed from the code in the website given above:
In all of the classes in the main package (LoginTask.java, RegisterTask, etc.) AND the library (UserFunctions.java and DatabaseHandler.java), I changed loginURL = "http:// davidjkelley.net/android_api/" and registerURL = "http:// davidjkelley.net/android_api/" to loginURL = "http:// mydomainname.net/android_api/" and registerURL = "http:// mydomainname.net/android_api/", respectively. I also changed the database details in config.php to match my details; for the server name I put mysql.mydomainname.net because this link brings up my phpmyadmin console and it says server: mysql.mydomainname.net at the top of that page. So I think config.php is set up fine.
I don't know why the app "can't find DB_Functions" - I placed the files as instructed at the beginning of the aforementioned tutorial. I'm also not sure what exactly the null pointer issue is referring to.
I've been stuck on this for at least a week and have gone through all related issues; I found nothing similar. I would be very much grateful if anyone could help me with this - I wanna move ahead with my project. Thank you.