Showing posts with label Android-Tweeks. Show all posts
Showing posts with label Android-Tweeks. Show all posts

Monday, January 11, 2016

Picking your compileSdkVersion, minSdkVersion, and targetSdkVersion

By Admin   Posted at  12:15 PM   targetSdkVersion No comments

Picking your compileSdkVersion, minSdkVersion, and targetSdkVersion

Depending on the time of the year, it might only be a few months after you release an app that a new version of Android is announced. What does that mean for your app though — is everything going to break?
You’ll be happy to know that forward compatibility is a strong focus of Android — existing apps built against prior SDKs should not break when the user updates to a new version of Android. This is wherecompileSdkVersionminSdkVersion, and targetSdkVersion come in: they control what APIs are available, what the required API level is, and what compatiblity modes are applied, respectively.

compileSdkVersion

compileSdkVersion is your way to tell Gradle what version of the Android SDK to compile your app with. Using the new Android SDK is a requirement to use any of the new APIs added in that level.
It should be emphasized that changing your compileSdkVersion does not change runtime behavior. While new compiler warnings/errors may be present when changing your compileSdkVersion, your compileSdkVersion is not included in your APK: it is purely used at compile time. (You should really fix those warnings though — they were added for a reason!)
Therefore it is strongly recommended that you always compile with the latest SDK. You’ll get all the benefits of new compilation checks on existing code, avoid newly deprecated APIs, and be ready to use new APIs.
Note that if you use the Support Library, compiling with the latest SDK is arequirement for using the latest Support Library releases. For example, to use the 23.1.1 Support Library, you must have a compileSdkVersion of at least 23 (those first numbers need to match!). In general, a new version of the Support Library is released alongside a new platform version, providing compatibility shims to newly added APIs as well as new features.

minSdkVersion

If compileSdkVersion sets the newest APIs available to you, minSdkVersion is the lower bound for your app. The minSdkVersion is one of the signals the Google Play Store uses to determine which of a user’s devices an app can be installed on.
It also plays an important role during development: by default lint runs against your project, warning you when you use any APIs above your minSdkVersion, helping you avoid the runtime issue of attempting to call an API that doesn’t exist. Checking the system version at runtime is a common technique when using APIs only on newer platform versions.
Keep in mind that libraries you use, such as any of the Support Libraries orGoogle Play services, may have their own minSdkVersion — your app’s minSdkVersion must be at least as high as your dependencies’ minSdkVersion — if you have libraries that require 4, 7, and 9, your minSdkVersion must be at least 9. In rare cases where you want to continue to use a library with a higher minSdkVersion than your app (and deal with all edge cases/ensure the library is only used on newer platform versions), you can use the tools:overrideLibrary marker, but make sure to test thoroughly!
When deciding on a minSdkVersion, you should consider the stats on theDashboards, which give you a global look on all devices that visited the Google Play Store in the prior 7 days — that’s your potential audience when putting an app on Google Play. It is ultimately a business decision on whether supporting an additional 3% of devices is worth the development and testing time required to ensure the best experience.
Of course, if a new API is key to your entire app, then that makes the minSdkVersion discussion quite a bit easier. Just remember that even 0.7% of 1.4 billion devices is a lot of devices.

targetSdkVersion

The most interesting of the three, however, is targetSdkVersion.targetSdkVersion is the main way Android provides forward compatibility by not applying behavior changes unless the targetSdkVersion is updated. This allows you to use new APIs (as you did update your compileSdkVersion right?) prior to working through the behavior changes.
Much of the behavior changes that targetSdkVersion implies are documented directly in the VERSION_CODES, but all of the gory details are also listed on the each releases’ platform highlights, nicely linked in the API Levels table.
For example, the Android 6.0 changes talk through how targeting API 23 transitions your app to the runtime permissions model and the Android 4.4 behavior changes detail how targeting API 19 or higher changes how alarms set with set() and setRepeating() work.
With some of the behavior changes being very visible to users (thedeprecation of the menu button, runtime permissions, etc), updating to target the latest SDK should be a high priority for every app. That doesn’t mean you have to use every new feature introduced nor should you blindly update your targetSdkVersion without testing — please, please test before updating your targetSdkVersion! Your users will thank you.

Gradle and SDK versions

