Tuesday 28 April 2015

President makes statement on #BaltimoreRiots, calls rioters "criminals and thugs"




watch live here:    

https://www.facebook.com/foxandfriends/videos/852427411511523/?fref=nf

Cheating or ‘Self-Service’? Watch OC Ukeje, Ini Edo & More Celebrities Choose What They Would Want Their Spouse to Do






At the recently held Africa Magic Viewer’s Choice Awards, FlytimeTV was on the red carpet with on-air personality Nedu as they put celebrities on the spot by asking a tricky question.

FlytimeTV asked, ‘Would you prefer your spouse to masturbate or cheat on you?’

Watch what OC Ukeje, Femi Branch, Lilian Unachukwu, Charles Novia, Mike Ezuruonye, Nse Ikpe-Etim, Uru Eke, Ini Edo, Gabriel Afolayan, Eucharia Anunobi, Gideon Okeke and more have to say below.

https://youtu.be/I5xNpeW-Sdw

Incredible Deaf Woman Hears Husbands Voice For The Very First Time

 watch here


https://www.facebook.com/video.php?v=1249274975100096&set=vb.199633956730875&type=2&theater


What an incredibly beautiful video. This wife lost her hearing when she was 2 years old & doctors told her family she would never be able to hear or talk.


After struggling with hearing aids for for most of her life, she is finally able to hear clearly for the very first time. Watch the emotional video below.


Grandfather With Cancer Becomes Uber Driver To Pay Off Home For His Family







Broskey, from Livonia, told ABC News today he’s trying to raise as much money as he can so his daughter, 46, and his two grandchildren, ages 13 and nine, have a place to live when he’s soon gone.



“Once I pass away, chances are my daughter, who’s a part-time waitress at a small restaurant in Livonia, will lose the house we live in because she won’t be able to afford it anymore,” Broskey said. “So I’m doing everything for her and my grandkids at this point. When you find out you’re dying, you realize your family and friends are so important.”

And thanks to a fateful Uber ride three weeks ago, Broskey has reached his goal with more than $100,000 raised in less than 1 week!

During that ride, Broskey met Roland Gainer, a 22-year-old student at Washtenaw Community College who needed a ride to downtown Ann Arbor to meet up with some friends. Gainer said he started chatting with Broskey and the casual conversation got deeper when he learned Broskey had terminal cancer — stage four oropharyngeal cancer with lung metastases.

“I was asking him if he liked Uber driving and then he explained how much he loved it because he got to meet new people, and it was also helping him earn extra money before dying because he had head, tongue and throat cancer,” Broskey told ABC News today. “I felt super-compelled to help him.”

Gainer and Broskey traded numbers, and Gainer turned to the owner of a popular eclectic barber shop in Detroit for ideas on how to help Broskey, he said.

Sebastian Jackson, owner of “The Social Club” barber shop, said he got Broskey connected with a communications expert named Karen Dumas in the area, and the three of them worked together to start a GoFundMe account for Broskey this past Monday.

Broskey said though he’s been given an estimated two to 10 weeks left, he feels fine, and he’s going to keep driving with the help of morphine pills.

Gainer and Broskey also continue to chat every day, and they’re “tight friends,” Gainer said.

“I admire him so much,” Gainer said. “Oh my god, his love for his family is limitless. This man is dying of cancer, and yet he’s still out there driving an Uber cab just for his family every day. That’s indescribable love.”




Review: Alice Eve Made Confused, Transphobic Comments About Bruce Jenner on Instagram






Alice Eve, the actress from the Star Trek movies, made some inappropriate—and totally confusing—comments about Bruce Jenner on her Instagram page, saying that he was just "playing" as a woman.

Jenner came out as transgender on a high-profile interview last week. Eve had this to say about it on Instagram:

"If you were a woman no one would have heard of you because women can't compete in the decathlon. You would be a frustrated young athlete who wasn't given a chance. Until women are paid the same as men, then playing at being a "woman" while retaining the benefits of being a man is unfair.

"Do you have a vagina? Are you paid less than men?" Eve asked. "Then, my friend, you are a woman."

Her followers called her out as transphobic and narrow-minded, and Eve tried to defend herself, making things worse:

"I do agree that the struggle for transgenders is unique and horrific. However, I do want to also support a cause I strongly believe in, the right for women to have equal rights to men. The transgender equality struggle is the next one, as we all know. And very real it is, too."

SMH at the idea there's a pecking order for equality movements. She later added:

"I'm not saying by identifying they are negatively impacting feminism, I am saying that we have to refine the language on this topic so all men, women and transgenders are accurately represented in their process of self-identification."

Which makes approximately zero sense. She continued, "Maybe this needs a little thought."

Yeah, maybe. The actress then deleted her posts, and uploaded two new photos with the hashtags #EqualPay, #EqualRights, and #OneLove.

Baltimore Mom Stops Son From Rioting



She spotted him on TV throwing rocks and went after him like a heat-seeking missile.

Baltimore Police Commissioner Anthony Batts also mentioned it when he spoke at a press conference shortly before midnight on Monday.

Batts said: ‘In one scene you had a mother who grabbed a child who had a hood on his head and started smacking him on the head because she was so embarrassed.

‘I wish there were more parents out there who took charge of their kids tonight.

