Android native using Parse Mobile App Training by RauveTech Technologies

Do you want to build your own app in 2 days?
Do you want to pick up a career as an app developer?

Look no further, we are going to assist you hand-to-hand until you achieve your dreams!

A training session will be held in Seri Kembangan on the coming 28th and 29th November, coached by our talented Mr. Mohammad Nurdin bin Norazan.

Only 8 seats are available so hurry up and book a spot NOW!

If you have any questions please dont hesistate to contact us.
For more information please visit http://bit.ly/1SfSFpl

Android native using Parse Mobile App Training

Android native using Parse Mobile App Training

Junior Full Stack Mobile App Developer (iOS/Android + PHP)

Responsibilities

As a developer, the most boring job you can get is to keep building things that bring little or no self improvement. Make no mistake about it, these jobs usually pay well which make it so hard to leave behind. If you are looking for a place where you get to level­up yourself every day in terms of technical skills and other soft skills, we have the right offer here.

We are currently looking for Junior Full Stack Mobile App Developer who are willing to sharpen their skills in either iOS (Objective-­C) or Android (Java) development.

As part of our development team, you will be:

  • In charged of developing new features and bug fixing either for our iOS or Android app.
  • Building Web API to support our mobile app.
  • Work closely with other development team members to establish workflows in order improve efficiency.

Requirements

  • Familiar with either iOS (Objective­C) or Android (Java) app development.
  • Comfortable with working on existing code base.
  • Independent and able to self­learn.

About Us

CLOSETStyles is a simple and fun way for women to buy and sell fashion out of their closets. We are a C2C Fashion Marketplace app supported by a Malaysia based Venture Company and enrolled into an Accelerator Program in Malaysia. The social platform helps women find their style mates and shop each others’ closets, cultivating a closet sharing culture across Asia. Visit our website at http://closetstyles.co

closetstyles.co

closetstyles.co

Android (GCM) Push Notification Tutorial – Part 1

In this tutorial, I will show you how to implement push notifications in your native app for android.

Download the required software packages.

  1. Download and install Android Studio and Android SDK.
  2. Android Studio + SDK – http://developer.android.com/sdk/index.html.

Setting up your development environment

Open your Android Studio and choose Start a new Android Studio project.

Start a new Android Studio project

Start a new Android Studio project

Enter your custom Application name, Company Domain and select Project location. Click Next.

Configure your new project.

Configure your new project.

Select Phone and Tablet. Make sure API 15 selected. Click Next.

Configure your new project.

Configure your new project.

Select Blank Activity and click Next.

Add an activity to Mobile.

Add an activity to Mobile.

Click Finish.

Customize the activity.

Customize the activity.

Now we need to get project id from google cloud. Go to  https://console.developers.google.com and create a new project. Click Create Project button and a popup will appear. Enter your project name and click Create. Mine is Native Push.

google cloud create project

google cloud create project

Then you will be direct to this page. Copy out your project number on the top. Click Enable API. Enable Google Cloud Messaging for Android. Click Credentials under APIs and auth on left sidebar.

google developer console API

google developer console API

 

Google Cloud Messaging for Android

Google Cloud Messaging for Android

Go to Credentials page. It’s under APIs & authCredentials.

APIs Credentials

APIs Credentials

Choose Server key.

APIs Credentials - server key

APIs Credentials – server key

Enter your custom Name and click Create.

APIs Credentials - Create server API key

APIs Credentials – Create server API key

Below is API key details for your project. Copy your API key.

APIs Credentials - API keys

APIs Credentials – API keys

Continue…

IBM has open contract positions for Bluemix

IBM has open contract positions for Bluemix in all of ASEAN (SG, MY, TH, ID, PH) for fresh graduates.

IBM Bluemix

IBM Bluemix