So setting the correct compileSdkVersion, minSdkVersion, and targetSdkVersion is important. As you might imagine in a world with Gradleand Android Studio, these values are integrated into the tools system through inclusion in your module’s build.gradle file (also available through the Project Structure option in Android Studio):
android {
  compileSdkVersion 23
  buildToolsVersion “23.0.1”

  defaultConfig {
    applicationId “com.example.checkyourtargetsdk"
    minSdkVersion 7
    targetSdkVersion 23
    versionCode 1
    versionName “1.0”
  }
}
The compileSdkVersion, being a compile time thing (who would have guessed!), is one of the android settings alongside with your build tools version. The other two are slightly differently in that they are declared at thebuild variant level — the defaultConfig is the base for all build variants and where’d you put default values for these, but you could imagine a more complicated system where specific versions of your app have a different minSdkVersion for example.
minSdkVersion and targetSdkVersion also differ from compileSdkVersion in that they are included in your final APK — if you were to look at the generated AndroidManifest.xml, you’d see a tag such as:
You’ll find if you manually put this in your manifest, it’ll be ignored when you build with Gradle (although other build systems might certainly rely on it being there).

Putting it all together

If you made it through the bolded notes, you’ll notice a relationship between the three values:
minSdkVersion <= targetSdkVersion <= compileSdkVersion
This intuitively makes sense — if compileSdkVersion is your ‘maximum’ and minSdkVersion is your ‘minimum’ then your maximum must be at least as high as your minimum and the target must be somewhere in between.
Ideally, the relationship would look more like this in the steady state:
minSdkVersion (lowest possible) <= 
    targetSdkVersion == compileSdkVersion (latest SDK)
You’ll hit the biggest audience with a low minSdkVersion and look and act the best by targeting and compiling with the latest SDK — a great way to #BuildBetterApps.
Author: Ian Lake

Tuesday, February 11, 2014

Developer Friendly Android Libraries

By Admin   Posted at  4:06 PM   Developer Friendly Android Libraries 4 comments

         Developer-friendly Android Libraries

Hi Guys,
Here is my list of favorite libraries, which I believe can save you some precious time while developing applications and ensure they are good-looking and user-friendly and they will provide the best smartphone application experience to end users.

Rajawali:


Rajawali is a 3D engine for Android based on OpenGL ES 2.0/3.0. It can be used for normal apps as well as live wallpapers.
This is one of my favorites. As you know I am Android Applications and Games Developer I really recommend this one. If you are thinking of developing live wallpapers or 3D games, this library might be very handy. One can easily export the 3D models from tools like Blender and render them on the devices using openGLES with this library. Adding animations like rotation, or scaling on user events is a cakewalk

Download it here: https://github.com/MasDennis/Rajawali

ActionBar Sherlock:

This one deserves to be at the top of the list. Action-bar was introduced in API-11 of the Android SDK and the support library by Google does not provide a proper backport. 

The library will automatically use the native action bar when appropriate or will automatically wrap a custom implementation around your layouts. This allows you to easily develop an application with an action bar for every version of Android from 2.x and up. It works seamlessly with newer views such as NavigationDrawer, SlidingPaneLayout, Fragments, etc.
Download it here: http://actionbarsherlock.com
How to use: http://actionbarsherlock.com/usage.html


RoboGuice 2:



RoboGuice 2 smoothes out some of the wrinkles in your Android development experience and makes things simple and fun. Do you always forget to check for null when you getIntent().getExtras()? RoboGuice 2 will help you. Think casting findViewById() to a TextView shouldn’t be necessary? RoboGuice 2 is on it.RoboGuice 2 takes the guesswork out of development. Inject your View, Resource, System Service, or any other object, and let RoboGuice 2 take care of the details.RoboGuice 2 slims down your application code. Less code means fewer opportunities for bugs. It also makes your code easier to follow -- no longer is your code littered with the mechanics of the Android platform, but now it can focus on the actual logic unique to your application.


Download it here: https://github.com/roboguice/roboguice