He later added: ‘Take control of your kids. This is our city, let’s make a difference.’

Nigeria:Fast and furious 7 out in cinema in all country Epic film


out in cinemas watch now

Xenophobia: International Criminal Court To Probe Zuma, Zulu King

Xenophobia: International Criminal Court To Probe Zuma, Zulu King



Following a petition from the Socio-Economic Rights and Accountability Project (SERAP) the Office of the Prosecutor of the International Criminal Court has decided to probe the xenophobic attacks against Nigerians and other African citizens in South Africa.
SERAP had in a petition dated 23 April 2015 and sent to the Court requested the Prosecutor Mrs. Fatou Bensouda to use her “good offices and position to investigate allegations of hate speech by the Zulu King Goodwill Zwelithini, which has resulted in killing, violence and discrimination against Nigerians and other African citizens living in South Africa, as well as the complicity/negligence of the country’s law enforcement agencies to prevent these crimes against civilian population.”

In response, the ICC in a letter dated 28 April 2015, and signed by M.P. Dillon, Head of Information & Evidence Unit of the Office of the Prosecutor said, “The Office of the Prosecutor of the International Criminal Court acknowledges receipt of your documents. This communication has been duly entered in the Communications Register of the Office. We will give consideration to this communication, as appropriate, in accordance with the provisions of the Rome Statute of the International Criminal Court. As soon as a decision is reached, we will inform you, in writing, and provide you with reasons for this decision.”

SERAP in its petition had urged Mrs Bensouda to “bring to justice anyone who is responsible for these international crimes prohibited under the Rome Statute of the International Criminal Court.”

SERAP also said that it “considers the use of speech by the Zulu King to promote hatred and/or incite violence against non-nationals such as Nigerians, particularly in the media as a clear violation of the provisions of the Rome Statute of International Criminal Court.


“Grave statements by political leaders/prominent people that express discrimination and cause violence against non-nationals cannot be justified under any law. This hate speech generated fear and hatred that created the conditions for violence and discrimination against Nigerians and other African citizens. SERAP believes that this has given rise to individual criminal responsibility under the Rome Statute of the International Criminal Court,” the organisation said.

The organisation argued that, “the statement by the Zulu King amounts to a harmful form of expression which incites or otherwise promotes hatred, discrimination, violence and intolerance. We are seriously concerned that crimes against humanity are often accompanied or preceded by the kind of statement made by the Zulu King.”

“Once the climate of violence has been created, direct and public incitement to crimes builds on it, exacerbating the situation by further heating up passions and directing South Africans’ hatred towards non-nationals such as Nigerians. Hate speech by King Zulu is legally tied to contemporaneous, large-scale violence and inhumane and discriminatory treatment of Nigerians and other African citizens,” the organisation also argued.

The organisation also said that, “The statement by the Zulu King has contributed to a climate of fear, demonization and dehumanization of Nigerians and other African citizens, thus violating their human dignity through humiliation and expulsion from the human community. SERAP is seriously concerned that hate speech by the Zulu King amounts to crime against humanity of persecution and has directly contributed to an infringement of the right to life, equality and non-discrimination of Nigerians and other African citizens.”


Check out Latest Wallpaper Interior Designs from VivaBella Interior Designs



Vivabella Interiors is based in part of Africa Nigeria and was established in 2013 and we are planning to expand within coming years based on our experience in this field. We have a widerange of experience in all aspect of residential, retails and commercial work. so while considering you need your home furnished, decorated or a rental property repaired, we have got it covered. Our regular works with landlords and agents while helping them to build and maintain their portfolios also completing the work to a high standards. We are happy to liase with landlords or tenants to ensure work is done promptly.

Meetup with Over 60 UK Institutions in Lagos & Abuja to create an opportunity to study abroad.


During April , join over 60 universities from the uk as they showcase a conference meeting forum in Nigeria in the 2015 free UKEAS 2015 UK Exhibition. Better don't miss it while this upcoming experience while you get free study advice on schools in UK.

Tuesday 17 March 2015

Oracle 11g step-by-step Install Guide with Screenshots guidelines


step 1:
run your file setup in the folder

during your installation make sure that your (SID) is change or you can maintain the default database name which is ORCL you can change it to your desired SID 



Continue your setup process , the product-specific prerequisite checks perform a random check that matches your system requirement , also make sure that your operating system is updated and validated and your network configuration adapter is complete, as this will indicate an error at the end of your installation


check your directory where you want your drive file to be installed make sure you direct it to C:/


installing progress
                                      

click on exit while your installation is complete



TESTING YOUR INSTALLATION SUCCESS!!!

To test that your installation completed successfully, perform the following steps:

Open a browser and enter the following URL:

https://<hostname>:1158/em

where <hostname> should be changed to your machine name, IP address, or localhost.

Because Enterprise Manager Database Control is a secure site, you need a certificate. Select the Accept this certificate permanently option, and then click OK.



Enter system as the User Name and oracle as the Password, and then click Login.


 

The Database Control Home Page appears. Your installation was successful.


 

Back to Topic List

Summary

In this tutorial, you learned how to install and test the Oracle Database 11g installation on Windows. 7 ultimate or other windows

Monday 2 March 2015

Android: Importing your Jar files successfully to your Android Project
















