Android/SDK

From Omnia
Jump to navigation Jump to search

Android SDK

Android Studio and SDK Tools - http://developer.android.com/sdk/

Installation

Android SDK | Android Developers - Quick Start Overview

Installing the SDK | Android Developers - Installing the SDK

  1. Java JRE and Eclipse
  2. Download and install the SDK starter package
  3. Install the ADT Plugin for Eclipse
  4. Add Android platforms and other components to your SDK

Hello World

If you are new to Android, you can use the Hello World tutorial to get started quickly.

Notes

Android Freeware: Download Free Android Software and Games:

"Android Freeware Directory - Best and Free Software for Android mobile platform"


Android Developers:

  • Home
  • SDK
  • Dev Guide
  • Reference
  • Resources
  • Videos
  • Blog


How to Connect Your Android-Based Phone to a PC - Using Android SDK - Softpedia:

"Since its market release, back in October 2008, there was much talk about the possibility to synchronize Google's Android-based smartphone with a PC. While the developer of the Android platform doesn't officially support this option, there were some statements that promised a future possible synchronization with Microsoft's Exchange.
Moreover, Cemaphore has released a unique application called MailShadowG, which allows users of the G1 to synchronize their email, contacts and calendars with a Microsoft Exchange server. Unfortunately, the application doesn't make a direct connection between the mobile device and the Exchange Server. MailShadowG provides bi-directional synchronization of email, calendars, and contacts by working through Microsoft Outlook running on a PC. "


Android SDK | Android Developers:

"Download the Android SDK"


Getting ready for Android development - Mike Plate:

"Getting ready for Android development
Here are the steps I took to get my Android development environment set up on my Windows 7 64-bit box."

Hello World

World | Android Developers:

"As a developer, you know that the first impression of a development framework is how easy it is to write "Hello, World." Well, on Android, it's pretty easy. It's particularly easy if you're using Eclipse as your IDE, because we've provided a great plugin that handles your project creation and management to greatly speed-up your development cycles.
If you're not using Eclipse, that's okay. Familiarize yourself with Developing in Other IDEs. You can then return to this tutorial and ignore anything about Eclipse.
Before you start, you should already have the very latest SDK installed, and if you're using Eclipse, you should have installed the ADT plugin as well. If you have not installed these, see Installing the Android SDK and return here when you've completed the installation."


Installing the Android SDK | Android Developers:

"This page describes how to install the latest version of the Android SDK and set up your development environment for the first time."


Installing and Updating ADT | Android Developers:

"Android offers a custom plugin for the Eclipse IDE, called Android Development Tools (ADT), that is designed to give you a powerful, integrated environment in which to build Android applications.
ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, add components based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) APKs in order to distribute your application.
In general, using Eclipse with ADT is a highly recommended approach to Android development and is the fastest way to get started. If you use Eclipse, the ADT plugin gives you an incredible boost in developing Android applications.
To install and update the ADT Plugin, you can take advantage of the Eclipse remote update feature. By setting up a remote update site, you can easily download, install, and check for ADT updates. Alternatively, you can download the latest ADT to your development computer as a local site archive. The sections below provide instructions for both methods."


System Requirements | Android Developers:

"The sections below describe the system and software requirements for developing Android applications using the Android Development Tools, revision 3. "

First

Hello Android - Your first Application :: anddev.org - Android Development Community | Android Tutorials:

"Building your very first "Hello Android" - Application"


Programming Article and Example: Android First Example: Hello World:

"Android First Example: Hello World
Android is a software stack for mobile devices that includes an operating system, middleware and key applications. More details link: http://code.google.com/intl/it/android/documentation.html
The Android SDK contains API necessary to begin developing applications on the Android platform using the Java programming language.

In this article I point out the steps for making the hello world example and running it in the emulator."


android | Android Developers:

"Contains the resource classes used by standard Android applications."


Developing In Eclipse, with ADT | Android Developers:

"The Android Development Tools (ADT) plugin for Eclipse adds powerful extensions to the Eclipse integrated development environment. It allows you to create and debug Android applications easier and faster. If you use Eclipse, the ADT plugin gives you an incredible boost in developing Android applications"


Signing Your Applications | Android Developers:

"This document provides information about signing your Android applications prior to publishing them for mobile device users"


The Developer's Guide | Android Developers:

"Welcome to the Android Dev Guide! The Dev Guide is a practical introduction to developing applications for Android. It explores the concepts behind Android, the framework for constructing an application, and the tools for developing, testing, and publishing software for the platform. "


development

Button | Android Developers:

"Button"


View | Android Developers:

"View"


ImageButton | Android Developers:

"ImageButton"


How To Create a new User Interface in Android using XML : Widgets:

"Now its time to see the widgets we have available in the Android platform. In the last part of this series of articles, we saw the "layouts", containers of this widgets."


How to launch web browser from Android application - Android Developers | Google Groups


Create an User Interface Using XML : Layouts


Fundamentals | Android Developers:

"Android applications are written in the Java programming language. The compiled Java code — along with any data and resource files required by the application — is bundled by the aapt tool into an Android package, an archive file marked by an .apk suffix. This file is the vehicle for distributing the application and installing it on mobile devices; it's the file users download to their devices. All the code in a single .apk file is considered to be one application. "


What is Android? | Android Developers:

"Android is a software stack for mobile devices that includes an operating system, middleware and key applications. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language."

Running Apps from SD Card

Android Tips and Tricks


RUN APPS from SD Card here are the commands to copy/move your stuff to sd to run apps to sd (rooted users only)

