Wednesday, 15 June 2016

Date Formatting - Java - Android

The below code snippet will be most useful for the tyro's and intermediate developer to format their date values to the expected formats,  no need to worry about the format what we are getting from the JSON or XML values.  Just get the date value and make a input date format and define the separate string for expected output date format and also keep ready with the date value.

1
2
3
 String inputFormat = "EEE, dd MMM yyyy hh:mm:ss Z";
 String dateValue = "Wed, 18 Apr 2012 07:55:29 +0000";
 String outputFormat = "MMM dd,yyyy hh:mm a";

Pass those params to the below utility method to get a expected date format as string.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by rajendhiran.e on 6/15/2016.
 */
public class Utils
{
    public static String DateFormatter(String inputFormat, String outputFormat, String dateValue) throws ParseException {
        SimpleDateFormat dateformat = new SimpleDateFormat(inputFormat);
        Date newDate = dateformat.parse(dateValue);
        dateformat = new SimpleDateFormat(outputFormat);
        return dateformat.format(newDate);
    }
}

Code Snippet:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
String Error="";
        try {
            String inputFormat = "EEE, dd MMM yyyy hh:mm:ss Z";
            String dateValue = "Wed, 18 Apr 2012 07:55:29 +0000";
            String outputFormat = "MMM dd,yyyy hh:mm a";
            Log.d("Date Content:", "Value: " + Utils.DateFormatter(inputFormat, outputFormat, dateValue));
        } catch (ParseException e) {
            Error="Parser - Date Formatter Error!";
        } catch (Exception e) {
            Error="Error "+e.getMessage();
        }
        Log.d("Err: ",Error);


Thursday, 9 June 2016

Android check Internet and update the user while any changes made on the connectivity or network


If you are developing an Android app you may already fetching information from internet. While doing so there is a chance that internet connection is not available on users handset.

Hence it's always a good idea to check the network state before performing any task that requires internet connection. 

You might also want to check what kind of internet connection is available in handset. For example is wifi currently enabled? or is mobile data network is connected.

Check Internet Connection:
Here is a simple code snippet that will help you identify what kind of internet connection a user has on her device.

First we need following permission in order to access network state. Add following permission to your AndroidManifest.xml file.

Permissions required to access network state:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Now check following utility class NetworkUtil. It has method getConnectivityStatus which returns an int constant depending on current network connection. If wifi is enabled, this method will return TYPE_WIFI. Similarly for mobile data network is returns TYPE_MOBILE. You got the idea!!

There is also method getConnectivityStatusString which returns current network state as a more readable string.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 public class NetworkUtil {
    public static int TYPE_WIFI = 1;
    public static int TYPE_MOBILE = 2;
    public static int TYPE_NOT_CONNECTED = 0;

    public static int getConnectivityStatus(Context context) {
        ConnectivityManager cm = (ConnectivityManager) context
                .getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
        if (null != activeNetwork) {
            if (activeNetwork.getType() == ConnectivityManager.TYPE_WIFI)
                return TYPE_WIFI;
            if (activeNetwork.getType() == ConnectivityManager.TYPE_MOBILE)
                return TYPE_MOBILE;
        }
        return TYPE_NOT_CONNECTED;
    }

    public static String getConnectivityStatusString(Context context) {
        int conn = NetworkUtil.getConnectivityStatus(context);
        String status = null;
        if (conn == NetworkUtil.TYPE_WIFI) {
            status = "Wifi enabled";
        } else if (conn == NetworkUtil.TYPE_MOBILE) {
            status = "Mobile data enabled";
        } else if (conn == NetworkUtil.TYPE_NOT_CONNECTED) {
            status = "Not connected to Internet";
        }
        return status;
    }
}

You can use this utility class in your android app to check the network state of the device at any moment. Now this code will return you the current network state whenever the utility method is called. What if you want to do something in your android app when network state changes?

 Let's say when Wifi is disabled, you need to put your android app service to sleep so that it does not perform certain task. Now this is just one usecase. The idea is to create a hook which gets called whenever network state changes. And you can write your custom code in this hook to handle the change in network state