Integrating Your App with the Google API



Google Play offers great online help to help you implement in-app billing in your application. A good
place to start is with its sample application, which gives you a working model to start from. To get
started with its sample application, go here:

http://developer.android.com/training/in-app-billing/preparing-iab-app.html#GetSample
The old version 2.0 API included a sample app called Dungeons. you can see the
purchase screen from that app, illustrating how you can purchase a potion (“Puts dragons to sleep.”).




If at all possible, you should be integrating with the newer and simpler version 3.0 API, which uses a
different sample app called Trivial Drive




As far as enabling in-app billing in your own application, the following sections spell out the steps
to follow, beginning with downloading the in-app billing library. (We assume you have elected to use
version 3.0 of the API.)


Enabling Your App to Use In-App Billing

To download the in-app billing library, open the Android SDK Manager. Expand the Extras section,
select Google Play Billing Library, and install the Library.

Before you can use in-app billing, you must include a IinAppBillingService.aidl file in your project.
This file is an Android Interface Definition Language file that defines the interface to Google’s billing
service.

First, right-click the src directory of your project and select New ➤ Package. Name your new
package com.android.vending.billing. Move the IinAppBillingService.aidl class (found in
<sdk>/extras/google/play_billing/ as well as the previous sample app provided with the billing
library) into this package.
Add your product to the Google Play Developer Console. To do this, select your application in the
Developer Console and then select the In-app Products tab on the left side. You can then add a
new product. The In-app Product ID must be unique in your application’s namespace. Your product
type can be a Managed per user account, Unmanaged, or Subscription. You also need to add a
description and price.


Initial Setup For In-App Billing In Your App
You can follow the detailed instructions here for the setup process: http://developer.android.com/
training/in-app-billing/preparing-iab-app.html#GetSample
To summarize, you need to give your app permission to interact with the billing service via your
manifest file. You also need to create an Iabhelper, which is the in-app billing helper class. This
class enables a simplified synchronous style of communication that is one of the benefits of version 3.0 of the in-app billing API. The Iabhelper class uses callbacks to communicate with your code. In fact, the setup process uses an onIabSetupFinished callback function to return success or failure.


Using In-App Billing: Requesting a List of Items For Purchase

Again, the process is described here in great detail:
https://developer.android.com/google/play/billing/billing_integrate.html
At a high level, you need to build a list of purchasable items that you are querying. The previous link
uses this example:

List additionalSkuList = new List();
additionalSkuList.add(SKU_APPLE);
additionalSkuList.add(SKU_BANANA);
inAppBillingHelper.queryInventoryAsync(true, additionalSkuList,
mQueryFinishedListener);


As you might expect, the mQueryFinishedListener is a callback function that is called with a list of
available inventory, including their prices.

Using In-App Billing: Making the Purchase

Similarly, making a purchase involves a call the in-app billing helper, and the response is handled
with a callback listener function:

inAppBillingHelper.launchPurchaseFlow(this, SKU_APPLE, REQUEST_CODE_VALUE,
mPurchaseFinishedListener, "developerPayloadString");

SKU_APPLE is the item to be purchased. The REQUEST_CODE_VALUE is a positive integer that will
be returned back to the caller. The developer payload string is a convenience string for use by
developers to send supplemental information. It may be empty.

Using In-App Billing: Determining Which Items Have Already Been Purchased

Continuing the paradigm, you may determine which items have already been purchased with a query
to the in-app billing helper that is captured by a callback listener:

inAppBillingHelper.queryInventoryAsync(mGotInventoryListener);

You need to determine which items have been purchased each time your app restarts so your users
have access to capabilities that they have already purchased.

Using In-App Billing: Consumable Purchases

To consume an item that your user has purchased, you call the in-app billing helper as follows:

inAppBillingHelper.consumeAsync(inventory.getPurchase(SKU_APPLE),
mConsumeFinishedListener);


Integrating Your App with the Amazon API

If you’ve played around with the Google Play in-app billing sample application for version 2.0 of its
API (the Dungeons program), you have a great foundation to start learning how to integrate with the
Amazon API. This link teaches you how to modify the Dungeons application to be compatible
with the Amazon in-app purchasing API:
https://developer.amazon.com/sdk/in-app-purchasing/reference/google-to-iap.html
Amazon claims that its IAP solution requires less work and has a shorter development cycle. Note,
however, that Amazon is not comparing its solution with the newer version 3.0 API.




Enabling Your App to Use In-App Billing

Download the Amazon Mobile App SDK package from here: https://developer.amazon.com/sdk.html
Extract the ZIP file into a directory on your computer. Within this directory, you find an /In-App-
Purchasing/lib folder. This folder contains a JAR file called in-app-purchasing, which is the in-app
purchasing library and must be added to your eclipse project’s library path. You can do this by
accessing the Project Properties menu and going to the Java Build Path. There you can select the
Libraries tab and add the JAR file.
Before you can purchase a product from within an app, you must add your product to Amazon’s
distribution portal by signing into the Distribution Portal and selecting the My Apps tab. Choose the
Manage In-App Items option from the app drop-down menu. Now you must choose whether you
will be creating a Consumable, Entitlement, or Subscription product. You also need to add a price,
description, and thumbnail image.



Initial Setup For In-App Billing In Your App

