https://youtu.be/rskjvc6NcMA
Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts
Thursday, December 31, 2015
Android Studio IDE, Software Updates, AS05 - Kapil Sharma
Labels:
Android,
Android framework,
Android Studio,
AVD,
CBT,
Emulator,
Google,
India,
Package,
Permission,
Play,
Services,
setup,
Tutorial,
USA,
XML
Location:
Panchkula, Haryana, India
Friday, October 09, 2015
Google Location Services API - Kapil Sharma
Google Location Services API:
Author(Danny) - http://goo.gl/d55bpz
Package “android.location”
The package “android.location”
has been available since Android was first introduced, and it gives us
access to location services. These services allow applications to obtain
periodic updates of the device’s geographical location.
The package provides two means of acquiring location data:
-
LocationManager.GPS_PROVIDER: Determines location using
satellites. Depending on the conditions, this provider may take a while
to return a location fix.
-
LocationManager.NETWORK_PROVIDER: Determines location based on
availability of nearby cell towers and WiFi access points. This is
faster than GPS_PROVIDER.
When you are looking for user location you have to play with these
providers and their availability. Ideally you obtain the first location
using NETWORK_PROVIDER, which might not be as accurate, but is much
faster. You might then make an attempt to increase accuracy by listening
for a better location fix using the GPS_PROVIDER.
Google Location Services API
Google Location Services API, also known as FusedLocationProviderApi,
is Google’s recommended way of getting a user’s location. It provides
the best accuracy based on our needs. Some of the advantages of using
this API over the previous one are:
-
Simplicity: Unlike the previous API, you no longer have to deal
with multiple providers. Instead, you specify high-level needs, such as
“high accuracy” or “low power”, and it will take a suitable approach.
-
Availability: Gives your app immediate access to the best, most
recent known location. Usually this information is readily available,
you just have to ask for it.
-
Power-efficiency: Minimizes your application’s usage of power.
-
Versatility: Meets a wide range of needs, from foreground uses -
needing highly accurate location data, to background uses - requiring
only periodic location updates with negligible power impact.
Requesting Permission, Configuring AndroidManifest.xml
Androids have specific security features that would prevent any arbitrary application from requesting a precise user location. To solve this, we need to edit “AndroidManifest.xml” and add the permission we require for this application:
While we are at it, we should also define the version of Google Play Services we are using for this application:<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />Checking for Google Play Services Availability:
Before accessing features provided by Google Play Services, we must check if the device has Google Play Services installed, and that the version is the one we intend to use (6.5.87).
This method will check for Google Play Services, and in case the device doesn’t have it installed (it’s rare, but I’ve seen such cases), it will open a dialog with the corresponding error and invite the user to install/update Google Play Services from the Google Play Store.private boolean checkGooglePlayServices(){ int checkGooglePlayServices = GooglePlayServicesUtil .isGooglePlayServicesAvailable(mContext); if (checkGooglePlayServices != ConnectionResult.SUCCESS) { /* * Google Play Services is missing or update is required * return code could be * SUCCESS, * SERVICE_MISSING, SERVICE_VERSION_UPDATE_REQUIRED, * SERVICE_DISABLED, SERVICE_INVALID. */ GooglePlayServicesUtil.getErrorDialog(checkGooglePlayServices, mContext, REQUEST_CODE_RECOVER_PLAY_SERVICES).show(); return false; } return true; }
Accessing Google APIs
To access Google APIs, we just need to perform one more step: create an instance of GoogleApiClient. The Google API Client provides a common entry point to all the Google Play services, and manages the network connection between the user’s device and each Google service.
Github Source: https://github.com/dtrejogo/google-location-services-api
Labels:
Android,
API,
Danny Trejo,
Github,
Google,
GPS,
Location,
Network,
Package,
Permission,
Play,
Services,
XML
Location:
Panchkula, Haryana, India
Wednesday, August 19, 2015
Android Studio IDE, Android Virtual Device Setup (AVD), AS04 - Kapil Sharma
Labels:
Android,
Android framework,
Android Studio,
AVD,
CBT,
Emulator,
setup,
Tutorial
Location:
Panchkula, Haryana, India
Tuesday, August 18, 2015
Android Marshmallow - Kapil Sharma
New: API 23
- Android Platform Change:
- Final Permissions User Interface — we updated the permissions user interface and enhanced some of the permissions behavior.
- API Change:
- Updates to the Fingerprint API — which enables better error reporting, better fingerprint enrollment experience, plus enumeration support for greater reliability.
http://android-developers.blogspot.in/2015/08/m-developer-preview-3-final-sdk.html
Developer Preview 3:
Build: MPA44G
Hardware support: Nexus 5, 6, 9, Player
Emulator support: x86 & ARM 32/64-bit
Google Play services: 7.8
Key Changes: Permission changes
Install an Image to a Device:
In order to use a device image for testing, you must install it on a compatible device. Follow the instructions below to install a system image:
- Download and uncompress one of the system image packages listed here.
- Backup any data you want to preserve from the device.
- Follow the instructions at developers.google.com/android to flash the image onto your device.
Set Up the Preview SDK: http://developer.android.com/preview/setup-sdk.html
Android M Preview 3 Developer Docs:
Labels:
2015,
6.0,
Android,
Android Marshmallow,
API 23,
Build,
Developer Preview,
Google,
Google I/O,
New,
OS,
SDK,
Smartphone
Location:
Panchkula, Haryana, India
Monday, August 10, 2015
Friday, May 29, 2015
Wednesday, November 12, 2014
Android CBT (Class 001) - Kapil Sharma
Android Prerequisite:
1.) Android SDK (Latest)2.) ADT (Android Debugging Tool)
3.) Eclipse IDE or Android Studio
4.) JDK, JRE (Latest)
Links for downloading of the following:
Android SDK: http://developer.android.com/sdk/index.html
ADT: http://developer.android.com/sdk/installing/index.html?pkg=adt
Android studio: https://developer.android.com/sdk/installing/studio.html
Eclipse IDE: https://www.eclipse.org/downloads/
JDK/JRE: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Note: In case of any issues, please add your comments, will update it with the right solution ASAP.
Thursday, October 30, 2014
Android ADB Windows Setup CBT - Kapil Sharma
Location:
Panchkula, Haryana, India
Android ADB Windows Setup - Kapil Sharma
Android ADB Windows Setup:
Prerequisite:
1.) Android-SDK
2.) Windows-7 PC
First download the 'Android-sdk' from this location: https://developer.android.com/sdk/index.html
Extract the zip file on your windows PC drive. Than open the zip file and open the following:
SDK > Platform-tools. (Copy the path where the content is stored)
Now, right click on the 'My Computer' click on 'properties' > again click on 'Advance system setting'.
This will open 'system properties' setting windows. Now click on the 'path' than 'edit' and copy paste the android sdk > platform-tools path in that location.
After adding the location click 'OK' and now open the windows cmd terminal. Now type 'adb devices' and your android adb is start working :)
To learn more regarding Android ADB check this out: https://developer.android.com/tools/help/adb.html
For more information check this image:
Monday, September 15, 2014
Android One - Kapil Sharma
Android One:
A 100$ android smartphone. Where latest android version is 4.4 Kit-kat.
At present threee devices launched in India.
1.) Karbonn Sparkle V
2.) SPICE Dream UNO
3.) Canvasa1
Hardware Specs:
- 4.5” FWVGA display
- Cortex A7 1.3 GHz Quad-Core processor
- 1GB RAM
- 4GB storage (expandable up to 32GB)
- 2x micro SIM
- Front and rear facing cameras (2MP and 5MP)
- Rechargeable lithium-ion, 1700mAh
- Android™ 4.4, KitKat® (and gets the new version soon after it’s released)
Labels:
Android,
AndroidOne,
GB,
Karbonn,
Kit-kat,
Launch,
Micromax,
MP,
New,
One,
RAM,
Recharge,
SIM,
Smart phone,
Spice,
version
Location:
Panchkula, Haryana, India
Friday, June 27, 2014
Android L Release: Developer Preview Build Installation - Kapil Sharma
Steps for installation of Android L on Nexus 5 and Nexus 7 series devices:
Step 1: First download the relevant Android L OS file from Google site. (http://developer.android.com/preview/setup-sdk.html)
Step 2: Than open developer options on your Nexus device. These options are hidden.
So go to Settings > About device and then tap on the build number 7 times.
Once you have done that, you will find developer options in your Settings menu.
Step 3: Open developer options and make sure USB Debugging is ticked.
Step 4: Check if your computer has the relevant drivers required for Nexus devices.
If not, download the drivers from here and install.
(http://developer.android.com/sdk/win-usb.html)
Step 5: Make sure you have ADB and Fastboot Installed. For this, follow the steps from here (http://forum.xda-developers.com/showthread.php?t=2317790)
Step 6: Connect your device to computer and open ADB (it will open in a command window). Type adb reboot bootloader. Your phone will go into recovery mode.
Check the screen and see that for Bootloader status it shows unlocked.
Step 7: Most likely your device will have the locked bootloader.
To unlock it, type fastboot oem unlock. Then follow instructions on your phone screen.
This will unlock bootloader as well as do a factory reset of the device.
Step 8: Disconnect and reconnect your device to PC.
You may have to go into settings again, reveal developer options and select USB debugging.
Step 9: Unzip the Android L file you had downloaded. Create a new folder with an easy to type name like Android and put all the files in it. Then put this folder into Minimal ADB and Fastboot Folder which is in your computer's program folder.
Step 10: Hold SHIFT key and right click on the Minimal ADB and Fastboot folder.
From the menu, select "Open Command Window here".
Step 11: With your device connected, type adb reboot bootloader.
Step 12: Navigate (use CD to change directories) to the folder where Android L files are stored.
Step 13: Type flash-all in the command window.
Step 14: If you have done everything right, Android L will be installed on your device.
It will take up to max 15 minutes though.
Warning: This is an developer preview build this may contain bugs and leads to device crashes.
Friday, May 17, 2013
My Android Reboot Class: 101
Class: 101
First class and hands on details, how I try to make my first real application.
What I learn, I will share, each bits and bytes with you all, so that a collective learning can be attained in this first session or in upcoming future sessions.
This lesson is for the first timers, so if you are advance Android experts you can further skip this lesson or future lessons.
So, this how I started my first Android learning curve....................
Prerequisite for this session:
1.) Windows(XP/7/8) Or Ubuntu (10-12.04 LTS) machines.
2.) Eclipse IDE
(http://www.eclipse.org/downloads/packages/eclipse-classic-422/junosr2)
3.) Android SDK (http://developer.android.com/sdk/index.html#download)
4.) ADT-Plugin for Eclipse to integrate Android feature in IDE.
(http://developer.android.com/tools/sdk/eclipse-adt.html)
5.) Latest SDK tools and platforms using Android SDK.
Note:
Don't worry, if you don't know, how to install and configure the above prerequisite. I will share each details with you in upcoming classes :)
Thursday, March 28, 2013
Nexus 5 (Rumored):
Nexus 5:
Hardware specs:
Screen: 5-inch 1080p display.
Processor: Snapdragon 600 CPU processor.
Battery: 3,140mAh.
RAM: 2.5 or 3GB.
Camera: 9MP (CCD Nikon)
OR
Screen: 5.2-inch IPS display.
Battery: 2,900mAh.
RAM: 3GB.
Processor: Qualcomm Snapdragon 800 at 2.1GHz.
Camera: 16MP.
Friday, January 04, 2013
Android UI Option in Android manifest-XML on Eclipse:
Android UI Option in Android manifest-XML on Eclipse:
User can now select multiple UI designs for there applications.
Source: http://developer.android.com/design/get-started/ui-overview.html
Shop Amazon - Bestselling Software
Monday, December 10, 2012
Monday, August 13, 2012
ADT setup on Eclipse IDE on Ubuntu
Custom plugin for the Eclipse IDE, called Android Development Tools (ADT).
If you need to install Eclipse, you can download it from http://www.eclipse.org/downloads/.
Android recommend the "Eclipse Classic" version.
Download the ADT Plugin
Start Eclipse, then select Help > Install New Software....Click Add, in the top-right corner.
In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the
Location: https://dl-ssl.google.com/android/eclipse/ >> (Click OK)
Note: If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).In the Available Software dialog, select the checkbox next to Developer Tools and click Next. In the next window, you'll see a list of the tools to be downloaded. Click Next.
Read and accept the license agreements, then click Finish.
Note: If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.When the installation completes, restart Eclipse.
Configure the ADT Plugin
After you've installed ADT and restarted Eclipse, you must specify the location of your Android SDK directory:
Select Window > Preferences... to open the Preferences panel (on Mac OS X, select Eclipse > Preferences). Select Android from the left panel.
You may see a dialog asking whether you want to send usage statistics to Google. If so, make your choice and click Proceed. For the SDK Location in the main panel, click Browse... and locate your downloaded Android SDK directory (such as android-sdk-windows). Click Apply, then OK.
If you haven't encountered any errors, you're done setting up ADT and can continue to the next step of the SDK installation.
Source: http://developer.android.com/guide/faq/troubleshooting.html#installeclipsecomponents
Android on Linux (Ubuntu)
First download this package a .tgz. Unpack it to a safe location on your Ubuntu machine.
Package Name: Linux (i386) >> android-sdk_r20.0.1-linux.tgz
By default, the SDK files are unpacked into a directory named android-sdk-linux_x86.
Make a note of the name and location of the SDK directory on your system—you will need to refer to the SDK directory later, when setting up the ADT plugin and when using the SDK tools from the command line.
Troubleshooting Ubuntu• If you need help installing and configuring Java on your development machine, you might find these resources helpful:o https://help.ubuntu.com/community/Javao https://help.ubuntu.com/community/JavaInstallation
- Here are the steps to install Java and Eclipse, prior to installing the Android SDK and ADT Plugin.
1. If you are running a 64-bit distribution on your development machine, you need to install the
ia32-libs package using apt-get::apt-get install ia32-libs
2. Next, install Java: apt-get install sun-java6-jdk
3. The Ubuntu package manager does not currently offer an Eclipse 3.6 version for download,
so we recommend that you download Eclipse from eclipse.org (http://www.eclipse.org/
downloads/). A Java or RCP version of Eclipse is recommended.
4. Follow the steps given in previous sections to install the SDK and the ADT plugin.
• The Android SDK separates tools, platforms, and other components into packages you can download using the Android SDK Manager. The original SDK package you've downloaded includes only the SDK Tools. To develop an Android app, you also need to download at least one Android platform and the latest SDK Platform-tools. You can update and install SDK packages at any time using the Android SDK Manager. If you've used the Windows installer to install the SDK tools, you should already have the Android SDK Manager open. Otherwise, you can launch the Android SDK Manager in one of the following way.
- On Mac or Linux, open a terminal and navigate to the tools/ directory in the Android SDK, then execute android sdk.
When you open the Android SDK Manager, it automatically selects a set of recommended packages. Simply click Install to install the recommended packages. The Android SDK Manager installs the selected packages into your Android SDK environment.
The following sections describe some of the available SDK packages and more about which ones we recommend you install.Once you have installed your packages, continue to the next page.
Figure Alpha. The Android SDK Manager shows the SDK packages that are available, already installed, or for which an update is available.
Source: http://developer.android.com/sdk/installing/index.html
Tuesday, July 31, 2012
Subscribe to:
Posts (Atom)










