Pages

Showing posts with label paid. Show all posts
Showing posts with label paid. Show all posts

Saturday, May 14, 2016

Android Intents part 1

In this post we are going to explore the concept of intents in Android.

Intents are used by an application to interact with the phones hardware components or other applications, or to start a service or activity with a certain peice of data or to broadcast that an event has occurred.

Using Intents to launch phone activities:
we can use Intents to launch the phones basic activities such as the phone dialer, the browser or search.

these intents are called implicit intents cause you dont specify the activity you want to launch, rather Android determines the proper activity to launch based on the required action. also when the launched activity finisheds its work, the original activity has no information that the launched activity has finished its work

in this example we create an intent that performs a phone number dial action. we don not specify that we want the dialer activity to launch, rather we specify that we want to dial a number and Android launches the dialer activity to perform this action

consider this activity: consists of a TextView and a button to dial the number in the text view.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
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="Enter the phone number"
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/txtNumber"
android:inputType="phone"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Dial"
android:id="@+id/btnDial"
/>
</LinearLayout>




When you press the button the phone dialer launches and then you can call the number.
this is done using the following code
btnDial.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
// TODO Auto-generated method stub

Intent dialIntent=new Intent(Intent.ACTION_DIAL,Uri.parse("tel:"+(txtNumber.getText()).toString()));

startActivity(dialIntent);
}
});

notice that the dialer has been launched but the user has to press the call button to make a call.



if you want the phone to dial the number autom atically you could have used this intent
Intent.ACTION_CALL
but this requires ading the following permission to the manifest file:
<uses-permission android_name="android.permission.CALL_PHONE">
and that was how to launch the phone activities using intents.
for a list of available phone actions, check this link
Read More..

Friday, April 15, 2016

Sudoku 10000 Plus Free Paid Android

Sudoku 10'000 Plus Download





15'000+ puzzles, eight difficulty levels, the world's best hint functionality and statistics. The only Sudoku app you'll ever need!

Read More..

Thursday, April 14, 2016

Game Dev Story Full Paid for Android



Manage your own game company and try to create a million-selling game in this unique simulation.
Features the ability to develop your company's own game console, plus a system for changing your staff members' professions.
Your staff members can have a variety of game-related professions, from programmer to sound engineer.
Work hard and you may reach the top of the video game industry!
 Cracked by: TOPRAK
Read More..

Thursday, March 24, 2016

Fish Tycoon Full Paid for Android Free Downoad


Click here to view PC version


Fish Tycoon Full/Paid for Android APK

Anda pernah berpikir ingin merawat ikan di smartphone/tablet Android anda?
Fish Tycoon jawabannya! Di game ini anda akan merawat ikan-ikan yang cantik, yang dapat dikawin silangkan dengan spesies yang lain untuk mendapatkan keturunan yang baru. Tujuan game ini adalah untuk menemukan 7 ikan ajaib yang dapat membantu anda merawat ikan anda dengan kekuatan ajaib masing-masing.


Read More..

Tuesday, March 15, 2016

Grand Prix Story Full Paid for Android


Grand Prix Story Full/Paid for Android


Try your hand at managing an auto racing team!

Become the boss of your own team, training drivers and acquiring sponsors before conquering the Grand Prix!

Develop new vehicles and parts, and customize them any way you like! Do you have what it takes to make it to the winner's circle?

No knowledge of motorsports is required to play!

Read More..

Wednesday, March 2, 2016

Hot Springs Story Full Paid for Android



Build your own resort and propel it to success with but a touch of the finger in this one-of-a-kind simulation!
Rooms, restaurants, arcades, and baths--position each facility to lull your guests into hot spring Nirvana and skyrocket your establishment to fame!
Craft the perfect Japanese garden from lanterns, pine trees, azaleas, and more--you'll need it all if you want to attract VIPs like pop stars and novelists.
There can only be one #1! Do you have what it takes?
Turn your device to rotate the screen, touch to scroll, and pinch to zoom in and out.
Read More..

