How to use codenameone cloud features? - codenameone

I have been using parse for backend for my codenameone project. I will like to use the codenmaeone cloud services instead. IS there any documentation and examples of how to do this?

Page 111 in the developer guide: http://www.codenameone.com/developer-guide.html
There is also JavaDoc: https://codenameone.googlecode.com/svn/trunk/CodenameOne/javadoc/com/codename1/cloud/package-summary.html
And some additional info in the blog regarding new tools: http://www.codenameone.com/3/post/2013/04/cloud-object-viewer.html
There is always the discussion forum where you can search and ask questions: http://www.codenameone.com/discussion-forum.html

Related

Android Studio with Google Calendar API V3

I wanted to try out google calendar API v3. I have Android Studio 1.0. I created a java endpoint module from Android Studio. I was following the official documentation here
If you follow the link I provided, you will see a line like this
Calendar service = new Calendar.Builder(httpTransport, jsonFactory, credentials)
.setApplicationName("applicationName").build();
Now what will be the httpTransport, jsonfactory and credentials here? Official documentation did not specify anything.
I also followed a sample in java from here.
This was done using Java Servlet and Eclipse. I am not familiar with that. It wont work on Android Studio.
Can anyone provide me a sample? or any direction to work with Calender API and Android Studio? Or what to do in the official sample mentioned above?
You should pass GoogleAccountCredential as the last argument
GoogleAccountCredential googleAccountCredential =
GoogleAccountCredential.usingAudience(context, "server:client_id:" + WEB_CLIENT_ID);
googleAccountCredential.setSelectedAccountName(userEmail);
What is WEB_CLIENT_ID you can find in many tutorials over the internet. It's basically ID which you can generate using Google Developers Console for given project.
Here's how to create Calendar instance with transport and JSON factory.
new Calendar.Builder(AndroidHttp.newCompatibleTransport(),
AndroidJsonFactory.getDefaultInstance(), googleAccountCredential);

Google Calendar Api Documentation better than the official V3

Please I want to create Event in Google Calendar API but the documentation official is BAD I cant use it .. And someone here who can help me please!! Sorry with my english but I speak spanish!
I agree...
This helps a bit: Google Calendar Events
Depending on the process you are using, there are few examples for using asp.net and the service account option. I successfully created events via service account with granting domain-wide access. With this you just need to create an app, then service account for the app and follow the domain wide delegation steps on the google documentation pages. This option is great if you have an app that needs to create events without having to authenticate the user.
For working code and more info you can see what I used at-
Google API Calender v3 Event Insert via Service Account using Asp.Net MVC
What is "bad" about the documentation? (Don't just complain; provide actionable feedback.) In the v3 docs, check out the reference section on creating events. There is even sample code in Java, Python, PHP, and Ruby to help get you started just below the reference. In addition, below the sample code is the APIs Explorer where you can issue requests with appropriate payload to the API and see the HTTP response to ensure you're calling the API correctly and receiving the data you requested. If there's any additional way for us to improve the docs, please let us know!
UPDATE (Sep 2015): I created a blogpost and video that walks through some pseudocode (well, it's Python) for creating events. There are examples in most other languages too.

Google App Engine Calendar

Does anyone have a link or can provide the code for a Java Google App Engine project which simply interacts with Google Calendar. Say get an event from your calendar.
The Google Sample calendar-appengine-sample does not compile once checkout out from HG and I have tried searching for tutorials and creating my own with only small bits of luck in places.
I have already set up an API Access project to get the client-secrets.json.
So as much as some think this is a poor question it demonstrates that there is not much out there in terms of help with the combination of Java, App Engine and OAuth. I have an ex Google employee at my company and he did agree that it is not as straightforward as it should be.
Based on the reply to my post on the Google Group I decided to use Python where the OAuth2Decorator makes the task trivial.
This was a very useful tutorial: https://developers.google.com/appengine/articles/python/getting_started_with_tasks_api
If you HAVE to use Java these I apologise for this not really helping you, but if you are willing to give Python a go then I recommend the above link and using PyDev with Eclipse.

Using Google Analytics from a .NET desktop application

Is it possible to send "PageViews" and record activity using the official Google API for C#? for instance, if i want to track page views for my wpf/winforms desktop app. ?
Where can i find some oficial examples?
I've just downloaded "Garlic" and tried the sample app and it works a treat!
https://github.com/dustyburwell/garlic
Disclaimer: I am the author for Gappalytics
I think one missing here is Gappalytics for code/UI event tracking, it is a very simple library which unlocks you a full potential of Google analytics.
It works better than mentioned before lib's because it can persist uniqueness of a user this way your data will not be skewed.
Google just released the Windows SDK for Google Analytics. It works with UWP, Xamarin, Windows Forms, and WPF.
The official announcement was made at the most recent Windows Developer Day on Feb 8th, 2017.
Here are some options, none perfect though. Google has an iOS and android SDK. Why not a Windows SDK???
Garlic
Ga.net
Server Side Google Analytics

How to track if browser is Silverlight enabled

I'm trying to get some stats on how many of the visitors to our website have Silverlight enabled browsers.
We currently use Google Analytics for the rest of our stats so ideally we'd like to just add 'Silverlight enabled' tracking in with the rest of our Google Analytics stats. But if it has to get written out to a DB etc then so be it.
Nikhil has some javascript to Silverlight tracking to Google Analytics. I have tried this code but Google Analytics doesn't pick it up.
Does anyone have any other ideas/techniques?
In case you missed it, there's a link to a more detailed article as well in the comments: http://blogs.msdn.com/jeffwilcox/archive/2007/10/01/using-google-analytics-with-rich-managed-web-applications-in-silverlight.aspx
Edit: As David pointed out, this article covers the reverse scenario more (how to write your silverlight app so that it plays well with Analytics).
I think you answered it yourself. The page you are linking to does just that: detect which version of Silverlight the user has (not if s/he installs it). From the page:
After a little poking around, I found that Google Analytics has support for reporting a user-defined field.
...
Basically this detects the presence of Silverlight, and if its available, it records the version as the value of the user-defined field. Now your analytics reports will have one of three values: "(not set)", "Silverlight/1.0" or "Silverlight/2.0".
#Vaibhav
The Using Google Analytics with rich (managed) web applications in Silverlight article is very interesing but is more focused on how to get your Silverlight app to send messages to Google Analytics.
#Cd-MaN
Yeah, I thought that too but I have tried running my page with Nikhil's javascript and Google Analytics didn't pick it up. But I could have screwed something up somewhere.
I'm just interested to know if anyone else has managed to do this (track Silverlight-ness) successfully.
I've written a lightweight Silverlight library that helps make it easy to integrate Google Analytics in your silverlight app. You can grab download the code or binaries here.
I think the code posted on Nikhil's blog is out of date if you are using ga.js and not urchin.js.
The use of the global function __utmSetVar() is replaced by the tracker method _setCustomVar()
http://code.google.com/apis/analytics/docs/gaJS/gaJSApiBasicConfiguration.html#_gat.GA_Tracker_._setCustomVar

Resources