As you might expect, your application must be given access to the Amazon in-app purchasing
library. The purchasing library is implemented as a broadcast receiver, and you declare it in your
manifest by adding the following to the <application> section:


<receiver android:name = "com.amazon.inapp.purchasing.ResponseReceiver" >
<intent-filter>
<action android:name = "com.amazon.inapp.purchasing.NOTIFY"
android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY" />
</intent-filter>
</receiver>

This class initiates all in-app billing requests. To capture callbacks from the PurchasingManager, you
must create a PurchasingObserver class and register it with the PurchasingManager. To do this, you
subclass BasePurchasingObserver. (We will discuss each of the methods that need to be subclassed
later in the chapter.) The registration with PurchaseManager occurs in your onStart and looks like this:
PurchasingManager.registerObserver(new MyPurchasingObserver());

You also need to register the user using your app with the Amazon service. 
This also occurs in your
onStart: PurchasingManager.initiateGetUserIdRequest()

You must implement a callback for this request in your PurchasingObserver class:

PurchasingObserver.onGetUserIdResponse(GetUserIdResponse)


Using In-App Billing: Requesting a List of Items for Purchase

Similarly, a call using the PurchasingManager requests the list of items for purchase:

PurchasingManager.initiateItemDataRequest(java.util.Set skus)

You need to implement the following callback in the PurchasingObserver:

PurchasingObserver.onItemDataResponse(ItemDataResponse itemDataResponse)

Using In-App Billing: Making the Purchase

To make a purchase, call the following:
PurchasingManager.initiatePurchaseRequest(java.lang.String sku)

The callback function you need to implement is the following:
PurchasingObserver.onPurchaseResponse(PurchaseResponse purchaseResponse)


Using In-App Billing: Determining Which Items Have Already Been Purchased

The PurchaseResponse field in the callback to the following is set to ALREADY_ENTITLED when an item has already been purchased (of course, the item in question must be an ENTITLEMENT product as set in the distribution portal):
Using In-App Billing: Consumable Purchases
Consumable purchases are simply non-entitled purchases. Once they are bought, the app must
track their use. They can be repurchased at any time.


Supporting In-App Billing with Multiple App Stores

As of this writing, there is no good solution that acts to abstract away the issues of dealing with
multiple app stores for in-app purchasing. However, an open-source project called OpenIAB is in the
works that may change that. OpenIAB is a part of the One Platform Foundation, a global initiative to
help developers submit their apps across multiple alternative app stores.
Although the code is not yet ready for prime time (or even finalized), you should track its
development because once the API is released, it will dramatically simplify the problems of dealing
with multiple in-app purchasing stores. 

You can learn more at the following web sites:

 One Platform Foundation: http://www.onepf.org/
 OpenIAB (Open In-App Billing): http://www.onepf.org/openiab











In-App Billing: Putting a Store in Your Application



In-app billing allows a developer to charge users for app features after their app has already been
downloaded. Imagine charging users for more levels of your game or charging them for virtual goods
(such as a magic sword in a game). For non-gaming apps, you could charge for special features or
even per use if the use case is strong enough.

Comics is an application that is designed to give Android smartphone and tablet users access to digital versions of their favorite comic books. Downloading the application is free, but most of the comics cost the user. We’re sure that Comixology had to make some sort of deal with the comic book companies in order to offer this service, but after those companies receive their share of the profits, we’re also sure that Comixology makes a healthy profit from comic book readers paying for digital comic book content. All that is required of the user is to create an account online, and it syncs up very well.



Tap Tap Revenge is a music game in which players tap the screen to the rhythm of their favorite tunes.The game offers a few songs for free, but if you want more, you have to pay. We’re sure that the music industry gets its percentage along with the developers.






Also SnakePike  is a simple snake game in which players tap the screen to move the snake in different direction, but if you want more, you have to download free from googleplay

  



















Making Money with Ads on Your Application: Develop Apps Like a Pro



Software Engineering

Software projects are notorious for running over budget and schedule. An academic field called
software engineering creates and investigates processes that can keep this from happening. Let’s
spend a moment discussing what processes are used.
In the traditional waterfall model of software development, there is a series of steps that are followed
one after the other, like a multitiered waterfall.
The first step is requirements analysis, in which the requirements for the project are collected. One
might detail the purpose of the software and try to define its interfaces without getting into coding
issues.


Bug and Issue Tracking

Professionals track their bugs and feature requests. Without bug and issue tracking, it’s all but
certain that problems will be forgotten. In fact, sometimes an old unresolved bug manifests itself in
a new way. A record of past issues is a great way to do some forensic investigation of a supposedly
new bug. Instead of trying to remember what happened in the past, now you have an actual record
to consult. Typically, bugs and issues are enumerated in the bug or issue tracker. It is common
practice to use bug and issue tracking in concert with revision control by creating development
branches named after the bug number being fixed. In this way, developers tie their active work
directly to the issue or bug they are supposed to be working on.
Another benefit of tracking bugs is that it allows you to prioritize problems with ease. Some bugs
can be lived with, and others cannot. But you need to know the difference before you can release
your app to the public. You absolutely must track your bugs and issues, or else you will lose track of what work needs to be done. Of course, you could always use a text document or spreadsheet. If you want to develop like a professional, however, you should consider one of the numerous programs specifically designed for tracking your bugs and other open issues. Many are hosted online where, for a nominal sum, you can avoid any installation headaches.

