jay's old blog

this blog will be deleted soon - please visit my new blog - https://thesanguinetechtrainer.com

Why I am leaving Airtel Mobile

The story starts in the month of December 2015. I moved to a new place (and our office moved at the same time) and I realized that my Vodafone 3G was getting spotty at both my office and also at my new residence. I spoke with Vodafone (who are simply amazing as I continue to be their customer for my other number and in process of going back to them as I write this) and they said that in Bangalore (as with Karnataka circle) they don’t have their own 3G network and that they were sharing whatever Airtel Mobile gives them.  

In fact, the Vodafone girls and guys (love them!) were extremely polite, calling me back, following up on my issues and so on and so forth. They said that when it comes to 3G, they are limited by what Airtel provides and their hands are tied, at least until they get their own network. Eventually, I decided to do the only logical thing. Switch to another network, and even at this point, the Vodafone girls and guys were very polite (as always) and told me to come back once they have their own 3G/4G network.  

I asked around and found that Airtel Mobile has the best network. I borrowed a friends Airtel SIM, used it at my new residence, and then at my office. I wasn’t getting great speed but I was getting somewhere around 1 mbps which was good enough for me. So, after doing this trial thing, I finally sent the MNP/Porting (with a heavy heart) code to Vodafone, subscribed to the most expensive plan that Airtel Mobile offers to customers and boom, just like that, I was on Airtel Mobile.  

And, thus started my 3 months of hellish experiences. Three months, where I was crippled in terms of mobile and data connectivity.  

The problems started the very first day of getting the new SIM. I immediately noticed that the data connectivity was poor at my office location and also at my residence. I thought perhaps it was a glitch and that the issue is something else, like my SIM is new and the MNP stuff is affecting is. Then, couple of more days passed and I noticed that I was speeds of less than 50 kbps. For reference, 1 mbps equals 1000 kbps.  

Obviously I was disappointed. I called up customer care and that is when things really started to go downhill.  

  1. When I called care (it was midnight) the rep took the call and then simply...let it idle. I figured he probably just went back to sleep. He did not even put me on hold. He just, let it be. 

  1. I called again, the rep took the call, told me that note down the issue, and then...well...he just ended the call. No case number nothing. 

  1. I called again and this time too, I got an agent who was simply not 'alert' and sounded very sleepy to help me out. I gave up on him half-way through the call and decided to end the call. 

After this incident and after having generated a very low opinion of Airtel Support (and it hurt me even more because I was on the highest plan they offered and was expecting some kind of a VIP experience. I had this expectation because when I was on Vodafone, I was a platinum customer and was treated as such) and its service in general, I decided to do some investigation of my own and collected some data.  

Next day, I drove all the way from my residence to office. Every kilometer, I would stop and run a speed test via the speedtest app. The weird part was, I was getting upwards of 5 mbps, every time I tested. I ran multiple tests and each time I got fantastic speeds. So, I knew that Airtel 3G is good but I also realized for very odd reasons, Airtel 3G was not good at my residence (where I spend half of my day and weekends) and at my office (where I spend the other half of my day and weekdays). 

Armed with this intel, I called up Airtel Mobile care later in the evening (I would have preferred to call at midnight but by now I know that although Airtel Mobile care is round the clock, their tech support is sleeping during midnight hours) and spoke to a executive. I told them how I am getting good speeds and connectivity everywhere except at my residence and at my office. They listened to my whole story, said they will investigate. A few days passed and I got this SMS.  

Image

So,  

  • My phone with the same airtel SIM can get high speeds at many places except at my office and residence. 

  • My phone with the different SIM can get high speeds. 

  • My phone, a Mi4 device still under warranty and a medium range, branded device. 

Despite all this data, somehow, the technical investigation department decided that my phone must be faulty and I must buy a new phone! 

That is when I realized that, yup, while Airtel is a great brand and everything, their mobile support is out of touch with its customers. When that happens, it's time to let go.  

