Showing posts with label api. Show all posts
Showing posts with label api. Show all posts

Jul 6, 2012

New version of Google Analytics ME v2.1

Hi, all

Today, I would like to announce that Google Analytics ME v2.1 has been released. This new version comes with important fixes. See them below:

- Fixed issue that was not identifing properly unique visitors.
- Improved session counter and visit duration calculation.
- Assign a custom user agent throught the JAD property "GAME-Custom-UserAgent".

It is important to point out that this new version will reset a cookie that is installed in your app by the API to track the user. This was necessary, since its structure had to be changed. So, don't worry when new unique users appear in your reports, when your users start updating their apps. From now on, they will be unique for sure.

Use the new JAD property "GAME-Custom-UserAgent" to customize the user agent that your app sends to Google Analytics. For instance, this can help you identify properly from which devices users are running your app.

I would like to thank Ramesh Sudini from SAAVN for your contribution in this release.

To download the API, click here! By the way, inside the package there is a sample app for reference.

Hopefully, everybody enjoy it!

See you in the next post...

Jan 3, 2012

Google Analytics ME v2.0: Unique visitors

Hi, all

Today, I would like to announce that Google Analytics ME v2.0 has been released. This new version comes with some good news and important changes. See them below:

- Identification of unique visitors.
- Better visitor's features identification.
- Small code refactoring.
- Android support deprecated.

Identification of unique visitors

Now GAN ME identifies properly who is a new visitor or not. This way, your visitors report is 100% accurate about the number of new and old visitors.

Better visitor's features identification

More visitor's features are being collected by GAN ME. For instance, now the app's name, version, screen size and number of colors are being collected.

Small code refactoring

To implement some of the new features and fix some of the bugs, some code changes were required, which may cause some compilation errors for your app. But it is not a big deal from developer's view. Actually, most developers will just have to fix the call to Tracker.getInstance(), which now requires to pass the MIDlet instance as well as the GAN app Id.

Android support deprecated

From this version on, we decided to deprecate the Android support. It turns out that there is already an official GAN API for Android, built by Google. So, we strongly recommend you to use that one in your Android app. It is very good!

I hope everybody enjoy this new version. Let me know your feedback.

To download the API, click here! By the way, inside the package there is a sample app for reference.

See you in the next post...

Apr 14, 2011

Facebook API for Java ME: In the works

Hi, all

Let's make it different this time. I use to announce my new projects just when they are ready to go, but let's change the paradigm.

Early this week, I checked in to Kenai, the alpha source code of my Facebook API ME project. The name stands for itself, it is API that allows Java ME apps to access Facebook. In fact, I had already commented on this project in the last post.

The code is in alpha version, but most features are already done and tested. I am stating it is still as alpha, since I need to retest the authentication feature using eSWT, besides implementing support to LWUIT, by using HTMLComponent.

Currently, besides authentication, Facebook API ME also supports the following features:
  • Post status
  • Share link
  • Get list of friends
  • Get friend's profile picture
It is not many features, but the way this API is designed, it is a snap to get new ones available.

As soon as I have time, I will complete the tests, so I can officially release the API's version 1.0. The source code is already available for check out, just in case you are very curious.

I hope you guys also enjoy this new project.

See you in the next post...

Mar 16, 2011

Facebook and Java ME: How to authenticate?

Hi all,

Last month, I have developed a tiny API that integrates a Java ME app into Facebook. The implementation was not a big deal, except the authentication process. Since Facebook uses OAuth 2.0, it requires that any app that wants to integrate into Facebook's services must authenticate via its web login page. We all know that displaying HTML page in Java ME is not a easy task, since we have no LCDUI component that renders HTML. Fortunately, LWUIT already provides that via HTMLComponent.

But how to accomplish that if my app is not based on LWUIT? Hard question, huh? In my case, fortunately, the app that I had to integrate into Facebook is based on eSWT, which provides a Browser component. Because that, I was able to access the Facebook's login page and track the whole process in order to retrieve the token access required to access the methods from Facebook API.

My point in this post is: how to integrate Java ME app into Facebook API without a browser component? What is the trick? Parser the web login page's content and simulate the form submission programmatically? How have you guys have done that?

In intend to release my Facebook API in a near future. So I would like to know a better approach to implement the authentication process, so this API do not get tied to any specific framework.

See you in the next post...

Mar 11, 2011

Google Analytics ME 1.2: Android Support

Hi all,

Today I have released a new version of Google Analytics ME project. This is also a small release that just consists of bug fixes and a new support for Android 1.5 or newer.

You can download it by clicking here.

See you in the next post...

Jan 13, 2011

Google Analytics ME 1.1: Just a patch

Hi all,