Broadcast Receiver to handle changes in Network state:
You can easily handle the changes in network state by creating your own Broadcast Receiver. Following is a broadcast receiver class where we handle the changes in network.
Check onReceive() method. This method will be called when state of network changes. Here we are just creating a Toast message and displaying current network state. You can write your custom code in here to handle changes in connection state.

1
2
3
4
5
6
7
public class NetworkChangeReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(final Context context, final Intent intent) {
        String status = NetworkUtil.getConnectivityStatusString(context);
        Toast.makeText(context, status, Toast.LENGTH_LONG).show();
    }
}

Once we define our BroadcastReceiver, we need to define the same in AndroidManifest.xml file. Add following to your manifest file.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
<application  ...>
     ...
        <receiver
            android:name=".NetworkChangeReceiver"
            android:label="NetworkChangeReceiver" >
            <intent-filter>
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
                <action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
            </intent-filter>
        </receiver>
      ...
</application>

! Done

Thanks to http://viralpatel.net/blogs/android-internet-connection-status-network-change/

Tuesday, 24 May 2016

Best Programming Languages You Should Learn To Boost Your Salary


Source: http://fossbytes.com/python-go-scala-learn-best-programming-languages-salary-boost/

The 2016 Workforce-Skill Preparedness Report of Pay-scale, a salary tracking site, is out with many interesting trends related to the current tech job scenario. The report outlines that Go, Scala, and Python, along with big data tech provide the highest boost in your paycheck. if you are willing to grab a big bite of salary boost by learning some new technology or programming language, we are here to help you.It’s a no hidden fact that the knowledge of big data skills is the most in-demand in the tech world.

Today, the job market is witnessing a paradigm shift and big data skills like Hadoop and Apache Spark, along with Python, Go, and Scala, are gaining high in highest paid lists.  Using its pay-tracking database, the same trend in IT and other industries has been observed by Pay-scale.

These results have been published recently in its 2016 Workforce-Skills Preparedness Report. Among the highest valued skills that provide the biggest pay boost, all are tech related. Out of such top nine skills, seven are directly related to the deep knowledge of programming languages, frameworks, and operating systems.

The biggest jump is provided by the functional programming language Scala with an average pay jump of 22.2 percent.  Google’s Go programming language followed Scala at the second place with a 20 percent pay boost.  While Python didn’t crack the top positions in this list, it had a prominent presence in Pay Scale's survey. Depending on the job titles, Python was found to provide a pay boost of up to 8-14 percent.

Here’s the list of top 9 technologies that provide the highest salary jump:


Sunday, 22 May 2016

Image Scaling as to the Aspect Ratio - Android


Image Scaling will be huge blocker for the android developers, In our modern world applications are never been without the dynamic images.  So the images has be fitted as to the aspect ration into the views and correspondingly it needs to work on multiple devices and its sizes.

The below code snippet will be really helpful for us.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
public static Bitmap scaleImage(Bitmap view, Context ctx, int size) throws NoSuchElementException {
        Bitmap bitmap = null;
        try {
            bitmap = view;
        } catch (NullPointerException e) {
            throw new NoSuchElementException("No drawable on given view");
        } catch (Exception e) {
   throw new NoSuchElementException("Error: "+e);
        }

        // Get current dimensions AND the desired bounding box
        int width = 0;

        try {
            width = bitmap.getWidth();
        } catch (NullPointerException e) {
            throw new NoSuchElementException("Can't find bitmap on given view/drawable");
        }

        int height = bitmap.getHeight();
        int bounding = dpToPx(size,ctx);
        
        // Determine how much to scale: the dimension requiring less scaling is
        // closer to the its side. This way the image always stays inside your
        // bounding box AND either x/y axis touches it.
        float xScale = ((float) bounding) / width;
        float yScale = ((float) bounding) / height;
        float scale = (xScale <= yScale) ? xScale : yScale;
        Log.i("Test", "xScale = " + Float.toString(xScale));
        Log.i("Test", "yScale = " + Float.toString(yScale));
        Log.i("Test", "scale = " + Float.toString(scale));

        // Create a matrix for the scaling and add the scaling data
        Matrix matrix = new Matrix();
        matrix.postScale(scale, scale);

        // Create a new bitmap and convert it to a format understood by the ImageView
        Bitmap scaledBitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix, true);
        width = scaledBitmap.getWidth(); // re-use
        height = scaledBitmap.getHeight(); // re-use

        BitmapDrawable result = new BitmapDrawable(scaledBitmap);
        
        // Apply the scaled bitmap
       // view.setImageDrawable(result);
        return scaledBitmap;
    }

