Android uses mobclix for advertising profit (http://www.javaeye.com/topic/609639)

Source: Internet
Author: User
Advertisement is a very convenient and universal way of making profits, especially for free apps. This does not need to be cumbersome. Mobclix provided support for the Android platform not long ago. Of course, good things can be tested without having to share their experiences. Just like my blog name, I believe in the power of sharing.

Demo:

 

Demo(see attachment ad.zip)


The entire process takes two steps:


Step 1: create an account
 

Website of mobclix: www.mobclix.com. register an account and create an app. Get appid. Mobclix provides two types of advertisement: one small advertisement and one small advertisement. Currently, only small advertisement tests are passed, and large advertisement tests are ongoing. This step is officially described as follows:
# Setup your account

1. developer dashboard: create an account and login into the developer dashboard at http://developer.mobclix.com /.
2. developer dashboard: click "add application" to register your application.
3. developer dashboard: click on the "advertising" tab.
4. developer dashboard: Enable advertising for your application. Choose from mmabannerxl (300x50) or iabrectangle (300x250) banner sizes.
5. developer dashboard: sign up for networks and/or import your own keys.


Step 2
: Create your own project

Import the Lib package in your project and add the core Code as follows:
Menifest: Java code

  1. <Meta-data Android: Name = "com. mobclix. application_id"
  2. Android: value = "a92fb6da-454b-48db-a123-ab8723352d88"/>
  3. <Uses-Permission Android: Name = "android. Permission. Internet"> </uses-Permission>
  4. <Uses-Permission Android: Name = "android. Permission. access_network_state"> </uses-Permission>

Layout

Java code
  1. <Com. mobclix. Android. SDK. mobclixmmabannerxladview
  2. Android: Id = "@ + ID/advertising_banner_view" Android: layout_height = "50dp"
  3. Android: layout_width = "300dp"/>

Java

Java code
  1. Adview_banner = (mobclixmmabannerxladview) findviewbyid (R. Id. advertising_banner_view );
  2. Adview_banner.setrefreshtime (8000 );
  3. Adview_banner.getad ();

I used mobclix 1.0.2 at the beginning of the test. During the test, I found that I could not get the advertisement. After N days of testing, I always failed. It was found that this version has a bug, so it was proposed by mobclix. Later Luis Gomez was revised and 1.0.3 was released. This version works normally.

Mobclix for Android is still in development. There are still a few advertisement networks that can be added, but it is certainly a good choice.

  • Ad.zip (28.8 KB)
  • Downloads: 57
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.