GSON:

Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object. Gson can work with arbitrary Java objects including pre-existing objects that you do not have source-code of.This is a powerful and lightweight JSON parser, specifically for Android. If you have a Web-service returning JSON, use jsonschema2pojo.org  (or some other similar tool) to generate the POJOs, and with a single line of code, you can parse the JSON using this library. Use GSON along with ActiveAndroid and you can reduce the development time considerably.
Gson Goals:
  1. Provide simple toJson() and fromJson() methods to convert Java objects to JSON and vice-versa
  2. Allow pre-existing unmodifiable objects to be converted to and from JSON
  3. Extensive support of Java Generics
  4. Allow custom representations for objects
  5. Support arbitrarily complex objects (with deep inheritance hierarchies and extensive use of generic types)
Download it here: http://code.google.com/p/google-gson/


ActiveAndroid:

ActiveAndroid is an active record style ORM (object relational mapper). What does that mean exactly? Well, ActiveAndroid allows you to save and retrieve SQLite database records without ever writing a single SQL statement. Each database record is wrapped neatly into a class with methods like save() and delete()This is a simple ORM solution for your applications. It is as easy as creating objects and saving them to the SQLite database. The setup of classes makes use of Java annotations. This saves a whole lot of time on configurations, and gives the developer more time to spend on the login than on the syntaxes. Once used, you will find it hard to live without it.
Download it here: https://github.com/pardom/ActiveAndroid


ViewPagerIndicator:

This is another cool library from the developer of Actionbar. It makes the viewpager more usable and enables easier navigation between fragments. Users have a clear idea of where they have navigated.
Features:

  1. New IconPageIndicator! Uses state-list images to represent pages.
  2. TabPageIndicator now supports icons via IconPagerAdapter interface.
  3. Support android:background attribute on Canvas-based views.
  4. Title indicator allows for drawing its line, underline, and/or triangle on top of the titles for placement underneath a ViewPager.
  5. Tab indicator now supports ICS-style dividers (see styled sample).
Download it here: http://viewpagerindicator.com/

Crouton:

Crouton is a class that can be used by Android developers that feel the need for an alternative to the Context insensitive Toast.
A Crouton will be displayed at the position the developer decides. Standard will be the top of an application window. You can line up multiple Croutons for display, that will be shown one after another. It is nicely implemented and highly customizable. It gives your application a notification system which is cleaner and more aesthetic than native toasts, and is rightly named croutons.
Download it here: https://github.com/keyboardsurfer/Crouton

Universal Image Loader:


Handling large bitmaps does gives nightmares to many Android developers. The Universal Image Uploader is a lightweight library which saves you the effort of handling bitmaps and provides great support for caching images. One can easily figure out how to decode the bitmaps in the app. Definitely a lifesaver of a library.
Features:
  1. Multithread image loading
  2. Possibility of wide tuning ImageLoader's configuration (thread executors, downloader, decoder, memory and disc cache, display image options, and others)
  3. Possibility of image caching in memory and/or on device's file system (or SD card)
  4. Possibility to "listen" loading process
  5. Possibility to customize every display image call with separated options
  6. Widget support
  7. Android 2.0+ support
Download it here: https://github.com/nostra13/Android-Universal-Image-Loader

AChartEngine:

This plots neat and elegant graphs in various styles. The javadocs might not be great, and it might not be all that easy to develop with only a few resources available and a large number of classes, but the output is definitely worth the effort.



Download it here: http://www.achartengine.org/

Robotium:

Robotium is an Android test automation framework that has full support for native and hybrid applications. Robotium makes it easy to write powerful and robust automatic black-box tests for Android applications. With the support of Robotium, test case developers can write function, system and acceptance test scenarios, spanning multiple Android activities. This is an automation testing framework for Android. Developers and testers can generate test cases and ensure that minor changes do not introduce new bugs. It might seem to be an overhead in the early stages of development but helps keep maintenance work easy.

Download it here: http://code.google.com/p/robotium/

ZXing:

ZXing ("zebra crossing") is an open-source, multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages.This quickly adds support for scanning bar codes in an Android application. Easy to configure and use. It has a high scanning efficiency.


Download it here: https://github.com/zxing/zxing OR http://code.google.com/p/zxing/

Tesseract:

Tesseract is probably the most accurate open source OCR engine available. Combined with the Leptonica Image Processing Library it can read a wide variety of image formats and convert them to text in over 60 languages. It was one of the top 3 engines in the 1995 UNLV Accuracy test. Between 1995 and 2006 it had little work done on it, but since then it has been improved extensively by Google.
Tesseract is a highly optimized optical character reader library available for Android. This is a cross-platform library and will require some basic knowledge of using NDK in an Android app.