The following list provides some examples:
 JIRA: JIRA by Atlassian is a popular issue tracker that integrates very nicely
within Eclipse. It costs $10/month (the money is donated to the Room to
Read charity) for small teams up to 10 users. If you do Agile development, its
Greenhopper companion product is $10 more.
 Bugzilla: A free, server-based bug tracking software designed to help users
manage software development. You can use your own computer as the server if
you need only a small-scale deployment. Bugzilla is used internally by numerous
high-profile, open-source projects, including Firefox, Apache, and Eclipse.
 Redmine: A free, open–source, flexible project management web application.
 Trac: A free, open–source bug tracker that also integrates tightly with popular
revision control systems, including Git, Subversion, Mercurial, and others. It
focuses on offering a minimalistic approach to software project management;
it tries to impose as little as possible on a team’s established development process.
 MantisBT: A free, popular web-based bug tracking system that is also open
source. Mantis also provides the MantisTouch client optimized for smartphones,
including Android!
 FogBugz: A commercial bug tracker, available both as an online hosted version
and as a self-managed client-server version (they can be the same computer).
It’s free for students and small (one-or-two-person) startups. If you don’t
mind paying for the commercial version when you’re more successful,
it might be worth a look. You can find code and details at
http://www.fogcreek.com/fogbugz/StudentAndStartup.html.



Summary

Mobile advertising is on the rise! Worldwide mobile advertising is expected to reach $11.4 billion in
2013 and is projected to reach $24.5 billion in 2016. The train is leaving the station, so let’s get
on board!
Naturally, if you’re interested in mobile advertising, you’re hoping to make some money. Mobile
advertising is a numbers game; the amount of money you will make per user is quite small, so you
must have a very large user base before you can make serious revenue.
On that note, consider that putting an ad in your paid app is often a fatal combination because
no one wants to pay for an app and then have to deal with advertising. Besides, in order to make
a significant profit, you have to get a lot of downloads, and paid apps rarely reach the level of
downloads needed to make meaningful ad revenue.









These numbers are intended only as an estimate. The actual values will depend heavily on the
specifics of your app. We’ll soon get into the math that will allow you to calculate these numbers for
your own app. That said, as you can see, it generally requires a surprisingly large number of users to
generate enough ad revenue to surpass the “beer money” stage.
To begin, you will need to sign up with one or more ad networks. These networks, such as
AdMob, Mobclix, and Leadbolt, connect advertisers with content publishers. From an advertiser’s
perspective, you as an app developer are a content publisher. On the technical side, the ad network
will give you an application programming interface (API) with which to serve its ads.
We’ll say more about that later, but let’s talk about the types of ads you can use first.


Mobile Ads by the Numbers

Let’s discuss how to do a revenue analysis of the type we presented in the chart at the beginning of
this chapter. Mobile advertising has a jargon all its own, and you need to know the lingo before you
can make sense of any financial calculations. In Figure 6-4, note the attention given to statistics such
as Revenue, eCPM, Requests, Impressions, Fill Rate, and CTR in the AdMob screen shot.




You’re going to hear a lot about eCPM, which is the estimated-cost-per-thousand (“M” is the Roman
numeral for thousand, remember). eCPM is the basic metric for evaluating your advertising revenue.
This abbreviation refers to the amount you will be paid for every 1,000 impressions. An impression
is when an ad gets displayed on your app somewhere in the world. So right away, you can see that
there are two key factors in maintaining a high eCPM. You need lots of people using your app and
you need them to use your app for a while. After all, the longer your app stays open, the more ads
will get served.
As a publisher, you will typically see eCPMs ranging between as little as $0.20 and as much as
$1.25. That’s the typical range, but there are no guarantees. Typically, advertisers pay on a sliding
scale where payment depends on the value of the ads that are served. The ad networks simply pass
on a portion of their proceeds to you, and the amount that advertisers are willing to pay depends on
the market they advertise to. For example, an insurance provider will typically be willing to pay much more to acquire customers than a video game manufacturer.


