background preloader

Android

Facebook Twitter

Can Android do peer-to-peer ad-hoc networking. Android - Anteile der Versionen 2011. Android chart.png - Wikipedia, the free encyclopedia. Multithreading For Performance. [This post is by Gilles Debunne, an engineer in the Android group who loves to get multitasked. — Tim Bray] A good practice in creating responsive applications is to make sure your main UI thread does the minimum amount of work.

Multithreading For Performance

Any potentially long task that may hang your application should be handled in a different thread. Typical examples of such tasks are network operations, which involve unpredictable delays. File. Class Overview An "abstract" representation of a file system entity identified by a pathname.

File

The pathname may be absolute (relative to the root directory of the file system) or relative to the current directory in which the program is running. The actual file referenced by a File may or may not exist. It may also, despite the name File, be a directory or other non-regular file. This class provides limited functionality for getting/setting file permissions, file type, and last modified time. On Android strings are converted to UTF-8 byte sequences when sending filenames to the operating system, and byte sequences returned by the operating system (from the various list methods) are converted to strings by decoding them as UTF-8 byte sequences.

Summary Fields public static final String pathSeparator The system-dependent string used to separate components in search paths (":"). Public static final char pathSeparatorChar This field is initialized from the system property "path.separator". Returns. FileOutputStream. Invoked when the garbage collector has detected that this instance is no longer reachable.

FileOutputStream

The default implementation does nothing, but this method can be overridden to free resources. Note that objects that override finalize are significantly more expensive than objects that don't. Finalizers may be run a long time after the object is no longer reachable, depending on memory pressure, so it's a bad idea to rely on them for cleanup.

Note also that finalizers are run on a single VM-wide finalizer thread, so doing blocking work in a finalizer is a bad idea. A finalizer is usually only necessary for a class that has a native peer and needs to call a native method to destroy that peer. If you must use finalizers, consider at least providing your own ReferenceQueue and having your own thread process that queue. Unlike constructors, finalizers are not automatically chained. Uncaught exceptions thrown by finalizers are ignored and do not terminate the finalizer thread. BitmapDrawable. Class Overview A Drawable that wraps a bitmap and can be tiled, stretched, or aligned.

BitmapDrawable

You can create a BitmapDrawable from a file path, an input stream, through XML inflation, or from a Bitmap object. It can be defined in an XML file with the <bitmap> element. For more information, see the guide to Drawable Resources. Also see the Bitmap class, which handles the management and transformation of raw bitmap graphics, and should be used when drawing to a Canvas. Summary XML Attributes android:antialias Enables or disables antialiasing. Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "? This corresponds to the global attribute resource symbol antialias. android:dither Enables or disables dithering of the bitmap if the bitmap does not have the same pixel configuration as the screen (for instance: a ARGB 8888 bitmap with an RGB 565 screen). Android:filter. Drawable Resources. Connection between PHP (server) and Android (client) Using HTTP and JSON « Fahmi Rahman. The main reason for taking a scripting language like PHP is because of the interaction with databases it can offer.

Connection between PHP (server) and Android (client) Using HTTP and JSON « Fahmi Rahman

In this tutorial I will show you how to use PHP and the MySQL database to retrieve information from the server. For making connection to PHP script, we will use HTTP protocol from the android system. To implement this tutorial you should have basic knowledge of how to run PHP script and start server. If we talk about client-server architecture, client is Android device and in server side there is a combination of PHP Script and MySQL. In short, PHP Script sits in middle as shown in image.