For the next three months, this is how my phone life was. Note that I cannot do MNP unless 90 days have been spent on the current network, and my number has been around for more than 8 years, so changing my number was not an option either. 

  • I bought a second phone. Yes, because of Airtel I bought a second phone and used a SIM from another network (Actually Vodafone. They launched their own working, fully awesome 3G/4G network in January). Then, I turned on mobile sharing on my second phone, and connected my main phone which is on Airtel Mobile.  

  • That means, for these three months, I was carrying two phones (when I go for a walk, do some light shopping, have dinner with friends) in my pockets all the time! 

  • As if the data problems were not enough, even the phone service went down after February. Calls would get constantly disconnected, voice clarity is not there and myriad other issues.  

Anyway, now, the 90 days period is over. I can now happily port over to Vodafone. This brings me to the man question, as to why, I wrote this blog post. 

  1. The main reason is, whenever we send that porting request, usually customer care will call and ask, "why am I leaving"? Instead of explaining to them about my ordeal, it is easier if I just show them this blog post. 

  1. Second, airtel is by far the biggest service provider in the country (and I am huge fan of their broadband services. That is why in the entire blog post I have specifically mentioned 'Airtel Mobile' instead of just 'Airtel'. Airtel Broadband service (where I am also a platinum customer) is just amazing and I love those girls and guys. If they are that big, they must be doing something right. Perhaps, my case was unique and someone could look into this issue. 

Follow me on twitter, facebook and instagram for more updates. Thanks!

Introducting the chat nildana app for android



We have been speaking about this chat app for a while now, and we finally built the initial version. Check out our previous posts here and here.

You can find more details about this app in the linked blog posts but in a nutshell, here is what defines this app

  • start chatting without the hassle of account creation.
  • no chat history
  • forced two way communication
  • serious security, simple because none of your chats are stored, either on the phone or on the cloud.

Using the app is easy.

  1. create a session key
  2. give the session key to your friend (either through SMS or direct face to face or any other way that is convenient to you)
  3. start secret chatting

Of course, the chat is extremely simplistic. It is only good if you want to have short and quick conversations. This will in no way replace your existing favorite chat app. However, under the right conditions (you know how your browser has private browsing for those right situations), you just might find this app useful.

Almost forgot to include the download link. Here you go!

Get it on Google Play

Follow me on twitter, facebook and instagram for more updates. Thanks!

simple (simplistic) chat app - developer update 1



We continue to work on our simple chat app. If you are new to this news, read up our original concept design at this blog post - http://blog.studynildana.com/post/building-a-simple-simplistic-chat-app-chat-nildana

So far, we have built the initial interface. Here is the opening screen.



Here is the venerable help page that is a standard across all our apps.



Here is the "send" part of the app. This is where the app user will be able to start a chat. Keeping with our original plan, we are ensuring that only one person can chat at any given point of time.



Here is the "receiver", the second party in the chat. Again, keeping up with the design, this person can only join a chat. She cannot start a chat. For that, the app must be on the other page.



That is the progress so far on the app. The basic framework is ready. Next, we plan to implement the cloud part (powered by Microsoft Azure Mobile Services, as with most of our apps) and get the chat thing rolling. We have full plans to release the code for free, so other developers can pick this up and add features to it.

Follow me on twitter, facebook and instagram for more updates. Thanks!

building a simple (simplistic) chat app - chat nildana



The other day, I was looking at chat systems and how much they have simplified our lives by allowing us to do anything and almost everything. As a trainer, I get to keep in touch with my students as well as future clients with ease. Its fun and good. At the same time, this same chat app (and other chat systems like FB messenger, Skype) got me thinking, what about a simple (or rather, simplistic chat system) chat app that does the very basics.

So, I sat down and designed a simple chat app (system) with the following features. If you are curious, you can download the entire design document at this link - http://1drv.ms/1Nfh3nh


 


As you can see from the list of features above, we are talking a very bare bones chat app that does not even include notifications. no need to create account, no need to worry about someone else reading the chat history and no need to worry if internet speed is good or not. There are no ads either. This is a free app and a free service and I really don't want to pester people with ads everywhere.

With that in mind, here is how I envision this simple chat app would work. Of course, keeping with the tradition of study nildana, we are calling it "chat nildana".

enforcing two way communication

Another thing we wanted to do with our app is enforce two way communication. That means, once a person has sent a message, until another person has read and replied, this person cannot send a message. This works both ways. Here is a pictorial for that.






So, there you have it. A simple app that does the very basics of chat without any of the bells and whistles. We are building it now and will update this blog once the app is ready to use.

Follow me on twitter, facebook and instagram for more updates. Thanks!

android training – Episode 7 – page navigation



Hello and welcome back. May name is Jay, and I am your trainer for today. We are going to assume that you already went through Episode 1 to 6.

We are jumping into development now. That means, the page will be heavy with screenshots. I have tried my best to use low sized images so that you can load this even on a 2G connection. If you are having issues loading any of our tutorial pages, contact us. You will find the contact information, at the end of the blog.

You can download the code for this project, from GitHub, right here – https://github.com/Jay-study-nildana/sn_tr_activity_nagivation_2

If you don’t know about GitHub, check out our blog post here – http://blog.studynildana.com/post/study-nildana-and-github

Topics Covered In This Episode

In this episode, we will look at doing the following.

  • Navigating from one activity to another activity
  • Send data from one activity to another using ‘Bundle’ object

In this app tutorial, we will show you how to go from one app page (or activity) to another app page (or activity). This is a basic level of skill needed in building apps because most apps require you to move between activities/app pages. Further, we will also show you how to send simple data from one activity to another activity using this object called as ‘Bundle’. It is useful for simple data operations.

Of course, if you want to send huge sets of data between activities, a better option would be to use SQLite but that is something we will talk about some day in the future.

As always, here is how your new project should look. If you are not sure how we got something like this, refer our training episodes 1 to 6. I want to draw your attention to the circle. That is where all the layouts (the xml part of an android activity) are located. We are looking at navigating to another activity, so we need to add a new activity.




I just want to add here that an android activity is actually a combination of two pieces.

  • Activity – First Piece – The xml page that forms the UI part and is where we put buttons, TextView and all the visual stuff. This will have an extension of “.xml”. For example, MainActivity.xml
  • Activity – Second Piece – The java page that forms the code part where all the backend action takes place. This will have an extension of “.java”. For example, MainActivity.java

Okay, coming back, there are so many ways to add a second activity. We will do something like this, and follow the pictures in sequence. Start off by “right clicking” the “layout” on the project directory, then selecting “new” and then selecting “activity” and then selecting “blank activity”.





After you do that, you will see something like this. Don’t do anything extra. Leave everything as it is, and hit “Finish”.




Now, you have a new activity called “Main2Activity” which adds two files to your project. One .xml and One .java file, as explained before. Here is the picture to show where they are located.




Now, I am going to do the following.

  • Add some basic text in both the activities. This has already been covered in earlier episodes.
  • Add a button in the first activity. On pressing this button, the app will go from first activity to the second activity. Adding buttons is also covered in earlier episodes.
  • In the button, I will add code that will allow me to go to second activity. This I will explain in detail.

So, here is my OnClick function for the button. This is how it looks before I add the code that will perform page navigation.

            @Override
            public void onClick(View view)
            {
                //This is where I will write my code that will move the app from this activity to the next one

            }//end of OnClick function

In order to perform page navigation, I need to use Intents. Someday, I will write a detailed blog post about Intents. For now, understand that Intents (short for Intentions) are something that will use whenever you wish the app to do something for you. Right now we “Intent” to navigate to the second activity.

So, I will fist create an Intent, and assign it a purpose. Check out the code snippet, and the code comments to understand what is happening. This is how it will look after I have added the code that will perform page navigation.

            @Override
            public void onClick(View view)
            {
                //This is where I will write my code that will move the app from this activity to the next one
                //I now create a intent object, and then provide it with the application context and the class
                //of the activity i want to go to
                Intent in = new Intent(getApplicationContext(),Main2Activity.class);

                //after assigning the intent, I will then start it.
                startActivity(in);

            }//end of OnClick function

Now, let me run the app, and see if the page navigation is actually happening. Here is how app looks upon launching.




And it has come to the second page/activity, after pressing the button




Alright then! Our app is doing simple page navigation. Basic navigation is of no use, if we cannot send some data. Next, we will send a simple sentence (string) from the first page/activity to the second page/activity. To do so, as informed before, I will use a Bundle. You see, a bundle uses a simple database that is based on the key/value principle of storing data.

Perhaps someday, we will write a detailed blog post about key/values. Till then, the basic concept is that when storing data, we will first create a ‘key’ and then assign some value to it. Later, we use the ‘key’ and then extract that value from the Bundle.

Here is the code that will use the Bundle, a key and its value. Follow the comments to understand what is happening. In this code, I am sending the words “page navigation tutorial from study nildana” from the first activity to the second activity. Please note that this code is in the “MainActivity.java” file.

                //I now create a intent object, and then provide it with the application context and the class
                //of the activity i want to go to
                Intent in = new Intent(getApplicationContext(),Main2Activity.class);
                //after assigning the intent, I will then start it.

                //I wish to send a string that contains the sentence "page navigation tutorial from study nildana"
                //so created a string variable that will hold this sentence
                String sentence_to_send = "page navigation tutorial from study nildana";

                //Now, putting this String variable into the bundle that will go with the intent
                //Remember the key and value thing we talked about in the blog?
                //Here the key is on the left side and the  name is 'sentence_from_first_activity'
                //The corresonding value is the variable 'sentence_to_send'
                in.putExtra("sentence_from_first_activity",sentence_to_send);

                //now, when this intent is started, the bundle we sent will go to the next page.
                startActivity(in);

Now, I need to move to the second activity, and collect this bundle. Then, I need to collect the string/sentence I want, using the key I used in the first activity. Check out the code snippet and the comments to understand what is happening. Please note that this code is in the “Main2Activity.java” file, which is the target of this intent.

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

        //first I need to create a bundle object to collect all the extras
        //here i have creaed a bundle and also collected all the sent values
        Bundle b = getIntent().getExtras();
        //now I will use the key that was used in the first activity to collect my string value
        //the collected string value has been stored in the variable called 'temp'
        String temp = (String) b.getCharSequence("sentence_from_first_activity");

        //now I will set the text of the TextView object that is already in this activity

        TextView textView = (TextView) findViewById(R.id.textView_second_activity);
        textView.setText(temp);
    }