The click-through rate (CTR) lets you know how often a user actually clicks an ad that is shown
in your app. Some ad networks hide these figures from you and simply let you know your eCPM,
without regard to click-through rates. But you should understand that the more your users click ads,
the more money you stand to make. Naturally, this means you should always have an ad available
for your users to click (subject to fill rates, as discussed in the next paragraph). If your app has
multiple screens, consider putting an ad in every one! You can even put an ad in the Settings screen,
and we’ll show you how later. But keep in mind that too many ads might alienate users, so be aware
of “ad overkill.” You will have to experiment to find the optimal balance.
An ad network’s refresh rate is how often a new ad is sent for display to your app. Many ad networks
make these figures adjustable by the developer. You will have to experiment to determine what
works best for you. Consider that each new ad is a new opportunity for a user to find something
interesting enough to click. On the other hand, if you serve ads too often, your users will find them
distracting and perhaps even annoying enough to uninstall your app. Surprisingly, at least for the
uninitiated, often your app does not get served an ad even when it wants to display one. The fill
rate refers to the percentage of time your app will have ads when it’s ready to show them. Some fill
rates can be extremely low, and this directly impacts your revenue. AdMob is not known for having
the industry’s highest eCPMs, but on the plus side, if you enable the AdSense option (which serves
you AdSense ads when a banner ad isn’t available) AdMob will provide a near 100 percent fill rate.
Unfortunately, the AdSense ads don’t pay very well.
One option to get around low fill rates is to integrate your app with more than one ad network at the
same time. Then you can display ads from whoever sends the ad first.
Ok, so that’s a background on how the mobile ad business works. So how do you make those
revenue projections? You have to estimate your eCPM. As we’ve mentioned, somewhere between
$0.20 and $1.25 is usually safe. Now you need to estimate your fill rate. This depends on your ad
network, but if you want to pull a number out of a hat, you can start with 75 percent. Your earnings
per 1,000 requests are your eCPM multiplied by your fill rate (expressed as a fraction). So now all
you need to do is estimate how many requests you will get and you have a back-of-the-envelope
estimate for revenue.
Your requests are governed by how many users you have, how long they use the app, and your
refresh rate. If you have 10,000 users, and they each use your app for 5 minutes per month, and your
app requests an ad every minute, then you will have a total of 10,000 x 5 = 50,000 requests
per month. With a fill rate of 0.75 and an eCPM of $0.50, you would generate 50,000 * 0.75
(0.50/1000) = $18.75 per month. That’s not very much. But notice that if you double the number of
minutes users spend with your app, you will double your revenue. Time spent with your app is just
as important as user base size. Once again, these calculations show that you need a very large user
base to make a living on ad revenue alone.


AdMob

If you’re going to start somewhere, you might as well start with AdMob. Let’s walk you through the
process of using its ad-hosting SDK.