1
2
3
4
public static int dpToPx(int dp, Context ctx) {
        float density = ctx.getResources().getDisplayMetrics().density;
        return Math.round((float)dp * density);
    }

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 Glide.with(context)
                .load(url)
                .asBitmap()
                .centerCrop()
                .skipMemoryCache(true)
                .diskCacheStrategy(DiskCacheStrategy.NONE)
                .error(R.drawable.profile)
                .placeholder(R.drawable.profile)
                .into(new BitmapImageViewTarget(viewHolder.txt_jobseekerImage) {
                    @Override
                    protected void setResource(Bitmap resource) {
                // Do bitmap magic here
                        resource = CommonUtil.scaleImage(resource, context);
                        super.setResource(resource);
                    }
                });

Tuesday, 19 April 2016

Encode and Decode the Bitmap to Base64 String and vice versa

// Encode the Bitmap to Base64 String:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
public static String encodeTobase64(Bitmap image) {
        Bitmap immagex = image;
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        immagex.compress(Bitmap.CompressFormat.JPEG, 100, baos);
        byte[] b = baos.toByteArray();
        String imageEncoded = Base64.encodeToString(b, Base64.DEFAULT);

        Log.e("LOOK", imageEncoded);
        return imageEncoded;
    }

Decode the Base64 String to Bitmap:

1
2
3
4
public static Bitmap decodeBase64(String input) {
        byte[] decodedByte = Base64.decode(input, 0);
        return BitmapFactory.decodeByteArray(decodedByte, 0, decodedByte.length);
    }
   

Sunday, 17 April 2016

DVM vs ART - Android

There are some major performance improvements that ART brings which were lacking in Dalvik. But every pros have some cons too. I will try to discuss both the advantages and disadvantages here.
Android 4.4 KitKat, Google decided to introduce a new way of executing apps on top of the Android operating system. Let's take a closer look at what this new runtime, called ART
ART is Google's 2-year-long ongoing secret project, which aims to boost the performance of our Android devices.
Android L (5.0) ART has been made as the default runtime (ART has completely replaced Dalvik).
ART (Android RunTime) is the next version of Dalvik. Dalvik is the runtime, bytecode, and VM used by the Android system for running Android applications.
Dalvik is based on JIT (just in time) compilation. It means that each time you run an app, the part of the code required for its execution is going to be translated (compiled) to machine code at that moment. As you progress through the app, additional code is going to be compiled and cached, so that the system can reuse the code while the app is running. Since JIT compiles only a part of the code, it has a smaller memory footprint and uses less physical space on the device.
ART vs Dalvik / AOT vs JIT
Advantages of ART over Dalvik:
  1. The apps launch speed is amazingly fast in case of ART since nothing is compiled at execution.
  2. Boot speed is faster than dalvik since nothing is execued from dalvik partition as in case of odexed ROM in dalvik
  3. Increases battery backup by reducing CPU work due to absence of compilation work on apps execution.
  4. Improved Garbage Collection (GC)
  5. And finally it is a great reward to developers because most of developers are worried that odexed ROMs are faster than deodexed ROMs but they will deodex their ROMs since they heavily theme it. In case of ART whether the ROM is odexed or deodexed it doesn't matter, it compiles the full code into machine language on installation of apps. so even deodexed ROMs are as fast as odexed in ART
Disadvantages of ART
  1. Since ART precompiles apps on installation, it takes 10-20% more space upon installation than dalvik.
  2. As dex bytecodes are converted to native machine code on installation itself, installation takes more time.