Now, let me see if the app actually sends the string by running the app.




And, look at that. The information did come through the bundle.




Well, there you go. We now have a simple app that will navigate from one page to another. It will also carry some data with it. As always, don’t forget to download the code from our GitHub repository right here - https://github.com/Jay-study-nildana/sn_tr_activity_nagivation_2

Next episode, we are going to show a simple calculator that will use all the concepts that we taught you from Episode 1 to Episode 7. In fact, one of study nildana students will be building that app. 

Follow me on twitter, facebook and instagram for more updates. Thanks!

android training – Episode 6 – input and output

Hello and welcome back. May name is Jay, and I am your trainer for today. We are going to assume that you already went through Episode 1 to 5.

We are jumping into development now. That means, the page will be heavy with screenshots. I have tried my best to use low sized images so that you can load this even on a 2G connection. If you are having issues loading any of our tutorial pages, contact us. You will find the contact information, at the end of the blog.

You can download the code for this project, from GitHub, right here – https://github.com/Jay-study-nildana/sn_tr_inputoutput

If you don’t know about GitHub, check out our blog post here – http://blog.studynildana.com/post/study-nildana-and-github

Topics Covered In This Episode

In this episode, we will look at doing the following.

  • Using ‘EditText’ widget to collect input
  • Using ‘TextView’ to show output - This has already been taken care of in an earlier episode and hence will focus more on EditText this time.
  • Using a simple ‘Button’ widget. This is new to you, so we will spend additional time on this. 

