Post Top Ad

June 20, 2014

Temporarily disable Eclipse plugin

For my friends project i wanted to restart eclipse plugin disabled so that it is possible to understand whether plugins cause the problems in the code. So i hare post that tip and hope someone would save there time finding bugs with plugins.

Some plugins allow controlling their load-on-startup behavior. These will be listed in the preferences, under General → Startup and Shutdown. If the plugin provides view, you will need to close those views (in all perspectives) for this to work.

You can simply uptick and select only the necessary plugins to be loaded.

June 16, 2014

Install Google Play on Genymotion 2.0

So the new Genymotion 2.0 no longer comes with Google API’s and for me that just a buzz kill and I admit I have enjoyed the luxuries of having the Play Store in my virtual devices. So I have a solution for you!

In Genymotion create a new device. In my test case I created a
Nexus One – 4.3 – API 18 480×800
Download  Google Apps zip file. For my virtual device I used the latest Universal package ( 20130813)
Start the virtual device and once it is up and running drag and drop the zip file onto the device.



Next you will get a file flashable dialog click ok.


You will continue to see the File Transfer dialog let it run. You will (may) get errors that pop up just ignore them for now. When you get a file flashed successful dialog, click ok.


Errors may be something related to a Google App like Search or Play. Click Ok.

Restart the virtual device. You may still be getting error dialogs like the one below. just click ok and carry on.




 If the Add Google Account Screen does not come up right away go to the apps and open up Play Store this should trigger the Add a Google Account screen.  go ahead and select the option appropriate for you and sign in or create an account. During the process you still may get errors like before just ignore it and click OK.



You will be prompted to agree with license agreement and so forth. Continue on.
Next you should see the Play Store open.
First thing I recommend doing is updating Google apps:
Menu button>My apps>update all



From this point on you should be good to go.
I went through this process a number of times and sometimes the apps did not show up in “My apps” section however if I searched for the app it would allow me to update.

If you are working with a different API this may work or you can try one of the other versions of Google Apps.   I hope this has been helpful.











June 16, 2014

How to get the real URL Target of a Short URL or Tiny URL?



Important Reasons to use a Unshort Tool

To use a Unshort Tool, UnShortener or DeShortener is always a good idea. Don't forget all the Pishing and Malware out there. The tools help you to find out the real target of any link and helps you not to end up on a Trojan site or any site which tries to install software you don't need and want.

Make a short URL long again

Find out the real URL of a Short Tiny URL

If you use Twitter, Facebook, Google or any other popular website, you find Short Url's everywhere. There are different names for this kind of links:
Short URL, Small URL, Tiny URL, but it's all the same.
If you see a link like this url.xy/123 you can't see the web site target, either you click on it, or you try to unshort such a short url. If you use a tool like real-url.org or unshort.me , it's easy and simple. The unshort tools find out the target address of a short link.

NOTE: You will only see the Final Target! What does this mean?
The used example is perfect to explain it.

