Android technology is used in mobile computing devices and is among the fastest growing mobile technologies in use. Many business and personal users manage their work and personal communications on Android devices. The Android system provides users with a range of standard applications, with many more available for download and installation. Android devices facilitate communication, Internet, social media, business, productivity and leisure activities. Many companies target the Android platform with mobile apps, providing Android users with access to commercial and other services.
Operating System
Android is a mobile platform, with versions of the Android operating system running on millions of devices across the globe. Multiple versions of the Android operating system have been released since the platform launched. Users of devices with the Android system installed can access communication functions such as mobile telephony and text messaging. Android devices are also enabled for Internet access, either through wireless networks or through the mobile network in the case of smartphones. Since Android devices provide Internet access, users can utilise Web services such as email, Web browsing and social networking.
Devices
Android runs on mobile computing devices, particularly smartphones and tablet PCs. These devices use interaction through touch screens, in conjunction with buttons and sometimes trackballs, although this varies between devices. The screen sizes on Android devices vary from small smartphones up to larger tablets. Although the tablet market is increasing, Android is run primarily on smartphones, so Android devices typically facilitate telephony functions. Since Android runs on mobile devices, many apps for the platform are designed to facilitate mobile connectivity.
Applications
Devices running the Android system ship with a variety of basic applications pre-installed. These basic applications include those for making phone calls, sending text messages and managing contacts, as well as Internet applications for emailing and browsing the Web. Android users can also install additional apps from the Google Play store. Google Play is the official marketplace for Android apps. Some of the apps are free to download and install, with others available commercially at a fixed price in the user's currency. Google Play features a wide range of applications for business, entertainment, productivity, office and other organisational tasks.
Development
Software developers can create apps for the Android marketplace, releasing them through the Google Play store so that users can purchase them. Android developers write apps in the Java programming language, with certain application resources defined using XML markup. Some apps also involve other technologies such as SQLite for database development. To create Android apps, developers download and install the Android Developer Tools and SDK (Software Development Kit). The tools are designed to work with the Eclipse IDE (Integrated Development Environment). Once an app is ready for deployment, the developer can export and publish it through the Google Play store, with various signing and versioning requirements that must be met before an app can be made available for download.
References
Android Developers: Welcome
Tutorials, tips and guides on computing/ information technology for users and developers.
Showing posts with label Android apps. Show all posts
Showing posts with label Android apps. Show all posts
Monday, 22 October 2012
Friday, 31 August 2012
About Randomness
Randomness is a concept with relevance to many different fields and areas of life, from mathematics to computing science and the arts. There are actually lots of different definitions of randomness, for its uses in these different contexts. In this article we'll go over what it means for something to be random, as well as looking at the application of randomness in computer programming and the arts.
I started thinking about randomness when I was developing my Android Nonsense apps, see also this post: Using Randomness to Stimulate Creativity
What Is It Anyway?
In one sense, something being random means it being unpredictable. In another sense, it means having no discernible order. If some sequence of events appears not to conform to any sort of order, this implies that it has not been arrived at through a dedicated method. When something happens as a result of some process in which there is a purpose, this does not normally create random results. In some cases randomness is used in an intuitive sense, while in others it has a very specific objective definition. In mathematical contexts, random sequences are often referred to in conjunction with notions of probability and predictability.
Computer Programming
Randomness is a common topic in computer programming. Often, computer programmers use language utilities known as random number generators. These allow programs to generate a series of numbers with specific parameters, for example within a certain range or with a certain number type such as integer or floating point. Programmers use these for various tasks, some relating to underlying application logic, some relating to user interaction. For example, random functions can be used to present content items to application users in a way that creates a different user experience each time.
Although random number generators are common in computer programming, the numbers produced are not actually truly random. This is because it is impossible, by definition, for a computer program to generate a random series of numbers. In order for a series to be random, there can be no process or method used to generate it, but a computer can only generate numbers using a detailed, specific process. In brief, this means that if a series is generated by a computer, it is not random.
While not truly random, the random number generators used in computer programming are designed to create the appearance of randomness to the end user. For example, if you use a music player such as an MP3 player, you will be familiar with shuffle functions. With a shuffle function, the application uses a random number generator to choose songs from those available. There is in fact another obvious way in which these functions are not really random in addition to the fact that they are computer generated. This is that fact that most shuffle functions are designed not to repeat songs, but rather to play each available song once before playing any one a second time. Again, the randomness here is in appearance rather than strictly in reality.
The Arts
Another common area to experience randomness is in the arts, particularly in comedy contexts. Many people find randomness produces results that are funny, for example through gibberish, or nonsense speak in which people combine random combinations of words. Some computer programs combine this with the random number generation functions to generate random sentences for comic effect. Some songwriters also use randomness to come up with lyrics and song titles.
Randomness is also involved in art in a creative sense. Many people find randomness is a great way to stimulate them creatively. This can involve using computer programs again, for example to generate random words or pictures. The unpredictability of randomness produces surprising results that appear to stimulate the creative functions within the human brain.
Life
We experience randomness in many areas of life, from the weather to throwing a dice or shuffling a deck of cards. In many cases you see random sequences and are not aware of it, and in many more you see sequences that appear to be random but are in fact not. Whatever way you look at it, randomness is a part of life.
See also
Random Number Generators
Using Randomness to Stimulate Creativity
I started thinking about randomness when I was developing my Android Nonsense apps, see also this post: Using Randomness to Stimulate Creativity
What Is It Anyway?
In one sense, something being random means it being unpredictable. In another sense, it means having no discernible order. If some sequence of events appears not to conform to any sort of order, this implies that it has not been arrived at through a dedicated method. When something happens as a result of some process in which there is a purpose, this does not normally create random results. In some cases randomness is used in an intuitive sense, while in others it has a very specific objective definition. In mathematical contexts, random sequences are often referred to in conjunction with notions of probability and predictability.
Computer Programming
Randomness is a common topic in computer programming. Often, computer programmers use language utilities known as random number generators. These allow programs to generate a series of numbers with specific parameters, for example within a certain range or with a certain number type such as integer or floating point. Programmers use these for various tasks, some relating to underlying application logic, some relating to user interaction. For example, random functions can be used to present content items to application users in a way that creates a different user experience each time.
Although random number generators are common in computer programming, the numbers produced are not actually truly random. This is because it is impossible, by definition, for a computer program to generate a random series of numbers. In order for a series to be random, there can be no process or method used to generate it, but a computer can only generate numbers using a detailed, specific process. In brief, this means that if a series is generated by a computer, it is not random.
While not truly random, the random number generators used in computer programming are designed to create the appearance of randomness to the end user. For example, if you use a music player such as an MP3 player, you will be familiar with shuffle functions. With a shuffle function, the application uses a random number generator to choose songs from those available. There is in fact another obvious way in which these functions are not really random in addition to the fact that they are computer generated. This is that fact that most shuffle functions are designed not to repeat songs, but rather to play each available song once before playing any one a second time. Again, the randomness here is in appearance rather than strictly in reality.
The Arts
Another common area to experience randomness is in the arts, particularly in comedy contexts. Many people find randomness produces results that are funny, for example through gibberish, or nonsense speak in which people combine random combinations of words. Some computer programs combine this with the random number generation functions to generate random sentences for comic effect. Some songwriters also use randomness to come up with lyrics and song titles.
Randomness is also involved in art in a creative sense. Many people find randomness is a great way to stimulate them creatively. This can involve using computer programs again, for example to generate random words or pictures. The unpredictability of randomness produces surprising results that appear to stimulate the creative functions within the human brain.
Life
We experience randomness in many areas of life, from the weather to throwing a dice or shuffling a deck of cards. In many cases you see random sequences and are not aware of it, and in many more you see sequences that appear to be random but are in fact not. Whatever way you look at it, randomness is a part of life.
See also
Random Number Generators
Using Randomness to Stimulate Creativity
Android Widget Development
Android developers can create widget applications that users display and interact with on their device homescreens. Android widget development is a little different to standard Android application development. In this article we will run through some of the ways in which developing widget app differs from developing ordinary apps for the Android platform. If you are hoping to attempt Android widget development, it is recommended that you try creating a standard app first, before moving onto widget apps.
Differences Between Widget Apps and Standard Apps
Many aspects of application structure remain the same between Android widget apps and other apps. One of the main ways in which widgets differ is in how they are launched. Rather than the user launching the app by selecting it in their device menu or from a shortcut icon, with a widget application the user must add it to their device homescreen display. This is normally accomplished by long-pressing the homescreen and selecting the widget from a list. Widget applications are downloaded and installed using the same procedure as for other applications. Once a widget is on the user's screen, it will typically continue to run until the user removes it.
Some widget apps update with information from the Internet or from the system itself. For example, common widgets display information about the phone itself, such as the battery level, network connectivity and phone settings. Additionally, many widget apps retrieve data over the Internet, which is then displayed within the widget user interface. Many widgets are not interactive, simply displaying information within a graphical presentation. However, some can be configured by pressing the widget icon, then choosing settings. Such apps require a more advanced level of development than the ones that are not interactive.
Application Elements
In many ways the elements of a widget app are the same as those in other apps, with a few fundamental differences. With a widget, you don't need to implement a main Activity to launch when the app starts up. Instead, you extend "AppWidgetProvider" and provide methods specifying what should happen when your widget updates. The widget will be automatically updated at a period you specify within your application metadata. This comprises an XML file in your Resources directory. You also need to specify the widget class and metadata in your application Manifest XML. Within the XML metadata for a widget, you can also dictate the dimensions and other properties of your app.
Options
These are the main options in a widget app, but there are many other possibilities. For example, if you need your app to update at a greater frequency than what is allowed when declaring it in the XML resources, which is at most every 30 minutes, you can provide a class extending the "AlarmManager" class. You can optionally also register one or more of your app classes to receive system broadcasts. These are announcements that are available system-wide, often pertaining to information about phone state. Widget layouts are also subject to some restrictions. For example, you can only use certain layout types for an Android widget, including Frame, Linear and Relative layouts. Optionally, you can create an Activity which the Android system will run when your app starts up. This is commonly used to set configuration options for widgets.
Approaching Development
Although widget apps are developed and released using the same process as normal apps, the testing process is sometimes a little more complex. There is a significant limit to the value of testing certain widgets using an Android emulator, or virtual Android device. The most reliable approach is therefore to run these apps on real devices over a period of time in order to gain a true sense of how well they function. This is particularly the case for widgets that receive system broadcasts and other announcements, as these announcements are not entirely authentic on an emulator. For example, the battery level on the emulator by default stays at 50%, which is not very helpful if you are attempting to create a battery level widget.
Devices
As with any Android app, developers need to consider the increasing range of devices running the Android platform when constructing widgets. This is especially so for design matters. Sticking to designs that are relative and will adapt gracefully across different screen sizes is doubly important for widget applications, since they basically comprise visual displays of information. Again, thorough testing is essential to result in a widget app that will function reliably and therefore be a success.
See also:
Differences Between Widget Apps and Standard Apps
Many aspects of application structure remain the same between Android widget apps and other apps. One of the main ways in which widgets differ is in how they are launched. Rather than the user launching the app by selecting it in their device menu or from a shortcut icon, with a widget application the user must add it to their device homescreen display. This is normally accomplished by long-pressing the homescreen and selecting the widget from a list. Widget applications are downloaded and installed using the same procedure as for other applications. Once a widget is on the user's screen, it will typically continue to run until the user removes it.
Some widget apps update with information from the Internet or from the system itself. For example, common widgets display information about the phone itself, such as the battery level, network connectivity and phone settings. Additionally, many widget apps retrieve data over the Internet, which is then displayed within the widget user interface. Many widgets are not interactive, simply displaying information within a graphical presentation. However, some can be configured by pressing the widget icon, then choosing settings. Such apps require a more advanced level of development than the ones that are not interactive.
Application Elements
In many ways the elements of a widget app are the same as those in other apps, with a few fundamental differences. With a widget, you don't need to implement a main Activity to launch when the app starts up. Instead, you extend "AppWidgetProvider" and provide methods specifying what should happen when your widget updates. The widget will be automatically updated at a period you specify within your application metadata. This comprises an XML file in your Resources directory. You also need to specify the widget class and metadata in your application Manifest XML. Within the XML metadata for a widget, you can also dictate the dimensions and other properties of your app.
Options
These are the main options in a widget app, but there are many other possibilities. For example, if you need your app to update at a greater frequency than what is allowed when declaring it in the XML resources, which is at most every 30 minutes, you can provide a class extending the "AlarmManager" class. You can optionally also register one or more of your app classes to receive system broadcasts. These are announcements that are available system-wide, often pertaining to information about phone state. Widget layouts are also subject to some restrictions. For example, you can only use certain layout types for an Android widget, including Frame, Linear and Relative layouts. Optionally, you can create an Activity which the Android system will run when your app starts up. This is commonly used to set configuration options for widgets.
Approaching Development
Although widget apps are developed and released using the same process as normal apps, the testing process is sometimes a little more complex. There is a significant limit to the value of testing certain widgets using an Android emulator, or virtual Android device. The most reliable approach is therefore to run these apps on real devices over a period of time in order to gain a true sense of how well they function. This is particularly the case for widgets that receive system broadcasts and other announcements, as these announcements are not entirely authentic on an emulator. For example, the battery level on the emulator by default stays at 50%, which is not very helpful if you are attempting to create a battery level widget.
Devices
As with any Android app, developers need to consider the increasing range of devices running the Android platform when constructing widgets. This is especially so for design matters. Sticking to designs that are relative and will adapt gracefully across different screen sizes is doubly important for widget applications, since they basically comprise visual displays of information. Again, thorough testing is essential to result in a widget app that will function reliably and therefore be a success.
See also:
Wednesday, 29 August 2012
What Are Android APK Files?
If you use an Android device, such as a smartphone, laptop, netbook or tablet PC with the Android operating system installed, you have probably used APK files without realising it. As a user, you will not generally need to worry about Android APK files or have any real awareness of what they are, but developers for the platform do deal with them. Essentially, an APK file, or an Android Package file, is an Android application, or "app", which has been compiled and is ready to be installed and run on your device.
APK Creation
Android application developers create APK files, generating them as part of the development process. Most Android apps are developed in the Eclipse IDE, which can have a number of official plugins for Android installed, making it possible to develop, generate and ultimately release apps in the form of APK files. Once an Android project in Eclipse has been developed, executed, tested and is ready to be released, it can be exported in the form of an APK file.
In order to be released through Google's official Play store (previously Android Market), APK files must also be signed for security purposes. When an application has been signed and released through the store, it can only be updated using newer APK files which have also been signed using the same certificate, to verify that their origin is the same.
APK File Distribution and Acquisition
In the vast majority of cases, APK files are distributed and accessed by users through Google Play. Developers open accounts with the store, upload their APK files and choose publishing details including information for potential users and pricing choices.
Users of Android devices can access Google Play through a dedicated application which is typically installed on such devices when they are purchased. Using the Play app, users can browse applications by category or by searching for particular keywords and terms. Within each application listing users can read details, previous user reviews, comments and required system permissions for using the app.
Many apps are free, but some are downloaded at a set cost. If a user decides that they do not want to keep an app installed on their phone before the trial period ends, they can cancel the purchase. Whether an app is paid or free, users can decide at any time to uninstall it, again within the Play app.
APK File Installation and Use
When a user decides to download and install an app, Google Play and the Android system carry out the installation process. The APK file is initially downloaded onto the device, and the system then extracts the required information from this to install and execute the application. Once installed, users can use apps without needing access to the APK file, by simply browsing to the app listing in their device menu.
APK files can also be acquired through channels other than the official store, as there are other Web marketplaces for Android. Additionally, developers can install and run apps that are currently under development by copying the APK files onto their device, then using the Android system to install and run them. APK files are really only used within the installation process, and are not required when this is complete.
Links:
APK Creation
Android application developers create APK files, generating them as part of the development process. Most Android apps are developed in the Eclipse IDE, which can have a number of official plugins for Android installed, making it possible to develop, generate and ultimately release apps in the form of APK files. Once an Android project in Eclipse has been developed, executed, tested and is ready to be released, it can be exported in the form of an APK file.
In order to be released through Google's official Play store (previously Android Market), APK files must also be signed for security purposes. When an application has been signed and released through the store, it can only be updated using newer APK files which have also been signed using the same certificate, to verify that their origin is the same.
APK File Distribution and Acquisition
In the vast majority of cases, APK files are distributed and accessed by users through Google Play. Developers open accounts with the store, upload their APK files and choose publishing details including information for potential users and pricing choices.
Users of Android devices can access Google Play through a dedicated application which is typically installed on such devices when they are purchased. Using the Play app, users can browse applications by category or by searching for particular keywords and terms. Within each application listing users can read details, previous user reviews, comments and required system permissions for using the app.
Many apps are free, but some are downloaded at a set cost. If a user decides that they do not want to keep an app installed on their phone before the trial period ends, they can cancel the purchase. Whether an app is paid or free, users can decide at any time to uninstall it, again within the Play app.
APK File Installation and Use
When a user decides to download and install an app, Google Play and the Android system carry out the installation process. The APK file is initially downloaded onto the device, and the system then extracts the required information from this to install and execute the application. Once installed, users can use apps without needing access to the APK file, by simply browsing to the app listing in their device menu.
APK files can also be acquired through channels other than the official store, as there are other Web marketplaces for Android. Additionally, developers can install and run apps that are currently under development by copying the APK files onto their device, then using the Android system to install and run them. APK files are really only used within the installation process, and are not required when this is complete.
Links:
Tuesday, 28 August 2012
How To Uninstall Android Apps
If you have an Android device, such as a mobile phone, tablet or laptop PC, and have installed apps on it, you may of course wish to remove some of those apps if you decide you no longer want them. To uninstall Android apps, you have two broad options. If you bought or downloaded your apps through the official Google Play store (formerly Android Market), you can uninstall them through the Google Play app on your phone or device. As an alternative, you can uninstall Android apps through a section in your device settings, accessed through the main menu.
In this article we will run through the basics of uninstalling Android apps using both techniques. This can include apps that you installed on the device yourself as well as applications that were already installed when you started using it. However, be careful when removing apps that were already on your device when you got it, as some of them may be providing functionality that other apps rely on and that you are in fact using even though you are not aware of it. In general, it's best only to uninstall apps that you installed yourself.
Uninstall through the Market/ Google Play
For free apps and paid apps after the refund period has elapsed:
In March 2012 the Android Market became Google Play, but the process of uninstalling apps remains the same.
If you installed the apps you want to remove through Google Play, you can uninstall them using the Google Play app as well. To do so, open the Google Play app on your phone or other device, then browse to "My Apps", which you should see when you press the menu button on your device. Once you are in the My Apps section, you should see a list of the apps you have downloaded through Google Play. Locate the ones you want to remove by browsing through the list, using the search function if you have a lot of apps and can't find the ones you are looking for at first glance. You should see the search button near the top of the screen.
Your apps are normally listed in sections, with apps for which there are currently updates available appearing at the top, so you may need to scroll down past these to find the applications you want to uninstall. When you find an app you want to remove, select it from the list and your device will present you with the listing for that app. You should see an "Uninstall" button near the top of the screen, so select it. You will be prompted to confirm you want to uninstall the app, so if you are sure, press OK. While the app is being uninstalled you will see a notification in the Google Play screen. When the app has been successfully uninstalled, the Google Play screen will return to its normal state.
For paid apps before the end of the refund period:
If you are uninstalling apps you paid for, you will only receive a refund if you uninstall the app within 15 minutes of purchasing it. After that time you are no longer entitled to a refund. If you are uninstalling an Android app and are still within the refund period, you will see a "Refund" button in the Google Play page for the app, so select it. After the 15 minute refund window you will simply see the "Uninstall" button.
Note:
If you are outwith the refund period but are unsatisfied with an app, you do have the option of contacting the developer, as the Google Play listings include contact details. You have no guarantee of getting a refund after the 15 minutes elapse, but if an app is faulty in some way you may be able to get the developer to agree to a refund.
Uninstall through the Device Settings
You can uninstall any application installed on your device through your device settings menu, regardless of whether the app was installed through Google Play or not. To use this option, open your main device menu and select "Settings". Choose "Applications", then "Manage applications" or just "Manage" depending on your system version. You should see a tabbed display letting you filter apps that have been downloaded, are installed on the SD card, are currently running, or simply all installed apps. Choose an option and scroll through the list until you find the app you want to remove.
You will see the "Application info" screen for the app, which lists information about the application data and where it is stored. You should see an "Uninstall" button near the top, so choose this. You will be prompted to confirm that you want to go ahead and uninstall the app, so choose OK, if you are sure. You will see a notification while the app is being uninstalled and confirmation when the uninstall is complete.
Additional Options and Considerations
These are the two basic options you have if you want to uninstall Android apps. You may find that, depending on your device or Android platform software version, the titles you see may vary slightly from the steps above, but they should be broadly similar.
If you decide after uninstalling an app that you do want it after all, you can of course download and install it again, providing it is still available. If you have installed applications from sources other than the official Google Play store, you can use the Settings/ Manage applications technique to uninstall these. Whatever download route you took basically involved the application APK file being downloaded onto your device and the app being installed from it, so the uninstallation process should not be any more problematic.
Related Resources
In this article we will run through the basics of uninstalling Android apps using both techniques. This can include apps that you installed on the device yourself as well as applications that were already installed when you started using it. However, be careful when removing apps that were already on your device when you got it, as some of them may be providing functionality that other apps rely on and that you are in fact using even though you are not aware of it. In general, it's best only to uninstall apps that you installed yourself.
Uninstall through the Market/ Google Play
For free apps and paid apps after the refund period has elapsed:
In March 2012 the Android Market became Google Play, but the process of uninstalling apps remains the same.
If you installed the apps you want to remove through Google Play, you can uninstall them using the Google Play app as well. To do so, open the Google Play app on your phone or other device, then browse to "My Apps", which you should see when you press the menu button on your device. Once you are in the My Apps section, you should see a list of the apps you have downloaded through Google Play. Locate the ones you want to remove by browsing through the list, using the search function if you have a lot of apps and can't find the ones you are looking for at first glance. You should see the search button near the top of the screen.
Your apps are normally listed in sections, with apps for which there are currently updates available appearing at the top, so you may need to scroll down past these to find the applications you want to uninstall. When you find an app you want to remove, select it from the list and your device will present you with the listing for that app. You should see an "Uninstall" button near the top of the screen, so select it. You will be prompted to confirm you want to uninstall the app, so if you are sure, press OK. While the app is being uninstalled you will see a notification in the Google Play screen. When the app has been successfully uninstalled, the Google Play screen will return to its normal state.
For paid apps before the end of the refund period:
If you are uninstalling apps you paid for, you will only receive a refund if you uninstall the app within 15 minutes of purchasing it. After that time you are no longer entitled to a refund. If you are uninstalling an Android app and are still within the refund period, you will see a "Refund" button in the Google Play page for the app, so select it. After the 15 minute refund window you will simply see the "Uninstall" button.
Note:
If you are outwith the refund period but are unsatisfied with an app, you do have the option of contacting the developer, as the Google Play listings include contact details. You have no guarantee of getting a refund after the 15 minutes elapse, but if an app is faulty in some way you may be able to get the developer to agree to a refund.
Uninstall through the Device Settings
You can uninstall any application installed on your device through your device settings menu, regardless of whether the app was installed through Google Play or not. To use this option, open your main device menu and select "Settings". Choose "Applications", then "Manage applications" or just "Manage" depending on your system version. You should see a tabbed display letting you filter apps that have been downloaded, are installed on the SD card, are currently running, or simply all installed apps. Choose an option and scroll through the list until you find the app you want to remove.
You will see the "Application info" screen for the app, which lists information about the application data and where it is stored. You should see an "Uninstall" button near the top, so choose this. You will be prompted to confirm that you want to go ahead and uninstall the app, so choose OK, if you are sure. You will see a notification while the app is being uninstalled and confirmation when the uninstall is complete.
Additional Options and Considerations
These are the two basic options you have if you want to uninstall Android apps. You may find that, depending on your device or Android platform software version, the titles you see may vary slightly from the steps above, but they should be broadly similar.
If you decide after uninstalling an app that you do want it after all, you can of course download and install it again, providing it is still available. If you have installed applications from sources other than the official Google Play store, you can use the Settings/ Manage applications technique to uninstall these. Whatever download route you took basically involved the application APK file being downloaded onto your device and the app being installed from it, so the uninstallation process should not be any more problematic.
Related Resources
Developing Android Widgets
Developing Android widget applications involves a slightly different process to creating standard apps. In this article we will go over the basics of what Android Widget development involves, outlining the main ways in which the task varies from other applications. If you already have experience developing a standard Android application, you will be able to approach the job of developing a widget app fairly easily. However, if you have not yet developed any Android applications, it is advisable to start by trying a standard app first rather than a widget app.
Launching and Running
Most Android apps are launched through the user device menu. Application shortcuts may be added to homescreens, with users launching the apps from the shortcut icons. However, widget apps are launched using a distinct process. When the user downloads a widget app from the Google Play store (formerly Android Market), the app installation process is exactly the same as for other apps. To run the widget, the user must add it to their device screen. Normally, this involves long-pressing (pressing and holding) an area of the homescreen. The user is then presented with options to add application shortcuts or widgets. Upon choosing widget, the user is presented with a list of those available, i.e. those widget applications they have installed.
When the user chooses a widget to add to the homescreen, the widget will be automatically added to the position they originally long-pressed. The user can then move the widget around the screen by pressing, holding and dragging it. Often, Android widgets allow users to choose configuration settings. This is particularly common with widget apps that update over time, sometimes fetching data over the Internet. In such cases you can provide users with the ability to set timing periods for these and other options, normally by pressing the widget while it is on the screen.
Developing
When you approach the task of developing Android widgets, there are a number of similarities and differences with other apps. Because the launch process is different, there are differences in your Manifest file, Resources directories and Java classes. For a widget app, you do not need to use a main Activity class to be launched when the widget runs. Instead, you provide a class that extends the "AppWidgetProvider" class. In addition to this, you need to declare this "AppWidgetProvider" class within your application Manifest file, in which you can define it as a receiver. In the Manifest, you also need to define metadata for the widget app, indicating an XML resource file in which you specify the basic properties of your widget.
The widget metadata is defined using the "AppWidgetProviderInfo" resource. Essentially, this involves creating a folder in your application resources directory named "xml" in which you save an XML file with the widget properties outlined in it. These properties include how often you want the widget to update, as well as default dimensions and a preview image. Within your "AppWidgetProvider" class, you can provide methods that will execute whenever the widget app updates, which will occur at the frequency you indicated in your XML metadata file. Within these methods, you can define the behaviour and appearance of your widget, optionally basing this on data fetched from elsewhere.
Rather than simply updating your widget apps at a fixed period, you can also set it up to receive system broadcast announcements. This is particularly useful for widgets that indicate information about the phone state, for example the current battery level. Some widget apps also use the "AlarmManager" class to register and receive announcements at custom periods. If a developer decides to allow the user to set configuration options for a widget app, they normally do this by implementing a click listener for the widget, detecting the user pressing it when it is on the homescreen and presenting a user interface for settings when this occurs.
Testing
Testing widgets is broadly similar to testing standard Android apps, although there are some differences depending on the purpose of the widget app in question. For example, when a widget is updating with information about the phone state, for example battery level, WiFi connectivity etc, you will not be able to carry out effective testing on the Android emulator. In such cases a widget app really needs to be tested on an actual Android device, as the device settings on virtual devices do not change in the same way as on real devices.
Conclusion
If you are thinking about attempting an Android widget application and have already developed one or more normal Android apps, you can easily make the required adjustments to your development approach. However, if you are thinking of a widget app as your first foray into Android development, you may have more success by focusing on a standard app first to give yourself a solid foundation on the platform.
Links:
Launching and Running
Most Android apps are launched through the user device menu. Application shortcuts may be added to homescreens, with users launching the apps from the shortcut icons. However, widget apps are launched using a distinct process. When the user downloads a widget app from the Google Play store (formerly Android Market), the app installation process is exactly the same as for other apps. To run the widget, the user must add it to their device screen. Normally, this involves long-pressing (pressing and holding) an area of the homescreen. The user is then presented with options to add application shortcuts or widgets. Upon choosing widget, the user is presented with a list of those available, i.e. those widget applications they have installed.
When the user chooses a widget to add to the homescreen, the widget will be automatically added to the position they originally long-pressed. The user can then move the widget around the screen by pressing, holding and dragging it. Often, Android widgets allow users to choose configuration settings. This is particularly common with widget apps that update over time, sometimes fetching data over the Internet. In such cases you can provide users with the ability to set timing periods for these and other options, normally by pressing the widget while it is on the screen.
Developing
When you approach the task of developing Android widgets, there are a number of similarities and differences with other apps. Because the launch process is different, there are differences in your Manifest file, Resources directories and Java classes. For a widget app, you do not need to use a main Activity class to be launched when the widget runs. Instead, you provide a class that extends the "AppWidgetProvider" class. In addition to this, you need to declare this "AppWidgetProvider" class within your application Manifest file, in which you can define it as a receiver. In the Manifest, you also need to define metadata for the widget app, indicating an XML resource file in which you specify the basic properties of your widget.
The widget metadata is defined using the "AppWidgetProviderInfo" resource. Essentially, this involves creating a folder in your application resources directory named "xml" in which you save an XML file with the widget properties outlined in it. These properties include how often you want the widget to update, as well as default dimensions and a preview image. Within your "AppWidgetProvider" class, you can provide methods that will execute whenever the widget app updates, which will occur at the frequency you indicated in your XML metadata file. Within these methods, you can define the behaviour and appearance of your widget, optionally basing this on data fetched from elsewhere.
Rather than simply updating your widget apps at a fixed period, you can also set it up to receive system broadcast announcements. This is particularly useful for widgets that indicate information about the phone state, for example the current battery level. Some widget apps also use the "AlarmManager" class to register and receive announcements at custom periods. If a developer decides to allow the user to set configuration options for a widget app, they normally do this by implementing a click listener for the widget, detecting the user pressing it when it is on the homescreen and presenting a user interface for settings when this occurs.
Testing
Testing widgets is broadly similar to testing standard Android apps, although there are some differences depending on the purpose of the widget app in question. For example, when a widget is updating with information about the phone state, for example battery level, WiFi connectivity etc, you will not be able to carry out effective testing on the Android emulator. In such cases a widget app really needs to be tested on an actual Android device, as the device settings on virtual devices do not change in the same way as on real devices.
Conclusion
If you are thinking about attempting an Android widget application and have already developed one or more normal Android apps, you can easily make the required adjustments to your development approach. However, if you are thinking of a widget app as your first foray into Android development, you may have more success by focusing on a standard app first to give yourself a solid foundation on the platform.
Links:
- App Widgets | Android Developers
- Android Homescreen Widgets - Tutorial - Vogella
- Jump Into Android: Create A Battery Level Widget
- Android Things: Creating an Android Battery Widget
- What Does Android Application Development Involve? | The Tech Interpreter
- Android Widget Development | The Tech Interpreter
Sunday, 26 August 2012
Using Randomness To Stimulate Creativity
As part of my Android development projects, I've recently been reading about randomness and how it can help to stimulate the creative process. I've always found randomness interesting and in some cases funny, but it also seems to be a tried and tested creativity technique. In this article I thought I'd run through a few of the concepts and resources I've come across on the subject.
Lots of writers, artists and musicians use randomness to prompt their creative efforts, and computers are offering new ways to implement random (or pseudo-random) processes. Computer programming languages are able to generate random numbers which can then be used to add a level of unpredictability to website or computing application content.
I find randomness really funny, which is why I started learning about this subject, mainly for the purpose of developing my Android Nonsense applications.
Looking for a way to automate nonsense and gibberish, I found a load of funny websites doing similar things. These applications use recognisable language structures with random elements to create comic effect. Here are some of the funnier sites I've found:
Computation
When I studied for my Masters degree in IT, I worked on a software project in which sentences were modelled as templates, with placeholders corresponding to particular parts of speech. For example, the following sentence:
Could be represented using the following placeholders:
Using this idea, you can take a language template and fill words of each part of speech into the placeholder slots randomly. This process could result in the following:
The process here is a little like the game MadLibs, in which you choose words without knowing the sentence (or story) context. My idea was to make the process a little more unpredictable and to automate parts of it, rather than the user having to choose every item.
Language Use
Anyway, it works because of the difference between grammar and semantics. Grammar determines (or describes) the structures that are used within a language to build sentences and clauses. Semantics on the other hand relates to meaning. Chomsky created the following sentence to illustrate the fact that a sentence can make no sense but still be grammatical:
This is the crux of the nonsense sentence. If it was just a series of words it wouldn't be funny, but the fact that our brains recognise it as a sentence structure makes the lack of sense humorous. At the phrasal level, the concept of snowclone is also relevant. This idea relates to a category of language cliches in which a structure has interchangeable elements, for example:
Speakers of a language develop the ability to fill in blanks, an aspect of language learning analysed using Cloze Tests. This tendency to conceive of sentence structures rather than just concrete examples of language seems key to both creativity and understanding.
Creativity
Creativity is a slippery topic. We describe people as creative, generally categorising some people as more creative than others. I don't know if I believe this. I've always tended to "do creative things" but I think it has more to do with habit than nature. In any case, I believe that engaging with creative tasks is not only enjoyable, but also good for mental well-being. For this reason I think it's a good idea to encourage people to stimulate their own creativity, and randomness can aid this process.
Jabberwocky
Lewis Carroll's poem Jabberwocky touches on some related concepts. The poem, an example of Literary Nonsense, uses recognisable structures with nonsense words. Rather than each word being from a known part of speech, these words seem to be from specific parts of speech on account of the sentence structures they appear in. Interestingly, linguistic studies have shown that people often have similar ideas for what the invented words in the poem could mean.
Related Links:
Tech Interpreter Links:
Lots of writers, artists and musicians use randomness to prompt their creative efforts, and computers are offering new ways to implement random (or pseudo-random) processes. Computer programming languages are able to generate random numbers which can then be used to add a level of unpredictability to website or computing application content.
I find randomness really funny, which is why I started learning about this subject, mainly for the purpose of developing my Android Nonsense applications.
Looking for a way to automate nonsense and gibberish, I found a load of funny websites doing similar things. These applications use recognisable language structures with random elements to create comic effect. Here are some of the funnier sites I've found:
- Name Generator Central: Generator Land - This site has loads of great random generators - well worth a browse.
- Daily Mail-o-matic - It's that simple - this gives you a new Daily Mail headline every time you click the button.
- Random Fantasy Novel Title Generator | Fantasy Literature - This page generates fantasy novel titles - it's pretty funny.
- Random Sentence Generator - This simple page demonstrates the sentence generation process.
- Insult Generator: The Insult Project - This site generates funny insults
Computation
When I studied for my Masters degree in IT, I worked on a software project in which sentences were modelled as templates, with placeholders corresponding to particular parts of speech. For example, the following sentence:
The quick brown fox jumps over the lazy dog.
Could be represented using the following placeholders:
Determiner adjective adjective noun verb preposition determiner adjective noun.
Using this idea, you can take a language template and fill words of each part of speech into the placeholder slots randomly. This process could result in the following:
A stupid big car dances on a purple hat.
The process here is a little like the game MadLibs, in which you choose words without knowing the sentence (or story) context. My idea was to make the process a little more unpredictable and to automate parts of it, rather than the user having to choose every item.
Language Use
Anyway, it works because of the difference between grammar and semantics. Grammar determines (or describes) the structures that are used within a language to build sentences and clauses. Semantics on the other hand relates to meaning. Chomsky created the following sentence to illustrate the fact that a sentence can make no sense but still be grammatical:
Colorless green ideas sleep furiously
This is the crux of the nonsense sentence. If it was just a series of words it wouldn't be funny, but the fact that our brains recognise it as a sentence structure makes the lack of sense humorous. At the phrasal level, the concept of snowclone is also relevant. This idea relates to a category of language cliches in which a structure has interchangeable elements, for example:
The ? from Hell
Speakers of a language develop the ability to fill in blanks, an aspect of language learning analysed using Cloze Tests. This tendency to conceive of sentence structures rather than just concrete examples of language seems key to both creativity and understanding.
Creativity
Creativity is a slippery topic. We describe people as creative, generally categorising some people as more creative than others. I don't know if I believe this. I've always tended to "do creative things" but I think it has more to do with habit than nature. In any case, I believe that engaging with creative tasks is not only enjoyable, but also good for mental well-being. For this reason I think it's a good idea to encourage people to stimulate their own creativity, and randomness can aid this process.
Jabberwocky
Lewis Carroll's poem Jabberwocky touches on some related concepts. The poem, an example of Literary Nonsense, uses recognisable structures with nonsense words. Rather than each word being from a known part of speech, these words seem to be from specific parts of speech on account of the sentence structures they appear in. Interestingly, linguistic studies have shown that people often have similar ideas for what the invented words in the poem could mean.
Related Links:
- You are Sooo Random! - Randomness & Creativity Research | Psychology Today - Interesting psychological look at randomness and creativity.
- Random Stimuli - Mycoted - Overview of using random stimuli for creative acts.
- Aleatoricism - Wikipedia - Another creativity technique involving randomness.
- Creativity Games - Brain Training for Creativity and Creative Thinking - Simple games and resources that will improve your creative thinking and problem solving ability.
- Android Development - More info about my Android apps.
Tech Interpreter Links:
Frequently Asked Questions About Android Apps
Android apps are applications that run on the Android platform. Many devices are now running Android, including smartphones and tablet PCs. The Android operating system provides a number of apps as standard. Additional apps can also be installed and run on an Android device. Android apps cover a wide range of activities, for both work and leisure purposes. Finding and installing apps on and Android device is normally straightforward.
If you're a new Android user and are finding the whole app thing a little baffling, don't worry. The questions here are pretty basic, but might clear a couple of things up for you. The official Android Market/ Google Play Help Centre is also really useful so is well worth a look. Feel free to add more questions in the comments area and I'll do my best to answer them.
What Are Android Apps?
Android apps are standalone applications released by companies and individual developers. When you purchase an Android device such as a smartphone, it will usually have several basic apps already installed on it. These include a Web browser program, an email program and often app versions of Google services such as Gmail. As an Android user, you can also opt to install additional apps on your device whenever you like. The installation process is typically simple.
How Much Do Android Apps Cost?
Some Android apps are free, some are commercial. Many of the commercial apps are supported by advertising, so you may see adverts displayed within those apps while they are running. The commercial apps can have any price chosen by the developer or company who is publishing them. If you purchase and download an Android app that you decide you do not want to keep, you can get a full refund as long as you cancel your purchase within 15 minutes.
What Types Of Android App Are There?
Android apps fall within a wide range of categories, including games, business, communication, education, entertainment, finance, health, fitness, media, productivity, shopping, travel and weather among others. Most apps are designed to enhance the use you get out of your Android device, providing additional functionality on top of the basic operating system functions. The most successful Android apps are easy to use straight away.
Which Devices Can Run Android Apps?
Any device with the Android operating system installed on it can run Android apps. Many devices such as phones, laptops and tablets are now being shipped with Android on them. The operating system is also free, so can be installed on devices at any time. Most Android apps are designed for the unique hardware components you find in a mobile device, with user interaction taking place through touchscreens and buttons.
Where Can I Get Android Apps?
The main source for Android apps is the official Google Play store (formerly Android Market). Google Play is accessible through a Web browser, but is mainly accessed by users through the dedicated Play app on an Android device. Using either the app or browser interface, you can browse through the different app categories, search for specific apps and compare previous user ratings and reviews for any apps you are considering downloading. There are other Android app stores operating online as well.
See also:
Android Things: Android Marketplaces and Directories
How To Uninstall Android Apps | The Tech Interpreter
What Are Android APK Files? | The Tech Interpreter
If you're a new Android user and are finding the whole app thing a little baffling, don't worry. The questions here are pretty basic, but might clear a couple of things up for you. The official Android Market/ Google Play Help Centre is also really useful so is well worth a look. Feel free to add more questions in the comments area and I'll do my best to answer them.
What Are Android Apps?
Android apps are standalone applications released by companies and individual developers. When you purchase an Android device such as a smartphone, it will usually have several basic apps already installed on it. These include a Web browser program, an email program and often app versions of Google services such as Gmail. As an Android user, you can also opt to install additional apps on your device whenever you like. The installation process is typically simple.
How Much Do Android Apps Cost?
Some Android apps are free, some are commercial. Many of the commercial apps are supported by advertising, so you may see adverts displayed within those apps while they are running. The commercial apps can have any price chosen by the developer or company who is publishing them. If you purchase and download an Android app that you decide you do not want to keep, you can get a full refund as long as you cancel your purchase within 15 minutes.
What Types Of Android App Are There?
Android apps fall within a wide range of categories, including games, business, communication, education, entertainment, finance, health, fitness, media, productivity, shopping, travel and weather among others. Most apps are designed to enhance the use you get out of your Android device, providing additional functionality on top of the basic operating system functions. The most successful Android apps are easy to use straight away.
Which Devices Can Run Android Apps?
Any device with the Android operating system installed on it can run Android apps. Many devices such as phones, laptops and tablets are now being shipped with Android on them. The operating system is also free, so can be installed on devices at any time. Most Android apps are designed for the unique hardware components you find in a mobile device, with user interaction taking place through touchscreens and buttons.
Where Can I Get Android Apps?
The main source for Android apps is the official Google Play store (formerly Android Market). Google Play is accessible through a Web browser, but is mainly accessed by users through the dedicated Play app on an Android device. Using either the app or browser interface, you can browse through the different app categories, search for specific apps and compare previous user ratings and reviews for any apps you are considering downloading. There are other Android app stores operating online as well.
See also:
Android Things: Android Marketplaces and Directories
How To Uninstall Android Apps | The Tech Interpreter
What Are Android APK Files? | The Tech Interpreter
What Are Android Phones?
The ever increasing range of mobile technology gadgets can understandably leave people feeling confused. If you're feeling a little baffled by talk of platforms such as Android, then this article should hopefully help clear things up.
In the past, most people chose phones based on which manufacturer produced them, and the software on such phones was also peculiar to the phone brand. Apple's iPhone is a current example of this, where the same company are producing the hardware and software. Android is slightly different, as the Android operating system is used on phones and other mobile devices created by lots of different manufacturers.
Operating System
To understand how Android works, consider your PC. If you have a laptop, desktop or tablet PC, the actual machine will be manufactured by a specific company, whose name will no doubt be displayed on the casing somewhere. The operating system running on the machine is distinct from this. The operating system together with the applications are software, while the machine itself is hardware. (Again, Apple products confusingly comprise both hardware and software designed and manufactured by the same company, but this is less common than the alternative).
This is the concept to understand with Android. While your PC may be running an operating system such as Windows, Mac OS or Linux, its hardware may have been created by any of a number of manufacturers. Android phones are basically any phones running the Android operating system. There are lots of manufacturers producing hardware with Android running on it, including HTC, Motorola, LG, Samsung and Sony Ericsson.
The Android Platform
The Android platform is therefore installed on a range of devices with different hardware specifications, designs and user controls. Although primarily a smartphone platform, Android is also used on other mobile devices such as tablet and netbook PCs.
Devices with Android installed include all of the standard features a smartphone or mobile gadget is expected to have, including Internet access, email, GPS and the ability to use mobile phone services such as making and receiving calls and text messaging. Over and above these standard features, Android devices also have lots of other optional applications.
Applications
Applications, or "apps", are key to smartphone platforms such as Android. Users are able to download and install additional applications for a wide variety of purposes such as entertainment, gaming, organisation and productivity among many others. These are accessed through marketplaces, specifically the Android Market, now Google Play (the other platforms have their own app stores).
Android Vs Other Platforms
From the user's point of view, Android functions in much the same way as rival platforms such as Apple iPhone. However, there is a fairly major philosophical difference between the platforms. Android is open source, which means that the source code used to create it is visible to anyone who wants to see it.
While this may not seem relevant to you as a user, open source software is increasingly being used by people who are not necessarily developers. The principle of open source software is that consumers essentially have a right to access the source code. Because open source code is more visible, it is often worked on by a greater number of developers, which can cause an increase in quality and reliability.
Openness and Accessibility
This open idea has also been applied to the Android Market/ Google Play store. While the Apple App Store has a number of restrictions on the apps that developers can sell, with the content rigorously vetted, Google Play has very few restrictions. The downside to this is that there are potentially more poor quality apps on the store, but the plus side is that it is less restricted.
Like the Web, it is up to the users to distinguish between those apps that are worthwhile on Google Play, rather than having the content vetted and censored on their behalf. Which option you prefer as a user is really a matter for personal choice.
Because Android is freely available, it is also being used on phones across the market range. There are far more affordable, lower cost smartphones with Android on them compared to the other smartphone platforms such as iPhone and Blackberry. Android is therefore a more accessible system than most of its competitors, and can be acquired on devices that are small and large in scale, with various types of hardware interface including touchscreens, buttons and keyboards.
See also Android Things: Android Marketplaces and Directories
In the past, most people chose phones based on which manufacturer produced them, and the software on such phones was also peculiar to the phone brand. Apple's iPhone is a current example of this, where the same company are producing the hardware and software. Android is slightly different, as the Android operating system is used on phones and other mobile devices created by lots of different manufacturers.
Operating System
To understand how Android works, consider your PC. If you have a laptop, desktop or tablet PC, the actual machine will be manufactured by a specific company, whose name will no doubt be displayed on the casing somewhere. The operating system running on the machine is distinct from this. The operating system together with the applications are software, while the machine itself is hardware. (Again, Apple products confusingly comprise both hardware and software designed and manufactured by the same company, but this is less common than the alternative).
This is the concept to understand with Android. While your PC may be running an operating system such as Windows, Mac OS or Linux, its hardware may have been created by any of a number of manufacturers. Android phones are basically any phones running the Android operating system. There are lots of manufacturers producing hardware with Android running on it, including HTC, Motorola, LG, Samsung and Sony Ericsson.
The Android Platform
The Android platform is therefore installed on a range of devices with different hardware specifications, designs and user controls. Although primarily a smartphone platform, Android is also used on other mobile devices such as tablet and netbook PCs.
Devices with Android installed include all of the standard features a smartphone or mobile gadget is expected to have, including Internet access, email, GPS and the ability to use mobile phone services such as making and receiving calls and text messaging. Over and above these standard features, Android devices also have lots of other optional applications.
Applications
Applications, or "apps", are key to smartphone platforms such as Android. Users are able to download and install additional applications for a wide variety of purposes such as entertainment, gaming, organisation and productivity among many others. These are accessed through marketplaces, specifically the Android Market, now Google Play (the other platforms have their own app stores).
Android Vs Other Platforms
From the user's point of view, Android functions in much the same way as rival platforms such as Apple iPhone. However, there is a fairly major philosophical difference between the platforms. Android is open source, which means that the source code used to create it is visible to anyone who wants to see it.
While this may not seem relevant to you as a user, open source software is increasingly being used by people who are not necessarily developers. The principle of open source software is that consumers essentially have a right to access the source code. Because open source code is more visible, it is often worked on by a greater number of developers, which can cause an increase in quality and reliability.
Openness and Accessibility
This open idea has also been applied to the Android Market/ Google Play store. While the Apple App Store has a number of restrictions on the apps that developers can sell, with the content rigorously vetted, Google Play has very few restrictions. The downside to this is that there are potentially more poor quality apps on the store, but the plus side is that it is less restricted.
Like the Web, it is up to the users to distinguish between those apps that are worthwhile on Google Play, rather than having the content vetted and censored on their behalf. Which option you prefer as a user is really a matter for personal choice.
Because Android is freely available, it is also being used on phones across the market range. There are far more affordable, lower cost smartphones with Android on them compared to the other smartphone platforms such as iPhone and Blackberry. Android is therefore a more accessible system than most of its competitors, and can be acquired on devices that are small and large in scale, with various types of hardware interface including touchscreens, buttons and keyboards.
See also Android Things: Android Marketplaces and Directories
Monday, 20 August 2012
What Does Android Application Development Involve?
With the advance of mobile technology, many people have become interested in Android development. If you're thinking of developing Android apps but are unsure where to start, that's understandable. The platform actually involves a range of technologies, so developing applications for it does require a varied skill set. However, if you have development experience of some kind, for example Web development, you can definitely pick these skills up. In this article we'll go over the technologies involved in Android development, explaining what tasks each language is used to accomplish as well as the overall development models and contexts.
Java
Java is the main programming language involved in developing Android apps. With Java, you define the logic of your applications, including handling user interaction. If you have no Java experience, but have other programming experience in a language such as PHP or even JavaScript, you should be able to learn. However, the first step in approaching Android development without Java experience should be to learn the basics of the language. Java is a strongly typed language, so programming in it may seem fundamentally different if you have only used weakly typed languages in the past.
Object Oriented Development
When you program in Java you use Object Oriented development. If you have done some Web development in the past you may be familiar with this. If not, you will need to learn the basic principles involved in it. Essentially, Object Oriented applications divide tasks between a group of objects. When you program your apps, you create a series of class declarations for object types. Each declaration defines the properties and behaviour that objects of the class will provide. Once you have a class declaration in your Android project, you can create objects of the class to carry out your application processes.
Inheritance
One of the main principles of Object Oriented development that you will need to learn in order to build Android applications is inheritance. With inheritance, you can re-use the functionality of an existing class by extending it, or inheriting from it. This includes your own classes as well as classes within the Java and Android platforms. All Android apps involve extending at least one of the Android classes. Don't worry if this seems intimidating, as it actually saves you a lot of work. By inheriting the Android and Java classes, your own application code does not have to handle the details of, for example, presenting a user interface screen to your users.
XML
The other main language involved in Android development is XML. XML models various aspects of Android applications, including data and the different elements within a user interface. One of the first things you will do with XML in Android is design the layout of your app interface. Many of the development tools for Android, particularly the Eclipse IDE (Integrated Development Environment), provide automated tools for generating and editing the XML for your projects through graphical interfaces. While some of these are useful, you will need some level of XML knowledge to create apps successfully.
Data
Android applications can use data loaded from within the app directory structure itself as well as data loaded from elsewhere on the user's device, such as the SD card, or over the Internet. The Resources directory within an Android app contains XML files with data items in it. You can additionally use data management technologies such as SQL, especially SQLite, to create databases for your apps. The Java language also provides resources for fetching data over the Web, including XML and relational database systems.
Developing
To develop Android apps, you need to download and install various resources. The official Android developer guide recommends Eclipse for developing and exporting your apps. You will also need to install the Android SDK (Software Development Kit) and ADT (Android Developer Tools). Using these resources, you can design and build Android apps on your computer as well as running them on virtual devices, or Android emulators. The Eclipse tools also provide extensive debugging utilities.
Releasing
To release an Android app through the official Android Market, now the Google Play Store, which is the main app store for distributing applications on the platform, you need to sign up for a developer account. You can export your apps through Eclipse, signing them with a secure key. In order to upload your apps for distribution through the Market/ Google Play, you must also version them correctly using your application Manifest file. The publishing process also allows you to choose whether your apps will be free to download, or available for a set fee if your project is commercial.
Links
Android Developer Guide
Android Things Blog
Developing Android Widgets | The Tech Interpreter
What Are Android APK Files? | The Tech Interpreter
Android Widget Development | The Tech Interpreter
Java
Java is the main programming language involved in developing Android apps. With Java, you define the logic of your applications, including handling user interaction. If you have no Java experience, but have other programming experience in a language such as PHP or even JavaScript, you should be able to learn. However, the first step in approaching Android development without Java experience should be to learn the basics of the language. Java is a strongly typed language, so programming in it may seem fundamentally different if you have only used weakly typed languages in the past.
Object Oriented Development
When you program in Java you use Object Oriented development. If you have done some Web development in the past you may be familiar with this. If not, you will need to learn the basic principles involved in it. Essentially, Object Oriented applications divide tasks between a group of objects. When you program your apps, you create a series of class declarations for object types. Each declaration defines the properties and behaviour that objects of the class will provide. Once you have a class declaration in your Android project, you can create objects of the class to carry out your application processes.
Inheritance
One of the main principles of Object Oriented development that you will need to learn in order to build Android applications is inheritance. With inheritance, you can re-use the functionality of an existing class by extending it, or inheriting from it. This includes your own classes as well as classes within the Java and Android platforms. All Android apps involve extending at least one of the Android classes. Don't worry if this seems intimidating, as it actually saves you a lot of work. By inheriting the Android and Java classes, your own application code does not have to handle the details of, for example, presenting a user interface screen to your users.
XML
The other main language involved in Android development is XML. XML models various aspects of Android applications, including data and the different elements within a user interface. One of the first things you will do with XML in Android is design the layout of your app interface. Many of the development tools for Android, particularly the Eclipse IDE (Integrated Development Environment), provide automated tools for generating and editing the XML for your projects through graphical interfaces. While some of these are useful, you will need some level of XML knowledge to create apps successfully.
Data
Android applications can use data loaded from within the app directory structure itself as well as data loaded from elsewhere on the user's device, such as the SD card, or over the Internet. The Resources directory within an Android app contains XML files with data items in it. You can additionally use data management technologies such as SQL, especially SQLite, to create databases for your apps. The Java language also provides resources for fetching data over the Web, including XML and relational database systems.
Developing
To develop Android apps, you need to download and install various resources. The official Android developer guide recommends Eclipse for developing and exporting your apps. You will also need to install the Android SDK (Software Development Kit) and ADT (Android Developer Tools). Using these resources, you can design and build Android apps on your computer as well as running them on virtual devices, or Android emulators. The Eclipse tools also provide extensive debugging utilities.
Releasing
To release an Android app through the official Android Market, now the Google Play Store, which is the main app store for distributing applications on the platform, you need to sign up for a developer account. You can export your apps through Eclipse, signing them with a secure key. In order to upload your apps for distribution through the Market/ Google Play, you must also version them correctly using your application Manifest file. The publishing process also allows you to choose whether your apps will be free to download, or available for a set fee if your project is commercial.
Links
Android Developer Guide
Android Things Blog
Developing Android Widgets | The Tech Interpreter
What Are Android APK Files? | The Tech Interpreter
Android Widget Development | The Tech Interpreter
Tuesday, 10 July 2012
Introduction To Android APK Files
The Android image is provided by Google using the Creative Commons 3.0 Attribution License - here is the source page.
However, APK files are a vital ingredient in Android development. If you are a mobile application developer for Android, or are thinking about learning Android mobile development, then you will have some involvement with APK files, for your own and possibly other apps.
If you want to export an APK from an app you're developing in Eclipse:
Basically, an APK file contains all of the necessary information for an application to be installed and run, including the code and resources such as images and data. However, the Android system can be configured to prevent installation from sources other than the Android Market. In this case, you will need to alter your settings if you want to install apps from other sources.
To set your phone up to install non-market apps:
Using whatever file explorer application you have installed, it is generally the case that simply tapping on the APK file will prompt you to decide whether you want to install it. If you do not have a file explorer program already, I would thoroughly recommend the free ES File Explorer, although there are loads of others that get great reviews too.
Once you have an app installed and want to update it manually, for example where you've refined an application you're testing, simply export a new APK, copy it onto the device again and browse to it, installing it in the same way you did the first time.
You can also install APK files using the Android SDK (Android Software Development Kit), but this is more complex. Here's a guide: Talk Android - A Guide To Installing APK Apps On Your Google Android Phone.
Android Developers Blog
Google Play
Android Things Blog
How To Uninstall Android Apps | The Tech Interpreter
What Are Android APK Files? | The Tech Interpreter
Frequently Asked Questions About Android Apps | The Tech Interpreter
What is an Android APK File?
An APK file is an archived Android Package file, and will be saved with ".apk" extension. If you have an Android phone, tablet, computer or other mobile device, it will already have APK files on it. APK files are used for distributing and installing Android applications, and contain the compiled code necessary to run those applications on devices with the Android operating system installed. Apps for Android devices are almost always installed from an APK file.What do I need to Know about APK Files?
As a normal user of an Android phone, you will typically not need to be aware of APK files. You can get normal use out of your phone without ever having to worry about APK files, as the Android operating system automates handling of them in most cases.There may be occasions where you need to handle APK files if you download non-market applications, i.e. apps from some source other than the official Android Market.However, APK files are a vital ingredient in Android development. If you are a mobile application developer for Android, or are thinking about learning Android mobile development, then you will have some involvement with APK files, for your own and possibly other apps.
How are APK Files created?
APK files for Android apps are generated by developers. When you develop an application for the Android platform using an IDE such as Eclipse with the Android Developer Tools installed, the process of generating an APK file is as simple as a few clicks. You will also have to sign your applications before they can be released, downloaded and installed by users.If you want to export an APK from an app you're developing in Eclipse:
- Select your Android project in the Eclipse Package Explorer, right-click and choose Android Tools then either Export Signed Application Package or Export Unsigned Application Package.
- If you only export an unsigned package, you will not be able to release your app on the Android Market, but may be able to test it on your own devices (although this depends on your settings).
- To sign your applications, you need to use the Keytool and Jarsigner utilities, both of which come as part of the development kit. Here's an overview of application signing: Android Developers: Signing Your Applications.
How are APK Files Distributed?
APK files are mostly downloaded through the Android Market, with Android devices automatically installing them once downloaded. Some APK files are also distributed over the Internet, in which case they can be stored on or copied onto an Android device before being installed.Basically, an APK file contains all of the necessary information for an application to be installed and run, including the code and resources such as images and data. However, the Android system can be configured to prevent installation from sources other than the Android Market. In this case, you will need to alter your settings if you want to install apps from other sources.
To set your phone up to install non-market apps:
- Open your device application menu
- Choose Settings
- Choose Applications
- Check the Unknown sources box
How are APK Files installed?
In most cases APK files are used to install apps automatically through your device's Android Market program. However, if you find yourself trying to install an APK file manually the process is typically straightforward. If you're installing an app you've developed or have on a computer or other storage location, copy it onto your device memory, for example onto the SD card.Using whatever file explorer application you have installed, it is generally the case that simply tapping on the APK file will prompt you to decide whether you want to install it. If you do not have a file explorer program already, I would thoroughly recommend the free ES File Explorer, although there are loads of others that get great reviews too.
Once you have an app installed and want to update it manually, for example where you've refined an application you're testing, simply export a new APK, copy it onto the device again and browse to it, installing it in the same way you did the first time.
You can also install APK files using the Android SDK (Android Software Development Kit), but this is more complex. Here's a guide: Talk Android - A Guide To Installing APK Apps On Your Google Android Phone.
Do I need to Remove APK Files?
Remember that APK files and apps are two different things. The APK files contain the information necessary for your device to install the program, but once this has been done the APK file is no longer necessary. If you copied APK files for installation onto your device, you can safely delete these copies once the apps are installed.Links
The Developers Guide | Android DevelopersAndroid Developers Blog
Google Play
Android Things Blog
How To Uninstall Android Apps | The Tech Interpreter
What Are Android APK Files? | The Tech Interpreter
Frequently Asked Questions About Android Apps | The Tech Interpreter
Subscribe to:
Posts (Atom)