As usual, we will not just focus on using these widgets. In this input and output project/tutorial, I will build a simple app that accepts the name as an input, and then says “Hey, (entered name)! Welcome to training at study nildana”, when the button is pressed.

The idea is, if you can understand basic input and output like this, you can probably start doing more things. To take our usual example app, alert nildana, we are generating a secret key based on the information entered by the user. In your app, you could collect some other type of input and show some output based on the app design you are aiming for.

Further, we also spend some time on using a button. A lot of times, you want to trigger an action based on user action. If you remember, any app you use, you are almost always getting things by tapping on something. For instance, you enter the username/password and then press the ‘login’ button. You select a number of photos and then hit ‘send’ to send it to someone else. That means, you are always using one or the other kind of button all the time.

Taking Care of Design UI

As your project starts, your project should look something like this. As with the previous episodes, I have made the app full screen and removed the menu on the top right corner. Use my earlier episodes to see how you can do this.




There are three parts in the above image.

  • Two circles with the heading ‘1’. That is where I am dragging an ‘Edit Text’ widget from the palette on the left and putting it on our design view. This is the same procedure you used in the previous episodes to add TextView widgets. As with TextView, we have a special post on EditText as well. Check out that blog right here –
  • The circle with the heading ‘2’ is where you can see the same EditText we just added. You will notice a small exclamation symbol. That is because we have not set a ‘input type’. Check out our specific blog on TextView to find out what this is all about.
  • The circle with the heading ‘3’ is where you will find properties. This is where I can set the properties, and right now all I want to do is give this widget a proper name, also called as ‘id’. As with variable and function names, we should be using meaningful names for the id too. If you are not sure why or what is the importance of meaningful names, check out our blog on that topic, right here –