I have just released Google Analytics ME 1.1, which consists of small bug fix related to visitor identification. In the first version, the visitors were not being tracked properly. In fact, every tracking was recording as from the same visitor. Now it is fixed! However, the API is not able to track unique visitors yet. Actually, a new visitor identification is created at each new app session started. In other words, if you restart your app and track anything to Google Analytics, a new visitor will be counted.

I hope to provide unique visitors feature in the next versions. Stay tuned!

To download the new version, click here.

See you in the next post...

Dec 27, 2010

Tracking Java ME Apps with Google Analytics

Hi all,

Today I would like to announce another project of mine, which I believe it will be very helpful for most Java ME developers. This new project is called  Google Analytics ME.

This micro Java API allows developers to track their Java ME apps using  Google Analytics. Developers will be able to analyze how the users are using their apps, using this Google's powerful tool, just like they are used to do with their websites.

To work with Google Analytics ME is as easy as it is to install that piece of JavaScript code provided by Google, in order to start tracking your websites. The only requirement of Google Analytics ME is a tracking code (e.g. UA-1736743-0), which you get as soon as you register an account for your website (app) on Google Analytics.

Once you have your tracking code, all you need is to specify which points of your app will be tracked by the API.

Google Analytics ME is capable of working with two types of events provided by Google Analytics: Page View and Event Tracking.

A Page View is an event that represents a page (or screen) that was viewed by a user. For instance, you may use this event to check how many times your app was started up, by tracking the MIDlet's constructor. See below how to implement it:

public AppMIDlet() {
    ...
    Tracker tracker = Tracker.getInstance("UA-1736743-0");
    tracker.addToQueue(new PageView("/app_started"));
    ...
}

In a similar way, you can also track how many times each app's screen is viewed by users, just using another unique id for each one. For instance:

public MainMenu() {
    super("Media Player")
    ...
    Tracker tracker = Tracker.getInstance("UA-1736743-0");
    tracker.addToQueue(new PageView("/media_player"));
    ...
}

An Event Tracking may be used to track events that occur in a screen, e.g., a button click or the usage of a given feature. For instance, considering your app is a media player, you can track how many times or how long a given song is played.

An event is composed of four information: Category, Action, Label and Value. A Category only works to group actions. For instance, a Category could be a screen's title, which you intend to track its events. The Action, considering a media player, would be the events of playing or stopping a song. In addition, for each Action, a Label may also be specified. In this case, you could use a Label to indicate the song's name being played.

Specifying up to these three parameters, Google Analytics will count how many times they were tracked. On the other hand, when you specify the Value, which is a integer, Google Analytics will also sum all values that were tracked for a given Category, Action and Label.

This way, we can track, for instance, for how long a given song was played, because Google Analytics will display a sum of all values.

See below how to work with events:

public void play(String media) {
    Tracker tracker = Tracker.getInstance("UA-1736743-0");
    tracker.addToQueue(new Event("/media_player", "Play", media, null));
    ...
}

public void stop(String media) {
    Tracker tracker = Tracker.getInstance("UA-1736743-0");
    tracker.addToQueue(new Event("/media_player", "Stop", media, timePlayed));
    ...
}

It is important to point out that only Category and Action are required. For further information on event tracking, click here.

You may be wondering why the events are being added to a queue. It is because the Tracker class can work synchronously and asynchronously. All queued events are flushed automatically by an internal background process that runs within a fixed-delay strategy. In addition, to work synchronously, you can use the method Tracker.track(Request), which immediately sends the event to Google Analytics.

...
Tracker tracker = Tracker.getInstance("UA-1736743-0");
tracker.track(new Event("/media_player", "Rewind", null, null));
...

You can also adjust the interval between each flush operation, by using the method Tracker.getIntance(String, long). In addition, the queue can be explicitly flushed through the method Tracker.flush(boolean).

...
Tracker tracker = Tracker.getInstance("UA-1736743-0", 120);
...

The code above specifies that background process runs at each 120 seconds. It is also important to point out that there is only one Tracker object per tracking code, since it uses the Singleton pattern.

As usual regarding my projects, this one is also available on Kenai.com and can be downloaded here.

I hope you guys enjoy it.

Happy new year!

See you in the next post...

Aug 29, 2010

Twitter API ME 1.4: New release!!!

Hi all,

I would like to inform that Twitter API ME 1.4 has just been released. This new version comes with new features and the correction of a bug that was preventing it to work on Blackberry devices. So Blackberry developers, you all are now welcome back to Twitter API ME.

The new features available on version 1.4 are:
  • Single Access Token auth
  • Geo-located tweets
  • Friends/Followers list
  • Update user profile
See below how easy is to use Single Access token and send a geo-located tweet.

Token = new Token("token_access", "token_secret");
Credential c =
  new Credential("usrnm", "conKey", "conSec", token);
