There is no way to detect when a user selects files from an Input Type File form element in Angular JS. So we will have to do it the old fashion way.

Rather than binding, we can directly make use of the input element’s onchange event.

And in our Javascript file where your controller is located, add this function:

That’s it!

The best and easiest way to have your app determine if the device is a smartphone or a tablet is to place a boolean value in a specific value file such as res/values-xlarge.

Then, in the folder res/values, you can add the same XML code but with a false value.

In your Android code, you can get the value with this code:

Related Posts Plugin for WordPress, Blogger...