After setting the input type (to text) and the id (to editText_input_user), the same picture will look something like this.





Next, I will need a TextView, to display the output. The TextView has already been dealt with in previous episodes, but you can always refresh yourself by visiting this link about TextView –

Here is the picture after adding TextView. You will notice that Android Studio is flagging me, or warning me about something. I have marked it with a circle.




The error is about “hardcoded strings”. Hardcoded strings are string values (English words, sentences or anything else you type in double quotes i.e. string constants) that are directly typed into the widget. As a rule, more like programmer good habits, it is better to use string resources that are stored in “strings.xml” file. Find out more about string resources and the strings.xml right here, at this blog –

I have gone ahead and added the string resource, and that error is now gone. I have added a new string resource called ‘input_user’ and to that resource, I inserted a value called ‘output will come here’.




So, the input and the output box is here, it is time to include a button. As usual, we have a specific focus blog post on ‘Button’ widget that you can find here –




And, I set the button a title (in the text property) and set an id. Here is the picture to reference that.




At this point, we have the three widgets that we need to get going. The EditText to collect the input. The TextView to display the output and lastly, the button to make the words appear. To make this happen, we need to move to the code file or the “.java” file of the activity we are working on.

Taking Care Of Code

I really hope you have downloaded the code from GitHub, or you are at least looking at the code directly on the website. Follow the comments that populate the code. Otherwise, you won’t understand what is happening.

Now, I need a function that will “listen” to button taps in the entire activity. For that, I type something like this picture, and android studio will prompt me automatically if I wish to create this function.





Once I let it create the method, the code snippet should look something like this. Feel free to copy this code to your project, if you are having difficult or run into errors.


    private void button_listener()
    {

    }//end of button_listener

Now, in this button listener, I want to do the following.

  • Connect the button widget (in the UI) with a button object in the code.
  • Get the button object, and connect that to an onclick listener.
  • Then, inside this listener function, collect input (from EditText) and then display output (on TextView)

Here is where I am creating a Button object.

    //creating the Button object

    Button button_for_hey_there;

When you try to add the above, Android Studio will prompt you to automatically include a library that is needed for this code to work.




You will see prompts like this whenever you include a code that needs some missing library. When you see this, as the prompt suggests, use “Alt and Enter” and Android Studio will do the rest for you. Of course, you don’t do this, you will run into errors. So, don’t skip the “Alt and Enter” step.

