Create Notification in Android

Notifications

A notification is a message you can display to the user outside of your application’s normal UI. When you tell the system to issue a notification, it first appears as an icon in the notification area. To see the details of the notification, the user opens the notification drawer. Both the notification area and the notification drawer are system-controlled areas that the user can view at any time.

Building Notification

Screenshot_20160308-130922

 

Continue reading

Advertisements

Alarm Manager

 

Whatever we code in android are made to be executed at that moment. But what if we want to trigger an event or task or an action in a time in future; may be after 15 mins , and hour or a day. To help ease this process the class AlarmManager is provided to us.

Lets get started and learn more about alarms.

Alarm Manager

 

Alarms:

What is an alarm? Alarms are the mechanism to schedule an intent in specific time in future.

Why do we need an alarm? We need an alarm to perform an action in future even if the application is not running.

Have we ever noticed that even if we exit the bluetooth connection application; it’s visibility timeout will be disabled at the mentioned time? Another obvious example is our clock.

Alarms can we very useful if you want to develop an app that allows certain notifications or triggers in future and perform respective functions.

Alarm Manager:

Quickly we’ll dive into the basics of alarm creation and take a look at the APIs provided for alarms.

  • Get an access to system’s alarm services:
    • getSystemService(ALARM_SERVICE)
  • Creating alarms
    • one-shot alarm
      • void set(int type, long triggerAtMillis, PendingIntent operation)
    • repeating alarm
      • void setRepeating(int type, long triggerAtMillis, long intervalMillis, PendingIntent operation)
    • repeating alarm in exact trigger time
      • void setInexactRepeating(int type, long triggerAtMillis, long intervalMillis, PendingIntent operation)

Continue reading

Git Commands

Git is a distributed source control repository. To get details knowledge on git visit official website.

Setting Up Git

At first if you want to use git you need to setup the basic git configuration. This is a one time only tasks and hence is important to set proper git configurations.

Git comes with a tool called git config that lets you get and set configuration variables that control all aspects of how Git looks and operates. These variables can be stored in three different places:

  1. /etc/gitconfig file: Contains values for every user on the system and all their repositories. If you pass the option --system to git config, it reads and writes from this file specifically.
  2. ~/.gitconfig or ~/.config/git/config file: Specific to your user. You can make Git read and write to this file specifically by passing the --global option.
  3. config file in the Git directory (that is, .git/config) of whatever repository you’re currently using: Specific to that single repository.

 

Your Identity

Command
Description
git config --global user.name "<UserName>"
Given username has been set as global variant for all git commands you’ll use later.
git config --global user.email <Email_Id>
Given email will be set as global variant for all git commits.

Note: If you pass the --global option, then Git will always use Continue reading

Digital Literacy Training-Samata School, Patan

Learning
A five day long Digital Literacy Training(DLT) was held by the former Microsoft Student Partners with the support of other working engineers for the students of Samata School, Patan.

The event which started off on 12 September Friday was held on every evening for an hour or two where each students learned basics of computing with office packages,paints,internet and understanding the functioning of Computers.

Introduction:
Samata School, Gwarko
Samata School is renowned for its unique structure of being a Bamboo School where all its building are built from bamboo itself. Also the school provides a Continue reading

AndEngine Simple Android Game Tutorial

Here I go taking on Android Game Development with AndEngine.
This is a detailed simple blog post to help get started with Android Game Development.

Jimmar's blog thingie

WARNING: This is an outdated tutorial for the old AndEngine GLES1.0, if you want a tutorial for the new GLES2.0 then Check my Jimvaders tutorial ..

After playing around with the Android SDK , I thought that I should give game development a test drive. After giving Cocos2D a test, I faced the problem of online support, almost all the tutorials I found online were for the iOS version.. so I looked for other Engines made for Android.

AndEngine is an awesome game engine I found, but I couldn’t find a whole game tutorial.. so I thought that I’d port Dan’s simple Android Game tutorial (that’s actually ported from Ray’s iPhone cocos2D tutorial)

This tutorial will cover:
– Adding/Removing sprites
– Using timeHandlers
– Moving sprites
– Using Sound/Music
– Pausing/Resuming your game
– Simple collision detection

View original post 2,327 more words

Paypal REST API Verification

The REST Api for Paypal payment is used when the payment is made from a source other than Paypal account i.e.  using a Credit Card information.

Credit Card Payment

Before we verify credit card payments, there are few steps we should do to make REST Api available for our app.

  • Get Access Token for your App
  • Making sure the recipient is our account
  • Check the account and currency of Payment

Access token helps Paypal authenticate our app account and at the same time uniquely identify transactions.

  1. Getting Access Token
    Continue reading