a blog on programming, design, debugging, unlearning, re-learning, choatic day & uninhabilited nights in office ;-)
Monday, December 28, 2015
Application does not have sufficient geolocation permissions error - Cordova android hybrid app developement
I was getting this error while try to run my geolocation code in andorid device.
The reason was location access permission for the app is not enabled to app manifest.
Here's how to add the permission:
open your android manifest. xml file:
it will be in the location : platforms\android\
and the below tag:
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
Then rebuild the app and run it .
It should work. !!!
Sunday, October 18, 2015
IoT Mobile Apps development using HTML 5 and Javascript
It helps developers to build or connect with any bluetooth, BLE, Wifi , NFC devices just with little help of HTML 5 and Java script.
Evothings is a Sweden based startup and it is hyperload live mobile development feature is fantastic, it is makes developing and testing very easy. This framework comes with lot of working examples in connecting with different devices. And of-course it is open source apache 2 licensed framework.
It supports connectivity to many devices (working examples for each given)
To name few devices
Estimote beacons, Aurdino, Philips HUE light, Electric Imp, Rasberry pi,etc...
Monday, October 12, 2015
Apache cordova App - Change App icon or logo.
To change the default icon or logo of an Cordova application. we just have to replace the default icon.png from the below folder icons and re-build the cordova app and then deploy it.
For iOS:
PROJECT_PATH/platforms/ios/PROJECT_NAME/Resources/icons
For Android:
PROJECT_PATH/platforms/android/res/drawable
also you need to update the icon name change in manifest file.
PROJECT_PATH/platforms/android/AndroidManifest.xml
Time to solve algorithm /puzzles :-) - Angry Professor
Angry Professor
The professor is conducting a course on Discrete Mathematics to a class of
Given the arrival time of each student, your task is to find out if the class gets cancelled or not.
Input Format
The first line of the input contains
The first line of each test case contains two space-separated integers,
The next line contains
If the arrival time of a given student is a non-positive integer (
Output Format
For each testcase, print "YES" (without quotes) if the class gets cancelled and "NO" (without quotes) otherwise.
Constraints
Note
If a student enters the class exactly when it starts
1≤T≤10 1≤N≤1000 1≤K≤N −100≤ai≤100,where i∈[1,N]
2
4 3
-1 -3 4 2
4 2
0 -1 2 1
YES
NO