Install times on my Nexus 4, for one of our larger projects, jumped from ~17 s to ~25 s.
Dalvik vs. ART Benchmark Results (Android 4.4) : Linpack
Single Thread ---> Dalvik (135) ---> ART(149) ---> 10.93%
Multi- Thread ---> Dalvik (336) ---> ART(383) ---> 13.82%
1) Compilation Approach
This is by far the biggest advantage of ART over Dalvik. The old guy Dalvik used Just-In-Time (JIT) approach in which the compilation was done on demand. All the dex files were converted into their respective native representations only when it was needed.
But ART uses the Ahead-Of-Time (AOT) approach, in which the dex files were compiled before they were demanded. This itself massively improves the performance and battery life of any Android device.
For example
In case of Dalvik, whenever you touch an app icon to open it, the necessary dex files gets converted into their equivalent native codes. The app will only start working when this compilation is done. So, the app is unresponsive until this finishes.
Moreover, this process is repeated every single time you open an app wasting CPU cycles and valuable battery juice.
But in case of ART, whenever you install an app, all the dex files gets converted once and for all. So the installation takes some time and the app takes more space than in Dalvik, but the performance is massively improved and battery life is smartly conserved.

2) Boot Time

In case of Dalvik, the cache is built with time the device runs and apps are used as is indicated by the JIT approach. So the boot time is very fast.
But in case of ART, the cache is built during the first boot, so the boot time is considerably more in case of ART. You might see an "Optimizing apps" dialog box sometimes you boot.

3) Space Usage

The space used by apps being run on ART is much more than that of Dalvik. Like a 20 MB app on Dalvik, takes more than 35 MB on ART.
So if you are on a low storage device, then this can be a huge disadvantage for you.

4) ART is Damn Fast

As discussed above, ART is extremely fast and smooth. Apps are very snappy and responsive. Any comparison between Dalvik and ART, will surely make the ART device win by a significant margin.
ART is the answer to all those who argued that iOS is faster and smoother than Android and is also more battery efficient.

Thanks & Courtesy: 

Sunday, 27 March 2016

How to create android app with movable to sd card feature?


It is very simple to enable move to SD card feature in Android applications, all you need to do is specify the installLocation attribute in Android manifest as ‘auto’.


1
2
3
4
5
6
7
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.prgguru.sdmovable"
    android:versionCode="1"
    android:versionName="1.0" android:installLocation="auto">
...
</manifest>

installLocation attribute can be assigned with following values:

auto
It indicates that your application may be installed on the internal memory (or) external storage, but you don’t have a preference of install location. The system will decide where to install your application based on several factors. The user can also move your application between the two locations.
internalOnly
If you’re certain that your application should never be installed on the external storage, assign installLocation attribute value as ‘internalOnly’.
preferExternal
You request that your application be installed on the external storage, but the system does not guarantee that your application will be installed on the external storage. If the external storage is full, the system will install it on the internal storage. The user can also move your application between the two locations.

Saturday, 12 March 2016

RoundedShape ImageView


In a modern android application, user or profile pictures are shown in a rounded shape and those images filled out with the aspect ratio.

Use the below code to achieve that.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
public static Bitmap getRoundedShape(Bitmap scaleBitmapImage) {
        int targetWidth = 50;
        int targetHeight = 50;
        Bitmap targetBitmap = Bitmap.createBitmap(targetWidth,
                targetHeight,Bitmap.Config.ARGB_8888);

        Canvas canvas = new Canvas(targetBitmap);
        Path path = new Path();
        path.addCircle(((float) targetWidth - 1) / 2,
                ((float) targetHeight - 1) / 2,
                (Math.min(((float) targetWidth),
                        ((float) targetHeight)) / 2),
                Path.Direction.CCW);

        canvas.clipPath(path);
        Bitmap sourceBitmap = scaleBitmapImage;
        canvas.drawBitmap(sourceBitmap,
                new Rect(0, 0, sourceBitmap.getWidth(),
                        sourceBitmap.getHeight()),
                new Rect(0, 0, targetWidth, targetHeight), null);
        return targetBitmap;
    }

Please refer the link for the Bitmap Image Scaling as to the aspect ratio here,

Done!

Sunday, 14 February 2016

Android Phones – Secret codes

Note: This codes are not founded by me, i have just collected through search and sorted it out.

1. *#*#4636#*#* 
This code can be used to get some interesting information about your phone and battery. It shows following 4 menus on screen:
Phone information
Battery information
Battery history
Usage statistics