AdMob’s web site is at http://www.admob.com/. When Mark visited the site, AdMob identified him from
his Gmail account, which makes sense because it is owned by Google. If you don’t have a Gmail
account, you can also log in directly to its site. Not only is the Android area good, but you might
want to check out The Guide to the App Galaxy. Registration is simple, and you will receive a
confirmation email that includes a number of useful links. In particular, you should see a link to the
AdMob help center (http://helpcenter.admob.com/).


Advertisers can also find information in the help center. Just as a backgrounder, the advertiser will
start a campaign that specifies how its ads will be presented on applications. The advertisers enter
in a start date, end date, budget, and delivery method. They will then be asked to choose an ad
group to meet advertising goals and will be given the opportunity to add multiple ad groups. They
can then customize which devices they want it on, not to mention the countries or operators they
want targeted. Advertisers can even customize the user demographic. Advertisers can run a Text Ad
Unit or a Banner Ad Unit, and they can design them as they see fit. The ads will then begin to run,
and advertisers can monitor the campaign’s performance.
Okay, that’s how it works for advertisers, but let’s get back to you, the developer. For app
integration, follow these steps:

1. Register and/or log in at http://www.admob.com/.
2. Click Sites and Apps.
3. Click Add Site/App.
4. Provide the information about the Android application.
5. Download the SDK.
6. While the SDK is downloading, head back to the Sites & Apps tab, hover
over your app, and click the Manage Settings button that appears. Near the
top of the page that appears is a long hexadecimal number named Publisher
ID. Copy that number and paste it somewhere. You’ll need it later in an XML
layout file so that your app can let AdMob know who you are.
7. You can also take a moment to explore the AdMob dashboard. You’ll be
spending a lot of time on the Sites & Apps tab. This tab shows you your
revenue for all your apps, as well as your eCPM and fill rates. It also allows
you to view your revenue trends over time.
8. After the SDK has finished downloading, extract the zip file into a new
directory. The directory now contains the AdMob library, which you need to
link into your application.
9. To do that, right-click in the left-side Package Explorer pane in Eclipse. Click
Properties and then click the Java Build Path property. In the Java Build
Path section, click the Library tab. Now just add the JAR file you previously
unzipped into the directory.
10. Now move over to the Order and Export tab. You should see the AdMob JAR
file listed there. Make sure it is selected and move it to the top of the list for
good measure. This makes sure that AdMob is first in the build path so we
don’t get any dependency issues.

11. Once the AdMob JAR file is added to the project, you’ll need to grant your
application all the permissions required by AdMob. You might already be
using these or other permissions in your app’s manifest file, but be sure
you’ve got at least the following permissions:
<uses-permission android:name="android.permission.INTERNET"/>
and
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
12. You’ll also need to reference the AdMob activity in your application’s manifest
file. Place the following within the application tag in the manifest .xml file:
<activity android:name = "com.google.ads.AdActivity"
android:configChanges = "screenSize|smallestScreenSize|keyboard|keyboardHidden|
orientation|screenLayout|uiMode"/>
13. That lets your app know you’ll be using the AdMob activity. You’ll want to
display the ad in at least one layout, and ideally in enough layouts so the ad
is always visible to your users. Within each layout, the ad is simply a view,
aptly named AdView. Here’s an example of an AdView layout element:

<RelativeLayout
[...]
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
[...]
<com.google.ads.AdView
android:id="@+id/adView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="1234567890abcde"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"/>

14. Notice the adUnitId tag. That number is the publisher ID we discussed
earlier. That’s it! You should now have ads enabled in your app. It might take
a few minutes before you’re served your first ad, so be a little patient.
An example of an application hosting AdMob is shown below:





Affiliate Programs

Although not precisely mobile ads, affiliate programs are similar in that you use your app to direct
users’ eyes to mobile websites. The idea of an affiliate program is that an advertiser encourages a
developer to send traffic to its retail sale web site, and a minute commission fee is given out for sales
rendered. As someone who has done a little work on the web, Mark occasionally receives some
revenue with affiliate programs such as Amazon. They are pretty easy to sign up for and set up, and
it is possible to use these same affiliates from within an Android app.
Beyond individual affiliates such as Amazon, you can also find affiliate networks. These companies
do for affiliates what ad networks do for advertisers. In other words, they connect affiliates with
publishers. Instead of an ad, a link to the affiliate’s web site is provided, and payment occurs when
a purchase occurs. In a sense, an affiliate network is a kind of ad network in which payment occurs
only if a sale is made on the referral.

You should weigh the benefits of an affiliate program versus a typical ad network. Ad networks
are more common in mobile apps and they are generally easier to integrate into your application.
Although affiliate programs make more money per transaction, it is harder to close a sale than it is
merely to get eyes on a web site. In other words, it’s likely that affiliate marketing will make sense
only if something about your app makes it very likely that the user will close a sale with your affiliate.

For example, if you have a music player app, perhaps referrals to a hardware provider that sells great
speakers for Android phones would result in a high rate of sales conversions.
Rakuten Linkshare (at http://mthink.com/affiliate/) is the top affiliate network in the world.
Although it doesn’t have an API specific to Android, it can be called from within an Android
application using an HTML API. This is the same way a publisher links with an affiliate on the web.
Rakuten Linkshare has tested its service with a number of mobile platforms, including Android. To
learn more, visit its web site at http://www.linkshare.com/advertisers/publishers/.

There are many other affiliate networks. To see a few, you can investigate the following sites:
 Commission Junction: http://www.cj.com
 ClickBank: http://clickbank.com
 ShareASale: http://shareasale.com
 AvantLink: http://avantlink.com
 RevenueWire: http://revenuewire.com

Even though Amazon isn’t an affiliate network, its sheer size makes it the third largest affiliate
service. You can learn about Amazon’s affiliate program at https://affiliate-program.amazon.com/
gp/associates/join/landing/main.html. eBay also has a large affiliate service. You can learn about
it at https://ebaypartnernetwork.com/files/hub/en-US/index.html.


Technical Tricks

One very useful trick to improve your ad revenue is to place an ad in every screen of your app.
Many apps have a Settings screen where user preferences are selected.





Android provides a standard framework for Preferences, and your ads can be made to work
with that framework. First, you will need a custom preference that supports ads. Note that the
following example extends Preference, a technique that has been deprecated in Android 3.0 in
favor of PreferenceFragment. This example continues to use Preference to support the roughly
40 percent of the market that isn’t using Android 3.0 or newer. If you are targeting only Android 3.0
and later, you should consider modifying your code to follow the example found here:


http://developer.android.com/reference/android/preference/PreferenceActivity.html
public class AdmobPreference extends Preference
{
public AdmobPreference(Context context) {
super(context, null);
}
public AdmobPreference(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected View onCreateView(ViewGroup parent) {
//override here to return the admob ad instead of a regular preference display

LayoutInflater inflater = (LayoutInflater) getContext().getSystemService
(Context.LAYOUT_INFLATER_SERVICE);
return inflater.inflate(R.layout.admob_preference, null);
}
}


This custom preference simply looks for an admob_preference layout to inflate. That’s where all the
work is done. The .xml file (minus the XML header) is reproduced here (notice the familiar AdView
layout contained within):


<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="fill_parent" android:layout_height="fill_parent"
>
<com.google.ads.AdView
android:id="@+id/adView1"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:adjustViewBounds="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="1234567890abcde"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"/>
</RelativeLayout>

That’s it! Those two files are all you need. Simply place your AdmobPreference into your existing list of preferences and you’ll have ads in your Preferences screen!










Wednesday 25 February 2015

Android:How to create a Camera apps in Eclipse

1. Android Camera

Most Android devices have at least one camera. Some devices have a front and a back facing camera.
Using the camera on the Android device can be done via the integration of existing camera application. In this case you would start the existing Camera application via an intent and use the return data of the application to access the result.
Alternatively you can also directly integrate the camera into your application via the Camera API.
The following description contains examples for both use cases.

2. Android Basics

The following description assumes that you have already basic knowledge in Android development.
Please check the Android development tutorial to learn the basics. Also see Android development tutorials for more information about Android development.

3. Tutorial: Using an Intent to make a photo

Create a new Android project de.vogella.android.imagepick with an activity called ImagePickActivity.
Adjust the layout of the activity to contain an ImageView with the result ID. Also add a button with the onClick property pointing to a onClick method.
Change the ImagePickActivity class to the following.
package de.vogella.android.imagepick;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

public class ImagePickActivity extends Activity {
  private static final int REQUEST_CODE = 1;
  private Bitmap bitmap;
  private ImageView imageView;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    imageView = (ImageView) findViewById(R.id.result);
  }

  public void onClick(View View) {
    Intent intent = new Intent();
    intent.setType("image/*");
    intent.setAction(Intent.ACTION_GET_CONTENT);
    intent.addCategory(Intent.CATEGORY_OPENABLE);
    startActivityForResult(intent, REQUEST_CODE);
  }

  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    InputStream stream = null;
    if (requestCode == REQUEST_CODE && resultCode == Activity.RESULT_OK)
      try {
        // recyle unused bitmaps
        if (bitmap != null) {
          bitmap.recycle();
        }
        stream = getContentResolver().openInputStream(data.getData());
        bitmap = BitmapFactory.decodeStream(stream);

        imageView.setImageBitmap(bitmap);
      } catch (FileNotFoundException e) {
        e.printStackTrace();
      } finally ch (IOException e) {
        e{
        if (stream != null)
          try {
            stream.close();
          } catch (IOException e) {
            e.printStackTrace();
          }
      }
  }
} 

4. Tutorial: Using the camera API

In this tutorial you create application which allows you to make a photo via the front camera and to save it on the SD card.

Tip


If you using the Android emulator ensure that you configured the camera and that you added an SD card during the creation of the your Android virtual device.
Create a new Android project called de.vogella.camera.api with an activity called MakePhotoActivity .
Add the android.permission.CAMERA permission to access your camera and the android.permission.WRITE_EXTERNAL_STORAGEto be able to write to the SD card to your AndroidManifest.xml file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="de.vogella.cameara.api"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="15" />
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name="de.vogella.camera.api.MakePhotoActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest> 
Change the main.xml file in the res/layout folder to the following
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <Button
        android:id="@+id/captureFront"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:onClick="onClick"
        android:text="Make Photo" />

</RelativeLayout> 
Create the following PhotoHandler class which will be responsible for saving the photo the SD card.
package de.vogella.camera.api;

import java.io.File;
import java.io.FileOutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;

import android.content.Context;
import android.hardware.Camera;
import android.hardware.Camera.PictureCallback;
import android.os.Environment;
import android.util.Log;
import android.widget.Toast;

public class PhotoHandler implements PictureCallback {

  private final Context context;

  public PhotoHandler(Context context) {
    this.context = context;
  }

  @Override
  public void onPictureTaken(byte[] data, Camera camera) {

    File pictureFileDir = getDir();

    if (!pictureFileDir.exists() && !pictureFileDir.mkdirs()) {

      Log.d(MakePhotoActivity.DEBUG_TAG, "Can't create directory to save image.");
      Toast.makeText(context, "Can't create directory to save image.",
          Toast.LENGTH_LONG).show();
      return;

    }

    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyymmddhhmmss");
    String date = dateFormat.format(new Date());
    String photoFile = "Picture_" + date + ".jpg";

    String filename = pictureFileDir.getPath() + File.separator + photoFile;

    File pictureFile = new File(filename);

    try {
      FileOutputStream fos = new FileOutputStream(pictureFile);
      fos.write(data);
      fos.close();
      Toast.makeText(context, "New Image saved:" + photoFile,
          Toast.LENGTH_LONG).show();
    } catch (Exception error) {
      Log.d(MakePhotoActivity.DEBUG_TAG, "File" + filename + "not saved: "
          + error.getMessage());
      Toast.makeText(context, "Image could not be saved.",
          Toast.LENGTH_LONG).show();
    }
  }

  private File getDir() {
    File sdDir = Environment
      .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
    return new File(sdDir, "CameraAPIDemo");
  }
} 
Change the MakePhotoActivity class to the following. This class assumes that you have a button in your layout with the onClickproperty pointing to a onClick() method.
package de.vogella.camera.api;

import android.app.Activity;
import android.content.pm.PackageManager;
import android.hardware.Camera;
import android.hardware.Camera.CameraInfo;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Toast;
import de.vogella.cameara.api.R;

public class MakePhotoActivity extends Activity {
  private final static String DEBUG_TAG = "MakePhotoActivity";
  private Camera camera;
  private int cameraId = 0;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    // do we have a camera?
    if (!getPackageManager()
        .hasSystemFeature(PackageManager.FEATURE_CAMERA)) {
      Toast.makeText(this, "No camera on this device", Toast.LENGTH_LONG)
          .show();
    } else {
      cameraId = findFrontFacingCamera();
      if (cameraId < 0) {
        Toast.makeText(this, "No front facing camera found.",
            Toast.LENGTH_LONG).show();
      } else {
        camera = Camera.open(cameraId);
      }
    }
  }

  public void onClick(View view) {
    camera.takePicture(null, null,
        new PhotoHandler(getApplicationContext()));
  }

  private int findFrontFacingCamera() {
    int cameraId = -1;
    // Search for the front facing camera
    int numberOfCameras = Camera.getNumberOfCameras();
    for (int i = 0; i < numberOfCameras; i++) {
      CameraInfo info = new CameraInfo();
      Camera.getCameraInfo(i, info);
      if (info.facing == CameraInfo.CAMERA_FACING_FRONT) {
        Log.d(DEBUG_TAG, "Camera found");
        cameraId = i;
        break;
      }
    }
    return cameraId;
  }

  @Override
  protected void onPause() {
    if (camera != null) {
      camera.release();
      camera = null;
    }
    super.onPause();
  }

} 
Lastly Enjoy!!!