UserAccountManager m =
  UserAccountManager.getInstance(c);
if (m.verifyCredential()) {
  GeoLocation l = new GeoLocation("+37.5", "+26.7");
  Tweet t = new Tweet(Geo-located tweet.", l);
  TweetER ter = TweetER.getInstance(m);
  t = ter.post(t);
}

Easy, huh?

For further information on Twitter API ME, please visit us at www.twitterapime.com.

See you in the next post...

Apr 29, 2010

New Version of Twitter API ME: A bit earlier.

Hi all,

I am pleased to announce that Twitter API ME 1.2 has just came out of the oven, with some great new stuffs and some challenges in sight. This new version took a bit more than a month to be developed. As we had previously advanced, we had planned to release it just on June. However, we decided to advance it, since Kenai.com will be under migration process from next Friday (April 30th), for an undetermined period. The website will be still up, but it will be completely read-only. This way, we could not upload the new version after April 30th.

For those who do not know, this migration process of Kenai.com has to do with the deal between Oracle and Sun Microsystems. But do not worry! Even after April 30th, you can download the new version. :)

Now let's outline what is new in version 1.2:
  • Retweet
  • Direct message posting and retrieval
  • Friendship management, i.e., follow/unfollow and block/unblock
  • Access to Public, Home, User and Mentions timelines
  • Rate limit status access for Search API
A lot of stuff, huh? For instance, now you can send private messages to your friends, follow someone (or block if you do not like him/her), see all tweets from your friends (same as you see at Twitter's home) and the ones that mention you, etc. With version 1.2, you have a complete set of features that allow you to implement a full-featured Twitter application.

As the previous ones, this version was expressively tested and new test cases were also implemented for all new features to guarantee the quality. Now we have over 100 test cases, covering 91% of the code.

Regarding documentation, all new features are well documented in the source code (Javadoc) and there is also some code snippets in our Wiki page.

As I said in the beginning we already have a challenge in sight. Currently, Twitter API ME uses Http Basic Authentication method to authenticate to Twitter API. However, Twitter API team has defined a deadline (June 30th) to deactivate this support. They are requesting that every application move to OAuth, which they state to be more suitable for them, because it is more secure for the users. No problem, let's do it. Because of that, we have to rush to get it done ASAP.

I believe that's all. I hope you guys enjoy this new version and bring me comments, suggestions, ideas so we can continue improving this API, OK?

Ah!!! I almost forgot. Here it goes the download link. :)

See you in the nest post...

Apr 22, 2010

Twitter API ME 1.2: Almost done!

Hi all,

I decided to stop by to tell you guys that the new version of Twitter API ME, 1.2., is almost concluded. After the development and unit testing, we are now performing a final code review before release. This new version comes with great new features, e.g., timelines, direct messages, retweet, etc.

The release is scheduled for the beginning of June. So, stay tuned! To follow the development, check us on Twitter, @twiterapime.

See you in the next post...

Oct 29, 2009

Twitter API ME: The announcement.

Hi all,

In the last few weeks, as soon as I became a Twitter's user, I had an idea to create an API so that we could develop applications to get access to Twitter's information. This work started on studying the API from Twitter API website, in order to see how the things work. I got surprised how easy is to access this service - very straightforward. In a nutshell, the API is based on accessing a URL and passing some parameters and get the response. For some API's services, authentication is required, but it is not a big deal to manage.

Basically, Twitter API is splitted into two parts: Search and REST API. Search API is responsible for providing a search mechanism of tweets (a Twitter message), by submitting a query with some parameters (filters), e.g., search for all tweets submitted by a given user or that contains a given word/phrase. The REST API, in turn, provides means to submit tweets to Twitter.

So after studying the API, I started to design and code an API so that we could have access to Twitter API from our mobile devices. The idea is to have an structure such as Twitter API, with those two main components: one for search and other for submitting content.

This API was designed using just plain old Java language, so that we could have an API to run on many platforms. In other words, this API intends to run on any Java platform (e.g. Java ME, Android, Java SE, etc.). It is possible, because the interface for the developers is pure Java, however, the concrete classes are platform dependent.

Due to my short free time, until this moment, I have implemented the Search API services and for Java ME platform only. However, the API is totally functional and ready to be used. I am already planning to implement REST API and a support for Android. It is expected for the next release. In the meanwhile, download and try it. It is free! It is upon GPL-2.0 license.

You guys can download the binaries, source code and documentation from projects's website, which is hosted on Kenai project website. For while, the SVN repository is not available. I am still working on somethings, but soon you guys will be able to check out the code directly to your IDE, OK? In additional, you guys can also report bugs/improvements on our issue tracking tool (JIRA).

I hope you guys like this project. It is getting cool! In the next posts, I will post some code snippets on how to use the API.

See you in the next post...