2. *#*#7780#*#*
This code can be used for a factory data reset. It’ll remove following things:
Google account settings stored in your phone
System and application data and settings
Downloaded applications
It’ll NOT remove:
Current system software and bundled applications
SD card files e.g. photos, music files, etc.
PS: Once you give this code, you get a prompt screen asking you to click on “Reset phone” button. So you get a chance to cancel your operation.

3. *2767*3855# 
Think before you give this code. This code is used for factory format. It’ll remove all files and settings including the internal memory storage. It’ll also reinstall the phone firmware.
PS: Once you give this code, there is no way to cancel the operation unless you remove the battery
from the phone. So think twice before giving this code.

4. *#*#34971539#*#*
This code is used to get information about phone camera. It shows following 4 menus:
Update camera firmware in image (Don’t try this option)
Update camera firmware in SD card
Get camera firmware version
Get firmware update count
WARNING: Never use the first option otherwise your phone camera will stop working and you’ll need to take your phone to service center to reinstall camera firmware.

5. *#*#7594#*#*
This one is my favorite one. This code can be used to change the “End Call / Power” button action in your phone. Be default, if you long press the button, it shows a screen asking you to select any option from Silent mode, Airplane mode and Power off.You can change this action using this code. You can enable direct power off on this button so you don’t need to waste your time in selecting the option.

6. *#*#197328640#*#*
This code can be used to enter into Service mode. You can run various tests and change settings in the service mode

7. WLAN, GPS and Bluetooth Test Codes:
*#*#232339#*#*  OR
*#*#526#*#* OR
*#*#528#*#* – WLAN test (Use “Menu” button to start various tests)
*#*#232338#*#* – Shows WiFi MAC address
*#*#1472365#*#* – GPS test
*#*#1575#*#* – Another GPS test
*#*#232331#*#* – Bluetooth test
*#*#232337#*# – Shows Bluetooth device address

8. *#*#8255#*#* - This code can be used to launch GTalk Service Monitor.

9. Codes to get Firmware version information:
*#*#4986*2650468#*#* – PDA, Phone, H/W, RFCallDate
*#*#1234#*#* – PDA and Phone
*#*#1111#*#* – FTA SW Version
*#*#2222#*#* – FTA HW Version
*#*#44336#*#* – PDA, Phone, CSC, Build Time, Changelist number

10. Codes to launch various Factory Tests:
*#*#0283#*#* – Packet Loopback
*#*#0*#*#* – LCD test
*#*#0673#*#* OR *#*#0289#*#* – Melody test
*#*#0842#*#* – Device test (Vibration test and BackLight test)
*#*#2663#*#* – Touch screen version
*#*#2664#*#* – Touch screen test
*#*#0588#*#* – Proximity sensor test
*#*#3264#*#* – RAM version

11. To get to a File copy screen for backing up your images, videos, voice memos, and other media
files, type in *#*#273283*255*663282*#*#*

12. If you want to change default actions for the End Call and Power button, punch in *#*#7594#*#* 
and change those settings.

13. Android also supports the Service Mode, invoked with the *#*#197328640#*#*code, that lets
you run tests related to the WiFi, Bluetooth, and GPS circuitry.
      Other factory tests include LCD - *#*#0*#*#*,
      Vibration and backlight - *#*#0842#*#*,
      Touchscreen - *#*#2664#*#*,
      RAM - *#*#3264#*#*,
      proximity sensor - *#*#0588#*#*.

14. Voice Dialer Logging Enabled - *#*#8351#*#*
15. PUK Unlock (from emergency dial screen)
**05*<PUK Code>*<enter a new pin>*<confirm the new pin>#

Courtesy: http://www.technotalkative.com/android-secret-codes/

Sunday, 24 January 2016

Java Quick Reference - Tyro

This post will briefly gives you an idea about important Java syntax on one page to get you up to speed quickly, including:

Class Implementation:

public class MyClass {                                              
public String mString; 
private int mInt; 
// More member variables 
// Constructor for Class 
public MyClass() {
 mString = Foo; mInt = 10; }
 // More meth
 }                                                               
}

Declaring Variables:
double doubleVar = 1.0 
doubleVar = 2.0f
int intVar = 1; 
String stringVar = “Hey”; 
Boolean truth = true;