Sunday, February 28, 2016

Epic Astro Story Paid Full for Android


Epic Astro Story - Paid/Full for Android


Ready to test your mettle against the final frontier?

Pioneer an untamed planet, building roads and houses for your fellow denizens of the future. Cultivate your quaint colony into a stellar space citadel, and you'll pull alien tourists from everywhere this side of Alpha Centauri!

Careful though, not all intelligent life seeks souvenirs. Prepare to engage in heated battle with all manner of cosmic creatures! Win--and you just might be rewarded...

Strap into your spacecraft, all systems are go for an epic astro adventure that'll warp you to light speed and beyond!



Read More..

Thursday, February 25, 2016

SuperGNES Paid for Android


The premier Super Nintendo emulator! Developed from the ground up to deliver the fastest play possible. Easily locate and play your favorite titles by scanning your phone to view your list of installed ROMs, complete with cover art!

Read More..

Thursday, February 18, 2016

World Cruise Story Full Paid for Android


World Cruise Story Full/Paid for Android

Get ready to take the helm of history's grandest, most over-the-top luxury cruise liner for an unforgettably addictive excursion at sea!

Deck your own ship with everything from lavish suites and first-class restaurants to casinos and hot tubs! You call the shots as you travel the world, visiting every country on the map--even entertaining royalty with tours truly fit for kings!

Put the right facilities next to each other and you'll score big points with passengers and reviewers. Amass enough fame and even celebrities will come flocking when you're in port!

Can you turn your sea buggy into a 5-star floating paradise? Put on your captain's hat and find out in World Cruise Story!
--
Turn your device to rotate the screen, touch to scroll, and pinch to zoom in and out.


Read More..

Friday, February 12, 2016

Pocket League Story 1 Paid Full for Android

Pocket League Story 1 Paid/Full for Android


Handpick players, train, and battle your way to the top of every league in this sensational soccer team simulation!

Sell merch, erect a gym--even a stadium! Your fanbase will grow as you conquer your rivals and snag the hottest sponsors! The sky's the limit in your quest for ultimate soccer stardom!

As the crowd erupts in jubilation and the screams of "Goal!" echo throughout the stadium, will your team stand victorious? Try your hand at being a soccer team manager and find out!

Read More..

Tuesday, February 9, 2016

Android Menus Part 1 Options menu and sub menus

Android phones have the menu button which displays a menu with several items that provide navigation or more functionality or settings to your applications

Android has three types of menus
1. Options Menu
2. Context Menu
3. Sub menus

Menu items can be grouped and each menu item can have submenu items.

Options Menu

Each activity has a single menu. It appears when you press the menu button Each activity creates this menu in the callback method onCreateOptionsMenu you can override this method and add items to the menu.
If you press the menu button you will see the menu like this:
public class MenusDemo extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}

@Override
public boolean onCreateOptionsMenu(Menu menu)
{
menu.add("Item1");
menu.add("Item2");
return true;
}
}



Notice that the onCreateOptionsMenu method returns a Boolean. It should return true for the menu to appear, if returns false the menu will be invisible.

If you add many menu items, more than five items they will appear like this:
public boolean onCreateOptionsMenu(Menu menu)
{
menu.add(1, 1, 0, "Item1");
menu.add(1, 2, 1, "Item2");
menu.add(1, 3, 2, "Item3");
menu.add(1, 4, 3, "Item4");
menu.add(1, 5, 4, "Item5");

menu.add(2, 6, 0, "Item6");
menu.add(2, 7, 1, "Item7");
menu.add(2, 8, 2, "Item8");
menu.add(2, 9, 3, "Item9");
menu.add(2, 10, 4, "Item10");



return true;
}



When you press on the “more” link you will see the rest of the menu items