Now, connecting this button object to the button UI widget

        //connecting the button object to the button in the UI page
        button_for_hey_there = (Button) findViewById(R.id.button_hey_there);

Now creating the listener. Do remember that the listener will be automatically created for you or you can copy paste the above code.

Finally, you should have something like this, the full code.

        //creating the onclick listener
        button_for_hey_there.setOnClickListener(new View.OnClickListener()
        {
            //this is the OnClick function where we need to put all the things that are supposed to happen when the user taps the button

            @Override
            public void onClick(View view)
            {

            }
        });

Do you see that onClick code?




Whatever code you put inside that function, will be executed when the button “button_hey_there” is tapped by the user.

In this code, I am going to connect the EditText object to the EditText UI element in the UI page.

                //connecting the editText object with the editText widget in the UI
                //this will be the persons name
                EditText editText_collect_user_input = (EditText) findViewById(R.id.editText_input_user);

Now, I am going to collect whatever the user has entered in that widget.

                //collecting the string that the user has entered
                String temp_collected_name = editText_collect_user_input.getText().toString();

Now, I am going to create an output string.

                //creating an output string
                //I want an output something like - "Hey, Jay! Welcome to training at study nildana
                //for those who are new to Java, '+" here acts like a concatenation operator, adding up strings together
                String output_string = "Hey, " + temp_collected_name + "! Welcome to training at study nildana";

Now, connecting the TextView object to the TextView UI in the UI page.

                //connecting the textView object with the textView
                TextView textView_output = (TextView) findViewById(R.id.textView);

Finally, I am going to ‘set’ the output string to the TextView on the UI page, through the TextView object.

                //setting the output string to the textView_output object
                textView_output.setText(output_string);

Here is the final code, of the entire file. If you put this code into your java file, it should do what we plan to do with this lesson.

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity
{
    //creating the Button object

    Button button_for_hey_there;

    //the OnCreate function is the first function to be called when the current activity starts
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        //to make the button work, we need a function called that will "listen" to buttons being clicked.
        //you can call this function anything you want
        //I am calling it "button_listener" you can call it "amazon" if you want.
        //just make sure you put it in the OnCreate function, right here

        button_listener();
    }//end of onCreate

    private void button_listener()
    {
        //connecting the button object to the button in the UI page
        button_for_hey_there = (Button) findViewById(R.id.button_hey_there);

        //creating the onclick listener
        button_for_hey_there.setOnClickListener(new View.OnClickListener()
        {
            //this is the OnClick function where we need to put all the things that are supposed to happen when the user taps the button

            @Override
            public void onClick(View view)
            {
                //connecting the editText object with the editText widget in the UI
                //this will be the persons name
                EditText editText_collect_user_input = (EditText) findViewById(R.id.editText_input_user);

                //collecting the string that the user has entered
                String temp_collected_name = editText_collect_user_input.getText().toString();

                //creating an output string
                //I want an output something like - "Hey, Jay! Welcome to training at study nildana
                //for those who are new to Java, '+" here acts like a concatenation operator, adding up strings together
                String output_string = "Hey, " + temp_collected_name + "! Welcome to training at study nildana";

                //connecting the textView object with the textView
                TextView textView_output = (TextView) findViewById(R.id.textView);

                //setting the output string to the textView_output object
                textView_output.setText(output_string);

            }
        });

    }//end of button_listener

}//end of class MainActivity

Now, let’s run the app and see if we achieved our goals here. How it looks when app is launched.




Here is when the app is accepting input.




Here is the final input.




Well, there you go. That takes care of a simple app that accepts input and shows output. Don’t forget that you can get the source code for this app at GitHub – https://github.com/Jay-study-nildana/sn_tr_inputoutput

Next episode, we will do page navigation. In page navigation, on pressing a button, the app will go from one page (activity) to another activity. We will also send data from one activity to another.

Follow me on twitter, facebook and instagram for more updates. Thanks!