Candidate should fit 2-3 of the minimum requirements:
1. Minimum of 2 years in Web Application Development using NodeJS, Java or Go
2. Minimum of 2 years in Android or iOS application development
3. Familiar with Web stack – HTML, CSS and JavaScript.
4. Familiar with MongoDB or other NoSQL (Document-based)
5. Familiar with Relational Database
6. Familiar with Web Services (REST or SOAP) and OOP concept
7. Familiar with cloud environment (IaaS or PaaS)
Bonus points for:
1. Experience or knowledge in data analytics – especially social media analytics
2. Experience in web development framework – Angular JS, jQuery, Bootstrap
3. Skill in other programming language (Ruby, Python, Scala, C#, etc)
4. Conceptual knowledge in MVC or microservices
5. Past experience in using PaaS
6. Experience in IoT related development (Raspberry Pi, Arduino, etc)
7. Degree in Computer Science / Computer Engineer / AI
8. Experience in DevOps – i.e. Continuous Integration, Continuous Deployment is a plus
9. Experience or knowledge in Docker container technology.

To those interested, can send your resume to st.wissel@sg.ibm.com.

Develop a simple android mobile app (toDoList) – Part 2

In the first part of the simple android mobile app (toDoList) tutorial series, you covered the basics of setting environment and user interface.

In this second and final part of the tutorial series, we’ll cover Parse integration for each activity classes.

We’ll start where we left off last tutorial, so open your project from last time, or go through the previous tutorial first. http://blog.revivalx.com/2015/06/09/develop-a-simple-android-mobile-app-todolist-part-1/

First, we start from ListActivity where a list of tasks will happen here. Now we need to create a Task class/model. Create a new package to store our model.

Create a new package.

Create a new package.

Enter model for your package name and click OK.

Package name.

Package name.

Then create a java class called Task in model package then replace with this code.

Task.java

public class Task {

    public String taskId;
    public String name;

    public Task(){
        this.taskId = "";
        this.name = "";
    }

    public void setTaskId(String taskId){
        this.taskId = taskId;
    }

    public String getTaskId(){
        return taskId;
    }

    public void setName(String name){
        this.name = name;
    }

    public String getName(){
        return name;
    }

}

Next, we need to create an XML layout that represents the view template for each item in res/layout/item_task.xml. Right click layout folder > New > Layout resource file.

Layout resource file.

Layout resource file.

Enter item_task in File name. Click OK.

New resource file.

New resource file.

Replace with this code.

item_task.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="match_parent"
 android:layout_height="match_parent" >
   <TextView
      android:id="@+id/txtName"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Name"
      android:padding="5sp"
      android:textSize="25sp" />
</LinearLayout>

Next, we need to define the adapter to describe the process of converting the Java object to a View (in the getView method). Create a new java class in model package, name it as TasksAdapter.

TasksAdapter

public class TasksAdapter extends ArrayAdapter<Task> {
    public TasksAdapter(Context context, ArrayList<Task> tasks) {
        super(context, 0, tasks);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        Task task = getItem(position);
        if (convertView == null) {
            convertView = LayoutInflater.from(getContext()).inflate(R.layout.item_task, parent, false);
        }
        TextView txtName = (TextView) convertView.findViewById(R.id.txtName);
        txtName.setText(task.name);
        return convertView;
    }
}

Now, we can use that adapter in the ListActivity to display an array of items into the ListView. Once the adapter is attached, items will automatically be populated into the ListView based on the contents of the array. You can add new items to the adapter at any time with:

ListActivity.java

public class ListActivity extends ActionBarActivity {

    private Button btnCreate;
    private TasksAdapter adapter;
    private ArrayList<Task> arrayOfTasks;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_list);

        btnCreate = (Button) findViewById(R.id.btnCreate);
        btnCreate.setOnClickListener(new View.OnClickListener() {

            public void onClick(View arg0) {

                Intent createActivity = new Intent(getApplicationContext(), CreateActivity.class);
                startActivity(createActivity);

            }
        });

        arrayOfTasks = new ArrayList<Task>();
        adapter = new TasksAdapter(this, arrayOfTasks);
        ListView listView = (ListView) findViewById(R.id.lv_task);
        listView.setAdapter(adapter);

        ParseQuery<ParseObject> query = ParseQuery.getQuery("Task");

        query.findInBackground(new FindCallback<ParseObject>() {
            public void done(List<ParseObject> taskList, ParseException e) {
                if (e == null) {
                    for (ParseObject tasks : taskList) {

                        Task task = new Task();

                        task.setTaskId(tasks.getObjectId());
                        task.setName(tasks.getString("name"));

                        Log.d("name",task.getName());
                        adapter.add(task);
                    }
                } else {
                    Toast.makeText(getApplicationContext(), "Error: " + e.getMessage(), Toast.LENGTH_LONG).show();
                }
            }
        });

        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                Task task = adapter.getItem(position);

                Intent intent = new Intent(getBaseContext(), UpdateActivity.class);
                intent.putExtra("objectId",  task.getTaskId());
                startActivity(intent);
            }
        });

    }
}

Update activity_list.xml.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
    android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context="com.revivalx.androidparsetodolist.ListActivity">

    <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Create Task"
        android:id="@+id/btnCreate"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true" />

    <ListView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/lv_task"
        android:layout_below="@+id/btnCreate"
        android:layout_centerHorizontal="true" />
</RelativeLayout>

Replace with this code for CreateActivity.java.

CreateActivity.java

public class CreateActivity extends ActionBarActivity {

    private TextView txtName;
    private TextView txtDescription;
    private String name;
    private String description;
    private Button btnCreate;
    private Button btnBack;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_create);

        txtName = (TextView) findViewById(R.id.txtName);
        txtDescription = (TextView) findViewById(R.id.txtDescription);

        btnCreate = (Button) findViewById(R.id.btnCreate);
        btnCreate.setOnClickListener(new View.OnClickListener() {

            public void onClick(View arg0) {

                name = txtName.getText().toString();
                description = txtDescription.getText().toString();

                if (name.equals("") && description.equals("")) {
                    Toast.makeText(getApplicationContext(),
                            "Please enter name and description",
                            Toast.LENGTH_LONG).show();

                } else {
                    ParseObject task = new ParseObject("Task");
                    task.put("name", name);
                    task.put("description", description);
                    task.saveInBackground();

                    Intent listActivity = new Intent(getApplicationContext(), ListActivity.class);
                    startActivity(listActivity);
                }

            }
        });

        btnBack = (Button) findViewById(R.id.btnBack);
        btnBack.setOnClickListener(new View.OnClickListener() {

            public void onClick(View arg0) {

                Intent listActivity = new Intent(getApplicationContext(), ListActivity.class);
                startActivity(listActivity);

            }
        });
    }

}