(The links didn't work, this is only for example!)

(1) url.xy/123 links to ->
(2) url2.xy
this links to ->
(3) url3.xy

As you can see shows a unshort tool as target address (3), even if the first target was (2) and not (3).
Today internet marketers use tracking tools from different companies with long cryptical url's. The good news is that you can use a unshort tool also to find out the real target of such links.

During testing i noticed, that not all free URL Unshortener work correct.
Best results i got with the tools you find listed here.

Best Free Unshort URL Tools - Unshort any URL

real-url.org
unshort.me .....my recommendation
unshorten.com
May 29, 2014

Android 3rd Tutorial: Layout Options FILL_PARENT, MATCH_PARENT , WRAP_CONTENT


• FILL_PARENT (renamed MATCH_PARENT in API Level 8 and higher), which means that the View wants to be as big as its parent (minus padding)
•WRAP_CONTENT, which means that the View wants to be just big enough to enclose its content (plus padding)
Either attribute can be applied to View's (visual control) horizontal or vertical size. It's used to set a View or Layouts size based on either it's contents or the size of it's parent layout rather than explicitly specifying a dimension.

fill_parent
(deprecated and renamed MATCH_PARENT in API Level 8 and higher)
Setting the layout of a widget to fill parent will force it to expand to take up as much space as is available within the layout element it's been placed in. It's roughly equivalent of setting the dock style of a Windows Form Control to Fill.
Setting a top level layout or control to fill parent will force it to take up the whole screen.

wrap_content
Setting a View's size to wrap content will force it to expand only far enough to contain the values (or child controls) it contains. For controls -- like text boxes (TextView) or images (ImageView) -- this will wrap the text or image being shown. For layout elements it will resize the layout to fit the controls / layouts added as its children.
It's roughly the equivalent of setting a Windows Form Control's Auto size property to True.

Online Documentation
There's some details in the Android code documentation here


May 29, 2014

Styling Android: Online Tools

As mobile developers Styling Android Application is the biggest pain. But thanks to this Online tool
you can reduce your hard times.

Try it,


Android Asset Studio

Icon generators — Make icons for your app

Icon generators allow you to quickly and easily generate icons from existing source images, clipart, or text.
May 29, 2014

What is an HttpHandler in ASP.NET

Once I got a interview question about ASP.NET HttpHandlers. By that time i didnt know what it refers to. Finally when i finished searching on it it narrowed down to what i already know.  So today ill share about HttpHandler in ASP.NET.

In the simplest terms, an ASP.NET HttpHandler is a class that implements the System.Web.IHttpHandler interface.

ASP.NET HTTP Handlers are responsible for intercepting requests made to your ASP.NET web application server. They run as processes in response to a request made to the ASP.NET Site. The most common handler is an ASP.NET page handler that processes .aspx files. When users request an .aspx file, the request is processed by the page through the page handler.

ASP.NET offers a few default HTTP handlers:

    Page Handler (.aspx): handles Web pages
    User Control Handler (.ascx): handles Web user control pages
    Web Service Handler (.asmx): handles Web service pages
    Trace Handler (trace.axd): handles trace functionality

You can create your own custom HTTP handlers that render custom output to the browser. Typical scenarios for HTTP Handlers in ASP.NET are for example
  
delivery of dynamically created images (charts for example) or resized pictures.
RSS feeds which emit RSS-formated XML

You implement the IHttpHandler interface to create a synchronous handler and the IHttpAsyncHandler interface to create an asynchronous handler. The interfaces require you to implement the ProcessRequest method and the IsReusable property.
The ProcessRequest method handles the actual processing for requests made, while the Boolean IsReusable property specifies whether your handler can be pooled for reuse (to increase performance) or whether a new handler is required for each request.
May 24, 2014

Android : Difference between px, dp, dip and sp

Most of the newbie's are bit complicated about how to handle images and font sizes in android, because
there are several terms relating to them. Today i hoped to discuss some of them. Here, i'll share most of the important information which i found referring developers site and others.    

  • px is one pixel.
  • sp is scale-independent pixels.
  • dip is Density-independent pixels.
You would use
  • sp for font sizes
  • dip for everything else.
dip==dp
px
Pixels - corresponds to actual pixels on the screen.

in
Inches - based on the physical size of the screen.

mm
Millimeters - based on the physical size of the screen.

pt
Points - 1/72 of an inch based on the physical size of the screen.

dp
Density-independent Pixels - an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of dp-to-pixel will change with the screen density, but not necessarily in direct proportion. Note: The compiler accepts both "dip" and "dp", though "dp" is more consistent with "sp".

sp
Scale-independent Pixels - this is like the dp unit, but it is also scaled by the user's font size preference. It is recommend you use this unit when specifying font sizes, so they will be adjusted for both the screen density and user's preference.


More Description.

Screen size : Actual physical size, measured as the screen's diagonal. For simplicity, Android groups all actual screen sizes into four generalized sizes: small, normal, large, and extra large.

Screen density : The quantity of pixels within a physical area of the screen; usually referred to as dpi (dots per inch). For example, a "low" density screen has fewer pixels within a given physical area, compared to a "normal" or "high" density screen. For simplicity, Android groups all actual screen densities into four generalized densities: low, medium, high, and extra high.

Orientation : The orientation of the screen from the user's point of view. This is either landscape or portrait, meaning that the screen's aspect ratio is either wide or tall, respectively. Be aware that not only do different devices operate in different orientations by default, but the orientation can change at runtime when the user rotates the device.

Resolution : The total number of physical pixels on a screen. When adding support for multiple screens, applications do not work directly with resolution; applications should be concerned only with screen size and density, as specified by the generalized size and density groups.

Density-independent pixel (dp) :A virtual pixel unit that you should use when defining UI layout, to express layout dimensions or position in a density-independent way. The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is the baseline density assumed by the system for a "medium" density screen. At runtime, the system transparently handles any scaling of the dp units, as necessary, based on the actual density of the screen in use. The conversion of dp units to screen pixels is simple: px = dp * (dpi / 160). For example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels. You should always use dp units when defining your application's UI, to ensure proper display of your UI on screens with different densities.



 

My Instagram