Saturday, September 7, 2013

Finishing my first Application

  1. Toast Notifications
  2. Log/debugging
  3. Getting ready for Google Play
1. Toast Notifications: these are limited popup notifications that fade in and out automatically. They do not require user input. Things to consider before reading: Gravity is a method that allows you to manipulate the area you want to set the toast. Because we are using static , we do not need to use the new keyword. This refers to the current class you are referring too.
  1. Toast notifications


  • How to make it with 3 lines
    • String toastMessage = "Yay! Our acitivy was created!";
    • Toast.makeText(this, toastMessage, Toast.LENGTH_LONG);
    • welcomeToast.show();
  • How to make it in two lines:
    • Toast.makeText(this, "Yay! Our Activity was created!";
    • Toast.LENGTH_LONG).show();
  • How to manipulate the toast to make it show up where you want it on the  screen:
    • Toast welcomeToast = Toast.makeText(this, "Look here!", Toast.LENGTH_LONG);
    • welcomeToast.setGravity(Gravity.TOP,0,0);
    • welcomeToast.show();   
    2. Debugging
    • Logs: helpful information of why an application has crashed
      • writing data to the log and how to view the log
      • use logcat view
      • e: errors, w: warn, i: info, D: Debug, v: verbose      

    • log.d("TAG", We're logging from the onCreate() method!");
    • public static final String TAG = MainActivity.class.getName(); 


    Google play steps:
    1.  Develop the app
    2.  Sign up for a publisher account on Google Play
    3.  Sign up for a publisher for a one time fee of 25 dollars.
    4.  Fill out a form to add a new app to your account.
    5.  Publish the application(No review process)

    *Google gets 25% of profits from the app(you get 75%)

    Cannot let com.example.crystal.ball on Google Play, must change example name.

    i.e. com.MichaelTo.crystalball

    Publishing on Google Play => build the release ready APK => has debut certificate

    private Digital Signature

    go to file = > export = > expand android = > create new keystore
     * You usually have one keystore for all applications which holds your private key to sign into all apps.

    i.e.  Doan.keystore   pw: KidKuddi  alias: Doan_key

    Upload application => choose file => open(crystalball app)  => upload

    Create screen shots by using the DDMS perspective view: select emulator and camera, icon ==> save

    Now you're done. 

    No comments:

    Post a Comment