Download it here: http://code.google.com/p/tesseract-ocr/
So these are my favorite developer friendly android libraries which are used in industry by many developers, I do use many of them and I listed them here by asking many of my friends who develops android apps & games that what they prefer to use.
If you think something is missing out of this list just point out I would love to include it as well.
    Hope this will help you guys a lot... Stay tuned for next article!



Monday, January 27, 2014

How to Install BackTrack on Android Mobile and Tablet

By Admin   Posted at  2:09 PM   HowTo-Android No comments
Hi Guys,

Lets see How we can Install BackTrack on Android Mobile and Tablet:



BackTrack Linux is a fine example of a specialized Linux distribution. Its only purpose is to test your network, devices, and systems for security vulnerabilities. BackTrack is packed with every security and hacker tool used by security professionals and professional hackers. I
f you're looking for all of the tools in one place, this is it. 

BackTrack is one of my favorite OS. First reason is it is made by world class hackers and second one is all hacking tools are available and last but not list one, it is flavor of Linux butI can use it only on PC. Android is booming now these days... Now you can Install Back Track Linux OS on Android smartphones and tablets. Now it is possible to install and run Backtrack on your Android devices.


Requirements:
(1) Root
(2) 1GHZ processor (recommended)
(3) 512MB Ram (recommended)
(4) Android 1.6 or higher
(5) Back Track 5 (http://goo.gl/CVVHgu)
Kernel will loop device support (this is included in most custom ROM’s)
(6) SD card with at least 3.5GB of free space
(7) Data connection on your device


Following Android Apps:

1.BUSY BOX (https://play.google.com/store/apps/details?id=stericson.busybox&feature=search_result#?t=W251bGwsMSwxLDEsInN0ZXJpY3Nvbi5idXN5Ym94Il0.) : It acts like a installer and uninstaller.it needs root permission to run.it has CPU cores and can run Linux kernels on android. click here

2. Superuser (https://play.google.com/store/apps/details?id=com.noshufou.android.su&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5ub3NodWZvdS5hbmRyb2lkLnN1Il0.) : This app just grants a superuser power to your phone just like "su " does for Linux. click here

3. Terminal Emulator (https://play.google.com/store/apps/details?id=jackpal.androidterm&feature=search_result#?t=W251bGwsMSwxLDEsImphY2twYWwuYW5kcm9pZHRlcm0iXQ..) : Terminal Emulator is app that runs a terminal console in android. click here

4. Android VNC (https://play.google.com/store/apps/details?id=android.androidVNC&feature=search_result#?t=W251bGwsMSwxLDEsImFuZHJvaWQuYW5kcm9pZFZOQyJd) : Android VNC is a tool for viewing VNC in Android.

How to Install Backtrack on Android Tablet or Phone?


Download the complete set of files you need from here: 

http://goo.gl/CVVHgu

To your phones internal SDcard in a directory called “BT5″ (cAsE sEnSiTiVe)
Launch "Terminal Emulator" from your phone and type (everything after the $: or #: is user input):
$: su
#: cd sdcard
#: cd BT5
#: sh bootbt
#: export USER=root
#: vncpasswd
(make up a password"ex: toortoor")
#: tightvncserver -geometry 1280x720

While Backtrack is loaded (when you see a red “root@localhost“) start the VNC server by typing:root@localhost:~#: startvnc (stopvnc kills it)
Open 'AndroidVNC' and fill the form like this:
Nickname : BT5
Password : toortoor
Address : 127.0.0.1
Port : 5901

Connect it and you will see Backtrack 5 interface. Voila you just did it... Enjoy..!

Remember: Some of the Backtrack tools can’t work properly and do it for your own risk. I hope you can Install Backtrack on Android tablet without any problems, tell me if you get problems.



Back to top ↑
Connect with Us

WhatsApp Share

What they says

one of the best mobile technology blog
one of the best mobile technology blog
one of the best mobile technology blog
one of the best mobile technology blog

Licencing

© 2013 Andropedia : The Android Fulcrum ™. Distributed By Blogger Themes | WP Mythemeshop Converted by Bloggertheme9
Blogger templates. Proudly Powered by Blogger.