creat an EXT2 partition on your micro sd (not the entire card only a portion of it) in windows use paragon, in linux use gparted then run these commands adb devices adb remount adb shell cp -a /data/app /system/sd cp -a /data/app-private /system/sd rm -r /data/app rm -r /data/app-private ln -s /system/sd/app /data/app ln -s /system/sd/app-private /data/app-private

Reboot and you have apps to sd.....


Additional More Thorough Details ...

Original post: http://www.androidin.net/thread-1099-1-1.html AS usual, this is for those WITH ROOT ONLY

Preparation: 1. Installed JF RC30 V1.2 (only if you are using JF RC30 1.2 , this is not compatible with RC8) 2. Make a NANDROID backup (you may get everything back to normal if the phone screw up) 3. A MICRO-SD card with 2 partitions divided : (1) a fat-32 partition, (2) a ext2, you need a linux/mac to format the sdcard with ext2 partition

  • the fat 32 will be mounted as sdcard and the ext2 will be mounted as /sd for application data, make your own decision for the size*

4. insert the sdcard with 2 partition on the phone 5. set the phone to aeroplane mode for safe


Procedure: 1. adb pull /system/etc/mountd.conf /*somewhere you may want to back it up* 2. rm -f /system/etc/mountd.conf 3. using the modified mountd.conf, adb push /*the path of modified mount.conf */mount.conf /system/etc/mountd.conf 4. adb pull /system/init.rc /*somewhere you may want to back it up* 5. rm -f /system/init.rc 6. using the modified init.rc, adb push /*the path of modified init.rc*/init.rc /system/init.rc 7. reboot 8. busybox cp -a /data/app /sd/ 9. rm -r /data/app 10. ln -s /sd/app /data/app 11. reboot

Now, the phone will install and run everyone on /sd, still mounting /sdcard as usual. It is possible that to mount or unmount /sdcard by usb without everything screwed up. Beware that your sdcard will be used as part of system, removing the sdcard may freeze the phone. If the phone get freeze because of removing the sdcard, plug the sdcard again and soft reset. It is also possible that copy the application data to another card. If you want to change the sdcard, switch the phone off, mounting the sdcard to computer directory, copy the /sd partition to another sdcard with ext2 partition

Back to normal: 1. rm -f /system/etc/mountd.conf 2. adb push /*the backup of mountd.conf* /system/etc/mountd.conf 3. rm -f /system/init.rc 4. adb push /*the backup of init.rc* /system/init.rc 5. busybox cp -a /sd/ /data/app 6. rm -r /sd/

Change of mountd.conf: changing /dev/block/mmcblk0 to /dev/block/mmcblk0p1 change of init.rc: adding insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko mknod /dev/mmcblk0p2 b 179 2 1000 mount ext2 /dev/mmcblk0p2 /sd noatime nodiratime


Even More Detail on running apps from SD Card (by default)

The Android 2.2 Froyo feature that most people have been looking forward to is likely official support for installing apps to the SD card. It’s something that many feel should have been included from the start, and I guess we’ve all gotten the dreaded “phone storage is getting low” notification on our Android devices at one point or the other. I personally ran out of internal storage just one day after I bought my HTC Desire (impressed or appalled?). There are certain tricks to regain a couple of MB here and there, like clearing the cache that some applications use, but for those with a taste for apps and games, the phone storage limitation has been quite a nuisance. Android users with root access have been able to enjoy the Apps2SD utility, but getting it to work is a comparatively complicated process. Frozen yogurt to the rescue! To install an app to the SD card on Android Froyo, the application itself needs to support it. In my experience though, most current apps can be moved to the external storage. However, the Froyo system installs all new applications on your device’s internal memory by default, except for those that explicitly request external installation. Luckily, it’s possible to make your Android 2.2 phone put apps on the SD card by default instead. Here’s how:

   First you have to enable USB debugging on your Android device from Settings > Applications > Development > USB debugging.
   Now you need to download and install the Android SDK on your computer fromhttp://developer.android.com/sdk/. Once you’ve downloaded and extracted the package to the folder of your choice, run SDK Setup.exe and click on Available Packages to the left. If you get an error message at this point, enable “Force https://…” in the Settings. From the list of available packages, select “Usb Driver package”, click on the Install Selected button in the bottom right corner and follow the prompts.
   Connect your phone to your computer with a USB-cable. Your OS will prompt you to install new drivers. Choose to install them from the android-sdk/usb_driver folder. Do not mount your device; you only need to plug-in the cable.
   Next, run a command prompt and navigate to the Android-SDK\tools folder. In Windows, this is done by selecting Run from the Start Menu (or by pressing Win+R) and typing cmd. You change drives in the command prompt by entering the drive letter followed by a colon (:), and change folders with theCD command. For example, to enter the Android-SDK folder, simply type cd android-sdk.
   In the Android-SDK\tools folder, type in adb devices and you should get a serial number starting with “H” in return. All you have to do next is entering adb shell pm setInstallLocation 2. Voilà, you’re done! Android will now install apps to the SD card by default.
   To switch back to storing software on the internal memory, enter adb shell pm setInstallLocation 0.

I should point out that it’s preferable to install certain apps to the main memory, since it will take a while before the SD card becomes available when you start your phone. Applications installed on the memory card will also be unavailable to the system each time you mount your phone as a disk drive. The internal storage is probably quicker as well, even though Google claims that “there is no effect on the application performance so long as the external storage is mounted on the device.” In general, apps that integrate with the Android OS and that often run in the background is better to install on the internal storage, while games and most other applications will have no problem chilling outside on your SD. Update: Homescreen widgets should be installed to the internal storage as well. I noticed that LauncherPro, for example, won’t recognize widgets stored on the SD card when you start your phone, because when the app is launched, the memory card is still unavailable.


keywords