Sample Values:
int: 1, 2, 500, 10000 
double: 1.5, 3.14, 578.234 
boolean: true, false 
String: “Kermit”, “Gonzo”, “Ms. Piggy”                              
ClassName: Activity, TextView, etc

Sunday, 17 January 2016

IoT Internet of Things

The “Internet of things” (IoT) is becoming an increasingly growing topic of conversation both in the workplace and outside of it. It’s a concept that not only has the potential to impact how we live but also how we work. But what exactly is the “Internet of things” and what impact is it going to have on you, if any? There are a lot of complexities around the “Internet of things” but I want to stick to the basics. Lots of technical and policy-related conversations are being had but many people are still just trying to grasp the foundation of what the heck these conversations are about.
Let’s start with understanding a few things.

Broadband Internet is become more widely available, the cost of connecting is decreasing, more devices are being created with Wi-Fi capabilities and sensors built into them, technology costs are going down, and smartphone penetration is sky-rocketing.  All of these things are creating a “perfect storm” for the IoT. 

So What Is The Internet Of Things?

Simply put, this is the concept of basically connecting any device with an on and off switch to the Internet (and/or to each other). This includes everything from cellphones, coffee makers, washing machines, headphones, lamps, wearable devices and almost anything else you can think of.  This also applies to components of machines, for example a jet engine of an airplane or the drill of an oil rig. As I mentioned, if it has an on and off switch then chances are it can be a part of the IoT.  The analyst firm Gartner says that by 2020 there will be over 26 billion connected devices… That’s a lot of connections (some even estimate this number to be much higher, over 100 billion).  The IoT is a giant network of connected “things” (which also includes people).  The relationship will be between people-people, people-things, and things-things.

How Does This Impact You?

The new rule for the future is going to be, “Anything that can be connected, will be connected.” But why on earth would you want so many connected devices talking to each other? There are many examples for what this might look like or what the potential value might be. Say for example you are on your way to a meeting; your car could have access to your calendar and already know the best route to take. If the traffic is heavy your car might send a text to the other party notifying them that you will be late. What if your alarm clock wakes up you at 6 a.m. and then notifies your coffee maker to start brewing coffee for you? What if your office equipment knew when it was running low on supplies and automatically re-ordered more?  What if the wearable device you used in the workplace could tell you when and where you were most active and productive and shared that information with other devices that you used while working?

On a broader scale, the IoT can be applied to things like transportation networks: “smart cities” which can help us reduce waste and improve efficiency for things such as energy use; this helping us understand and improve how we work and live. Take a look at the visual below to see what something like that can look like.


The reality is that the IoT allows for virtually endless opportunities and connections to take place, many of which we can’t even think of or fully understand the impact of today. It’s not hard to see how and why the IoT is such a hot topic today; it certainly opens the door to a lot of opportunities but also to many challenges. Security is a big issue that is oftentimes brought up. With billions of devices being connected together, what can people do to make sure that their information stays secure? Will someone be able to hack into your toaster and thereby get access to your entire network? The IoT also opens up companies all over the world to more security threats. Then we have the issue of privacy and data sharing. This is a hot-button topic even today, so one can only imagine how the conversation and concerns will escalate when we are talking about many billions of devices being connected. Another issue that many companies specifically are going to be faced with is around the massive amounts of data that all of these devices are going to produce. Companies need to figure out a way to store, track, analyze and make sense of the vast amounts of data that will be generated.

So what now?

Conversations about the IoT are (and have been for several years) taking place all over the world as we seek to understand how this will impact our lives. We are also trying to understand what the many opportunities and challenges are going to be as more and more devices start to join the IoT. For now the best thing that we can do is educate ourselves about what the IoT is and the potential impacts that can be seen on how we work and live.

Wednesday, 28 October 2015

Applying User-defined Font Type in Android



                                                 
                                                      (Before Applying the Font type)

This post helps the Tyro’s who are trying to apply their user-defined font type or face to their android views i.e. (TextView, Button, EditText etc…) in android there are only four basic predefined fonts type are available to design but in order to design our rich UI we are suppose to go with our own font face (.ttf) so first we need to copy our font type file (.ttf) in to our assets folder showed in Package Explorer and use the code highlighted in the GodTest.java file

   
                                           
                                                  (After Applying the Font Face)