Replace with this code for UpdateActivity.java.

public class UpdateActivity extends ActionBarActivity {

    private TextView txtName;
    private TextView txtDescription;
    private Intent intent;
    private Task task;
    private String name;
    private String description;
    private Button btnUpdate;
    private Button btnDelete;
    private Button btnBack;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_update);

        intent = getIntent();

        task = new Task();
        task.setTaskId(intent.getStringExtra("objectId"));

        txtName = (TextView) findViewById(R.id.txtName);
        txtDescription = (TextView) findViewById(R.id.txtDescription);

        ParseQuery<ParseObject> query = ParseQuery.getQuery("Task");
        query.getInBackground(task.getTaskId(), new GetCallback<ParseObject>() {
            public void done(ParseObject task, ParseException e) {
                if (e == null) {
                    name = task.getString("name");
                    description = task.getString("description");

                    txtName.setText(name);
                    txtDescription.setText(description);

                } else {
                    Toast.makeText(getApplicationContext(),
                            "Something went wrong",
                            Toast.LENGTH_LONG).show();
                }
            }
        });

        btnUpdate = (Button) findViewById(R.id.btnUpdate);
        btnUpdate.setOnClickListener(new View.OnClickListener() {

            public void onClick(View arg0) {

                name = txtName.getText().toString();
                description = txtDescription.getText().toString();

                if (name.equals("") && description.equals("")) {
                    Toast.makeText(getApplicationContext(),
                            "Please enter name and description",
                            Toast.LENGTH_LONG).show();

                } else {
                    ParseQuery<ParseObject> query = ParseQuery.getQuery("GameScore");

                    query.getInBackground(task.getTaskId(), new GetCallback<ParseObject>() {
                        public void done(ParseObject task, ParseException e) {
                            if (e == null) {
                                task.put("name", name);
                                task.put("description", description);
                                task.saveInBackground();

                                Intent listActivity = new Intent(getApplicationContext(), ListActivity.class);
                                startActivity(listActivity);
                            } else {
                                Toast.makeText(getApplicationContext(),
                                        "Something went wrong",
                                        Toast.LENGTH_LONG).show();
                            }
                        }
                    });


                }

            }
        });

        btnDelete = (Button) findViewById(R.id.btnDelete);
        btnDelete.setOnClickListener(new View.OnClickListener() {

            public void onClick(View arg0) {

                ParseQuery<ParseObject> query = ParseQuery.getQuery("task");
                query.getInBackground(task.getTaskId(), new GetCallback<ParseObject>() {
                    public void done(ParseObject task, ParseException e) {
                        if (e == null) {

                            task.deleteInBackground();

                            Intent listActivity = new Intent(getApplicationContext(), ListActivity.class);
                            startActivity(listActivity);

                        } else {
                            Toast.makeText(getApplicationContext(),
                                    "Something went wrong",
                                    Toast.LENGTH_LONG).show();
                        }
                    }
                });

            }
        });

        btnBack = (Button) findViewById(R.id.btnBack);
        btnBack.setOnClickListener(new View.OnClickListener() {

            public void onClick(View arg0) {

                Intent listActivity = new Intent(getApplicationContext(), ListActivity.class);
                startActivity(listActivity);

            }
        });

    }

}

Update your activity_update.xml.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
    android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context="com.revivalx.androidparsetodolist.UpdateActivity">

    <EditText
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/txtName"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:hint="Name"/>

    <EditText
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/txtDescription"
        android:layout_below="@+id/txtName"
        android:layout_centerHorizontal="true"
        android:hint="Description"/>

    <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Update Task"
        android:id="@+id/btnUpdate"
        android:layout_below="@+id/txtDescription"
        android:layout_centerHorizontal="true" />

    <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Delete"
        android:id="@+id/btnDelete"
        android:layout_below="@+id/btnUpdate"
        android:layout_centerHorizontal="true" />

    <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Back"
        android:id="@+id/btnBack"
        android:layout_below="@+id/btnDelete"
        android:layout_centerHorizontal="true" />
</RelativeLayout>

Run your project. I’m using Genymotion. If you don’t have, you can download it here, https://www.genymotion.com/.

Result.

ListActivity.

ListActivity.

CreateActivity.

CreateActivity.

UpdateActivity.

UpdateActivity.

You can download the source code here, https://github.com/datomnurdin/AndroidParseToDoList