The menu.add(int GroupID,int ItemID,int Order,String Title) method has the following parameters:
  1. GroupID: used to group related menu items to apply some configurations on all items of a certain group once at a time (discussed later) .
  2. ItemID: an integer to identify the menu item.
  3. Order: the sort order or the order ID, controls the order of menu items in a menu. Items with lower order id appear first. There are some constants defined for sort order for different kinds of menu items
    Like Menu.CATEGORY_SECONDRY for secondry menu items, Menu.CATEGORY_SYSTEM for system menu items and Menu.CATEGORY_ALTERNATIVE for altenative menu items..
  4. Title: the text of the menu item


We could have written the previous code using the predefined the sort order constants like this:
menu.add(1, 1, Menu.FIRST, "Item1");
menu.add(1, 2, Menu.FIRST+1, "Item2");
menu.add(1, 3, Menu.FIRST+2, "Item3");
menu.add(1, 4, Menu.FIRST+3, "Item4");
menu.add(1, 5, Menu.FIRST+4, "Item5");

menu.add(2, 6, Menu.CATEGORY_SECONDARY, "Item1");
menu.add(2, 7, Menu.CATEGORY_SECONDARY+1, "Item2");
menu.add(2, 8, Menu.CATEGORY_SECONDARY+2, "Item3");
menu.add(2, 9, Menu.CATEGORY_SECONDARY+3, "Item4");
menu.add(2, 10, Menu.CATEGORY_SECONDARY+4, "Item5");




Adding Icons to menu items:
We saw that only the first five items can appear in the options menu and the other items appear in a dialog when you press “more” item.
For the first five items you can add an icon to appear next to the items title:
menu.add(1, 1, 0, "Blu-Ray").setIcon(R.drawable.bluray);
menu.add(1, 2, 1, "DVD").setIcon(R.drawable.dvd);
menu.add(1, 3, 2, "Hard Disk").setIcon(R.drawable.hd);
menu.add(1, 4, 3, "Sites").setIcon(R.drawable.sites);
menu.add(1, 5, 4, "USB").setIcon(R.drawable.usb);

menu.add(2, 6, 5, "Item1");
menu.add(2, 7, 6, "Item2");
menu.add(2, 8, 7, "Item3");
menu.add(2, 9, 8, "Item4");
menu.add(2, 10, 9, "Item5");



Grouping Menu Items:

We saw that the method we use to add menu items us Menu.Add(GroupID,ItemId,OrderID,Title)
The first parameter is GroupID, what is it ? the answer leads us to grouping Menu Items.

Grouping menu items makes it easy to apply some options on some related menu items by applying these options on all menu items that belong to a group once instead of applying them on each single item at a time.

The actions that can be applied on a group can be:
  • Menu.removeGroup(int GroupID): to remove all menu items belonging to the same group.
  • Menu.setGroupCheckable(int GroupID,Boolean Checakble,Boolean Exclusive): maked a group appear with a check mark beside each item. If the Boolean Exclusive is set to true then the items will appear as if they are in a radiobuttongroup and only one item can be selected at a time. If set to false then they will appear with check boxes beside each item and multiple items can be selected at a time.
  • Menu.setGroupEnabled(int GroupID,Boolean Enabled): sets all items in a group to be enabled/disabled.
  • Menu.setGroupVisible(int GroupID,Boolean Visible): sets all items in a group to be visible/invisible.
Note: the methods mentioned above can be applied only to menu items in the secondary menu (items that appear when you click the more button)


Adding Alpha-Numeric shortcuts to menu Items:
You can add alphabetic or numeric shortcuts to menu items like this:
menu.add(2, 8, 7, "Item3").setNumericShortcut(3);
menu.add(2, 9, 8, "Item4").setAlphabeticShortcut(c);
then setting the querty mode of the menu to true like this:
menu.setQwertyMode(true);

and thats it for Androids options menu.

In a next post well talk about handling options menu events
Read More..