Posts Tagged ‘Android’
18
Nov

PAPAYA

PapayaMobile was founded in 2008 by two friends, Si Shen and Qian Wenjie, who met in the Computer Science Department at Tsinghua University. Si Shen worked on the Google mobile team for 5 years before deciding to team up with Qian Wenjie to start their own social mobile gaming company together. Papaya mobile is headquartered in Beijing and has an office in Menlo Park, California.

PapayaMobile is an open mobile social network for Android focused on casual gaming and virtual currency. Papaya offers developers a fast and easy way to reach millions of users worldwide and improve their return on investment for Android game development.

Android users love Papaya because they can play multiple games and get a complete social gaming experience all in one, easy to download and use app.

Virtual currency (or in-game currency depending on environment) is used to purchase virtual goods within a variety of online communities; which include social networking websites, virtual worlds and online gaming sites.[1] A key revenue driver within social media, virtual currencies are specific within each game and are used to purchase in-game goods. Characters or avatars in virtual worlds own things within the context of the virtual world and users will collect each games’ virtual currency to purchase land, supplies and various items used to enhance their status and add points.[1] Some virtual currencies are time-based, relying upon measurement of in-game achievements in order to accrue exchangeable points.
The word virtual currency or cyber currency is also often used, in a more broad sense, to indicate electronic money, that is not contractually backed by tangible assets nor by legal tender laws, and which is not a tangible commodity itself. Examples are peer-to-peer crypto-currencies like bitcoin and the above mentioned in-game currencies that are backed by virtual goods.

, , , , , , , , , , , , , , , , , , , ,

31
Oct

A PNG file can be compressed using the BitMap Class’s compress() method.


bmp.compress(Bitmap.CompressFormat.PNG, 90, out);

, , ,

30
Oct

Often, you want to supply some criteria to search on. You can do this by supplying this information as part of the Intent’s extras. The ACTION_WEB_SEARCH Intent specifically uses the SearchManager.QUERY extra field for the search criteria. For example, to perform the Google search on pygmy goats, you configure the SearchManager.QUERY extra and launch the Browser as follows:

 

Intent search = new Intent(Intent.ACTION_WEB_SEARCH);  

search.putExtra(SearchManager.QUERY, “iPhone 4S”);  

startActivity(search);  

 
 

, , , , , , , , ,

16
Oct

 

There are three different default typefaces which are known as the Droid family of fonts: sans, monospace and serif. You can specify any one of them as the value for the android:typeface attribute in the XML declaration of a component that supports text styling, such as TextView. Here’s an example of all three typefaces in action:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
             android:layout_width="fill_parent"
             android:layout_height="fill_parent"
        >
   <TextView
           android:layout_width="fill_parent"
          android:layout_height="wrap_content"
           android:text="This is a 'sans' demo!"
            android:typeface="sans"
          />
     <TextView
            android:layout_width="fill_parent"
           android:layout_height="wrap_content"
           android:text="This is a 'serif' demo!"
           android:typeface="serif"
         />
    <TextView
            android:layout_width="fill_parent"
           android:layout_height="wrap_content"
           android:text="This is a 'monospace' demo!"
           android:typeface="monospace"
           />
</LinearLayout>

, , , , , , , , , , , , ,

10
Oct

Sending an SMS in android is done using SmsManager.

SmsManager m = SmsManager.getDefault();
String destination = "8675309";
String text = "Hello, Jenny!";
m.sendTextMessage(destination, null, text, null, null);

, , , , , ,

03
Oct
<EditText android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:singleLine="false"
            android:lines="5"
            android:layout_marginLeft="10dip"
            android:layout_marginRight="10dip"
            android:gravity="top|left"
            />

Here the android:lines attribute is used to set the no. of lines visible. The android:gravity attribute sets the cursor to top left corner.

, , , , , ,

22
Sep

We know about the Linnkify class in android. Have you ever wondered that we can use this same class to add a market link?
Here is a sample code for the same.


TextView txtView = (TextView) findViewById(R.id.linkme);

Pattern WordMatcher = Pattern.compile("\\b[A-Z]+[a-z0-9]+[A-Z][A-Za-z0-9]+\\b");
String MarketURL = "market://details?id=com.schogini.geeta.pack&hl=pt_PT";
Linkify.addLinks(txtView, WordMatcher, MarketURL);

, , , , ,

31
Aug

If you want the screen on when your application is running in android, then put this code in the root layout of your xml.

android:keepScreenOn=”true”

, ,

31
Aug

This can be done by showing an overlay dialog in android.

overlayDialog = new Dialog(context, android.R.style.Theme_Panel);
overlayDialog.show();

, ,

28
Aug

To create a service we create a class that extends android.app.Service and it would be like this:

public class DemoService extends Service {
@Override
public IBinder onBind(Intent arg0) {
// TODO Auto-generated method stub
return null;
}

}

Next we need to define our service in our AndroidManifest.xml file:
<service android:name=”DemoService”></service>

The service life cycle has the following events
onCreate(): called when the service is created.
onStart(): Called when the service starts by a call to startService(Intent intent).
onDestroy(): Called as the service is terminates.

, , , ,