[Guide][Beginners\Intermediate]Getting Started Windows8 Store Apps - C, C++, C# and Other Windows Phone Development

Windows 8 Store App Development
being fresh and a new ecosystem lacks apps a Microsoft is trying ever bi the can to get developers into it and offering some great opportunities.
Why windows 8?????
#1 Its free:
Unlike other platforms which require you to pay to publish applications on there stores Windows on the other hand doesn't ask you a cent to publish your apps
#2 Multilingual(Script Wise) Support:
If you know web development technologies, you can develop a Windows Store app using HTML5, Cascading Style Sheets, Level 3 (CSS3), and JavaScript.
If you have developed .NET, Windows Presentation Foundation, or Microsoft Silverlight applications, you can develop a Windows Store app using XAML, with code-behind in C++, C#, or Visual Basic.
If you know DirectX, you can develop a DirectX Windows Store app using native C++ and HLSL to take full advantage of graphics hardware.
Lets get started:
Windows 8 introduces a new type of application: the Windows Store app. Windows Store apps have a brand new look and feel, run on a variety of devices, and you sell them on the Windows Store.
You can develop Windows Store apps in a variety of languages as mentioned above.
This guide tells you why you want to develop Windows Store apps, where to get the tools you need, and how to build your first app
Note: Windows Store Apps can only be developed on windows 8
Get The Tools:
To develop Windows Store apps, you need to install Windows 8 and some developer tools. They are available for free #GenrousMicrosoft
1. Download Windows 8
Important as windows 8 apps only run on windows 8
2. Download Developer Tools
These a the only tools required to build store apps #win8+1
Not to mention the need no setup just installation is need and NO ADDITIONAL CONFIGURATION.
This download gives you Microsoft Visual Studio Express 2012 for Windows 8, Blend for Microsoft Visual Studio 2012 for Windows 8, the Windows 8 software development kit (SDK), and project templates for creating new Windows Store apps.
Visual Studio gives you everything you need to create code, debug, localize, package, and deploy a Windows Store app.
Blend is another tool you can use to create Windows Store apps. It provides effective support for designing a great-looking user interface for your Windows Store app.
Visual Studio and Blend were designed to work together. You can move seamlessly back and forth between them to develop your app.
Getting a developer license
Microsoft was smart enough and to prevent illicit acts it does not allows sideloading apps with exception to developers who will find handy.
To get your self approved as a developer you need to get a free developer licence which can be done via following methods.
Through Visual Studio
When you run Microsoft Visual Studio 2012 on your local machine for the first time, you are prompted to obtain a developer license. Read the license terms, and then click I Agree. In the User Account Control (UAC) dialog box, click Yes to continue.
After you install a license on a local machine, you won’t be prompted again on that machine unless the license expires (or you remove it) and you try to run an uncertified Windows Store app or create a project. You can run uncertified Windows Store apps on your local machine by pressing the F5 key in Microsoft Visual Studio or Blend for Microsoft Visual Studio 2012 for Windows 8.
Note If you choose not to acquire or renew a developer license, you'll receive an error (DEP0100) when you attempt to build or deploy a Windows Store app in Visual Studio.{Courtesy MSDN}
Getting a developer license at a command prompt
If you aren’t using Visual Studio 2012, you can get and manage developer licenses at a command prompt by running these commands in
Windows PowerShell:
Show-WindowsDeveloperLicenseRegistration. This command opens a dialog box from which you can get a developer license and install it on the local machine. To run this command, you must have a valid Microsoft account. You also must run this command in a command prompt with elevated permissions.
Get-WindowsDeveloperLicense. This command returns an object that has two properties: ExpirationTime and IsValid. ExpirationTime is a System.DateTime structure that contains the date and time when the license expires. IsValid is a System.Boolean that indicates whether the license is valid. You can run this command from either a non-elevated command prompt or a command prompt with elevated permissions.
Unregister-WindowsDeveloperLicense. This command warns you that some Windows Store apps will stop working if you remove the developer
license from the local machine. If you choose "Yes" (the default) to confirm that you want to remove the license, the license is removed from the local machine. You must run this command in a command prompt with elevated permissions.
Read full detaild artile #MSDN also for TNC

Time to say hello to HELLO WORLD!
Using Javascript and HTML with CSS
Follow These Great Tutorials On MSDN JavaScript and HTML
Using C# or with XAMLVisual Basic
For Android or Java Developer I prefer C#
Follow These Great Tutorials On MSDN C# or Visual Basic and XAML
Using C++ with XAML
My favorite preference.
Follow These Great Tutorials On MSDN C++ with XAML
Using C++ and DirectX
DirectX i dont know anything about it
Dont expect support on this by me altopgh others might be able to help.
Follow These Great Tutorials On MSDN C++ with DirectX

When you create an app, the first thing you need to do is decide which language to use. You can choose JavaScript, Visual Basic, Visual C#, or Visual C++.
To create a project for a Windows Store app, click File > New Project (or press Ctrl+Shift+N).
You'll see the New Project dialog box.
Click one of the language nodes in the left pane. You'll see various app templates in the center pane. Some important templates, like Blank App, Grid App, and Split App, are shared between all four programming languages. A few templates are language-specific.When you create a project for a Windows Store app, Visual Studio creates a solution, which is a way of managing the various source elements of your project (code files, images, style sheets, settings, and so on). A solution container can contain multiple projects, and a project container typically contains multiple items that represent the references, folders, and files that you need to create your app.
Solution Explorer displays solutions, their projects, and the items in those projects. In Solution Explorer, you can open files for editing, add new files to a project, and view solution, project, and item properties. Here's what Solution Explorer looks like for a JavaScript project: courtesy MSDN
In addition to source code files appropriate to the language, each project also includes the package.appxmanifest file, which describes the app package for Windows. Each project also includes several image files, like splashscreen.png for the splash screen image and storelogo.png, which is used for Windows Store. A project source certificate (.pfx) file that's required for signing the package is also included in each project.
Designing a UI
When you plan your user interface, it's important to select the most appropriate Visual Studio project template for a starting point, and to learn about adding re-usable item templates such as Search contracts. You can develop your UI by writing code or by using a visual designer. A visual designer provides a designer-oriented interface for app design that includes a drag-and-drop interface for building the UI.
For Windows Store apps, you can use the visual designer provided in Blend for Microsoft Visual Studio 2012 for Windows 8. You can open a Visual Studio project in Blend by right-clicking the project in Solution Explorer and clicking Open in Blend. Alternatively, open the solution file (.sln) from within Blend.
image courtesy MSDN:
Updating the app manifest
unlike android working on mainfest of win 8 apps is a breeze
You can use the Manifest Designer in Visual Studio to edit the app manifest file that describes your app package. The app manifest file is present in Windows Store apps written in all languages.
The Manifest Designer has five tabs:
Application UI. Configure UI settings, including the logo, splash screen, and initial orientation.
Capabilities. Specify system features or devices that your app can use, such as Internet access, current location, and music library access.
Declarations. Add declarations for app contracts, like search and share target contracts, and specify their properties.
Content URIs. Specify URIs that your app either can or can't access. This tab appears only for JavaScript projects.
Packaging. Set properties that identify and describe your package when it is deployed.
To open the Manifest Designer, double-click the package.appxmanifest file in Solution Explorer, or right-click the file and click View Designer. The Capabilities tab of the Manifest Designer is shown here:
image courtesy MSDN:
Writing code
Visual Studio Express 2012 for Windows 8 includes full-featured editors for the following languages: JavaScript, HTML/XML/XAML, CSS, C#, Visual Basic, C++, HLSL. The editors provide many language-specific features that you can customize to help create your app:
IntelliSense, which provides features such as statement completion and parameter Help as you type code. This illustration shows a member list in the C# Code Editor. Note that the list also displays a Quick Info box for the selected item.
image courtesy MSDN:
Using inellisense:
Code snippet insertion, available by right-clicking in a code file and clicking Insert Snippet.
Navigation aids like Go To Definition, Bookmarks, and Navigate To.
The Go To Definition command enables you to find the definition of a class or function by right-clicking the identifier and clicking Go To Definition. (Visual Basic and Visual C++ use the Object Browser to display information about Windows Runtime types.)
This illustration shows options like Go To Definition and Insert Snippet in the JavaScript Code Editor:
You can customize the behavior of the Code Editors, and enable or disable features like indentation, word wrap, and statement completion. To customize the behavior of the Code Editors, click Tools > Options, expand Text Editor, expand the appropriate Code Editor to configure, and then select the appropriate category of options.
Building an app
To build an app, click Build Solution (or press F7) or Rebuild Solution (or press Ctrl+Alt+F7) on the Build menu. You'll see the results of the build process in the Output window.
Debugging
Read The MSDN article

Blend for Visual Studio 2012 helps you design and build user interfaces by providing you with an accurate design surface and tools that let you visually create and edit Windows Store applications. These new design tools take advantage of Windows 8 technologies to create dynamic applications that run on a wide variety of Windows-based hardware. You can choose to design your user interface using HTML or XAML.
image courtesy MSDN:
Designing in HTML
Designing in XAML

A few Handy Links:
*Selling Apps
*Concepts and Architecture
*API Reference
*Language Reference
*Samples
Support My work:
Hit the thanks button in the op and/or all the posts you find useful.
Rate give 5* rating to this thread

publishing in windows is free??
will start it today...
thanks for the guide

It's FREE 100% NO HIDDEN COSTS
Sent from my GT-S5302 using Tapatalk 2
Hit Thanx Button if i helped you!

is it just like publishing in google play??
can we publish them as paid apps???

For paid apps I don't know but I ll let you know soon
Sent from my GT-S5302 using Tapatalk 2
Hit Thanx Button if i helped you!

okie will be waiting

So so sorry for being absent here but the answer to your query :
Yes Yes its free they'll charge you a small amount which will be refunded this is just to confirm that your payment source is authentic
More on this here.

Related

[Ultimate Guide][Part 10 released][12/11/2011]Android App Development - From Scratch

This for all those budding developers of android who are willing to develop for android but are unable to find the resources to do so. This tutorial is made my me and how i understood the whole deal. There will me many parts of this. I will keep updating with new development.
If this thread is useful to u plz hit thanks
Buy me a beer DONATE
PLZ VOTE THE THREAD
PART I
INTRODUCTION
Despite the name, Android will not help you create an unstoppable army of emotionless robot warriors on a relentless quest to cleanse the earth of the scourge of humanity. Instead, Android is an open source software stack that includes the operating system, middleware, and key applications along with a set of API libraries for writing mobile applications that can shape the look, feel, and function of mobile handsets.
As a disruptive addition to a mature field, it’s not hard to see why there has been some confusion about
what exactly Android is. Android is not:
A Java ME implementation Android applications are written using the Java language, but
they are not run within a Java ME virtual machine, and Java-compiled classes and executable
will not run natively in Android.
Part of the Linux Phone Standards Forum (LiPS) or the Open Mobile Alliance
Android runs on an open source Linux kernel, but, while their goals are similar,
Android’s complete software stack approach goes further than the focus of these standardsdefi
ning organizations.
Simply an application layer (like UIQ or S60) While it does include an application layer,
“Android” also describes the entire software stack encompassing the underlying operating system,
API libraries, and the applications themselves
Android is made up of several necessary and dependent parts including the following:
1. A hardware reference design that describes the capabilities required of a mobile device in order to support the software stack
2. A Linux operating system kernel that provides the low-level interface with the hardware, memory management, and process control, all optimized for mobile devices
3. Open source libraries for application development including SQLite, WebKit, OpenGL, and a media manager
4. A run time used to execute and host Android applications, including the Dalvik virtual machine and the core libraries that provide Android specific functionality. The run time is designed to be small and efficient for use on mobile devices.
5. An application framework that agnostically exposes system services to the application layer,including the window manager, content providers, location manager, telephony, and peer-to-peer services
6. A user interface framework used to host and launch applications
7. Preinstalled applications shipped as part of the stack
8. A software development kit used to create applications, including the tools, plug-ins, and documentation.
Android SDK Features
As an application-neutral platform, Android gives you the opportunity to create applications that are as much a part of the phone as anything provided out of the box. The following list highlights some of the most noteworthy Android features:
1. No licensing, distribution, or development fees
2. Wi-Fi hardware access
3. GSM, EDGE, and 3G networks for telephony or data transfer, allowing you to make or receive calls or SMS messages, or to send and retrieve data across mobile networks
4. Comprehensive APIs for location-based services such as GPS
5. Full multimedia hardware control including playback and recording using the camera and microphone
6. APIs for accelerometer and compass hardware
7. IPC message passing
8. Shared data stores
9. An integrated open source WebKit-based browser
10. Full support for applications that integrate Map controls as part of their user interface
11. Peer-to-peer (P2P) support using Google Talk
12. Mobile-optimized hardware-accelerated graphics including a path-based 2D graphics library and support for 3D graphics using OpenGL ES.
13. Media libraries for playing and recording a variety of audio/video or still image formats
14. An application framework that encourages reuse of application components and the replacement of native applications
SQLite Database for Data Storage and Retrieval
Android provides a lightweight relational database for each application using SQLite. Your applications can take advantage of the managed relational database engine to store data securely and efficiently.
By default, each application database is sandboxed — its content is available only to the application that created it — but Content Providers supply a mechanism for the managed sharing of these application databases
Extensive Media Support and 2D/3D Graphics
Bigger screens and brighter, higher-resolution displays have helped make mobiles multimedia devices.
To make the most of the hardware available, Android provides graphics libraries for 2D canvas drawing and 3D graphics with OpenGL.
Android also offers comprehensive libraries for handling still images, video, and audio fi les including the MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, and GIF formats.
The Android Software Development Kit (SDK)
The Android software development kit (SDK) includes everything you need to start developing, testing, and debugging Android applications. Included in the SDK download are:
1. The Android APIs The core of the SDK is the Android API libraries that provide developer access to the Android stack. These are the same libraries used at Google to create native Android applications.
2. Development Tools To turn Android source code into executable Android applications, the SDK includes several development tools that let you compile and debug your applications. You will learn more about the developer tools in Chapter 2.
3. The Android Emulator The Android Emulator is a fully interactive Android device emulator featuring several alternative skins. Using the emulator, you can see how your applications will look and behave on a real Android device. All Android applications run within the Dalvik VM so that the software emulator is an excellent environment — in fact, as it is hardware-neutral, it provides a better independent test environment than any single hardware implementation.
4. Full Documentation The SDK includes extensive code-level reference information detailing exactly what’s included in each package and class and how to use them. In addition to the code documentation, Android’s reference documentation explains how to get started and gives detailed explanations of the fundamentals behind Android development.
5. Sample Code The Android SDK includes a selection of sample applications that demonstrate some of the possibilities available using Android, as well as simple programs that highlight how to use individual API features.
6. Online Support Despite its relative youth, Android has generated a vibrant developer community.
Understanding the Android Software Stack
The Android software stack is composed of the elements shown in Figure 1-1 and described in further detail below it. Put simply, a Linux kernel and a collection of C/C++ libraries are exposed through an application framework that provides services for, and management of, the run time and applications.
1. Linux Kernel Core services (including hardware drivers, process and memory management, security, network, and power management) are handled by a Linux 2.6 kernel. The kernel also provides an abstraction layer between the hardware and the remainder of the stack.
2. Libraries Running on top of the kernel, Android includes various C/C++ core libraries such
as libc and SSL, as well as:
I. A media library for playback of audio and video media
II. A Surface manager to provide display management
III. Graphics libraries that include SGL and OpenGL for 2D and 3D graphics
IV. SQLite for native database support
V. SSL and WebKit for integrated web browser and Internet security
3. Android Run Time What makes an Android phone an Android phone rather than a mobile Linux implementation is the Android run time. Including the core libraries and the Dalvik virtual Machine, the Android run time is the engine that powers your applications and, along with the libraries, forms the basis for the application framework.
4. Core Libraries While Android development is done in Java, Dalvik is not a Java VM. The core Android libraries provide most of the functionality available in the core Java libraries as well as the Android-specific libraries.
I. Dalvik Virtual Machine Dalvik is a register-based virtual machine that’s been optimized to ensure that a device can run multiple instan
PART II
All you need to start writing your own Android applications is a copy of the Android SDK and the Java development kit. Unless you’re a masochist, you’ll probably want a Java IDE — Eclipse is particularly well supported — to make development a little easier.
Versions of the SDK, Java, and Eclipse are available for Windows, Mac OS, and Linux, so you can explore Android from the comfort of whatever OS you favor. The SDK includes an emulator for all three OS environments, and because Android applications are run on a virtual machine, there’s no advantage to developing from any particular operating system.
Android code is written using Java syntax, and the core Android libraries include most of the features from the core Java APIs. Before they can be run, though, your projects are first translated into Dalvik byte code. As a result, you get the benefits of using Java, while your applications have the advantage of running on a virtual machine optimized for Android devices.
The SDK download includes all the Android libraries, full documentation, and excellent sample applications. It also includes tools to help you write and debug your applications, like the Android Emulator to run your projects and the Dalvik Debug Monitoring Service (DDMS) to help debug them.
Needed
Because Android applications run within the Dalvik virtual machine, you can write them on any platform that supports the developer tools. This currently includes the following:
❑ Microsoft Windows (XP or Vista)
❑ Mac OS X 10.4.8 or later (Intel chips only)
❑ Linux
To get started, you’ll need to download and install the following:
❑ The Android SDK
❑ Java Development Kit (JDK) 5 or 6
You can download the latest JDK from Sun at
http://java.sun.com/javase/downloads/index.jsp
If you already have a JDK installed, make sure that it meets the version requirements listed above, and
note that the Java runtime environment (JRE) is not sufficient
.
Downloading and Installing the SDK
The Android SDK is completely open. There’s no cost to download and use the API, and Google doesn’t charge to allow distribution of your finished programs. You can download the latest version of the SDK for your development platform from the Android development home page at-
http://code.google.com/android/download.html
The SDK is presented as a ZIP fi le containing the API libraries, developer tools, documentation, and several sample applications and API demos that highlight the use of particular API features. Install it by unzipping the SDK into a new folder. (Take note of this location, as you’ll need it later.) The examples and step-by-step instructions provided are targeted at developers using Eclipse with the Android Developer Tool (ADT) plug-in. Neither is required, though — you can use any text editor or Java IDE you’re comfortable with and use the developer tools in the SDK to compile, test, and debug the code snippets and sample applications.
If you’re planning to use them, the next sections explain how to set up Eclipse and the ADT plug-in as your Android development environment. Later in the chapter, we’ll also take a closer look at the developer tools that come with the SDK, so if you’d prefer to develop without using Eclipse or the ADT plugin, you’ll particularly want to check that out.
Developing with Eclipse
Using Eclipse with the ADT plug-in for your Android development offers some significant advantages. Eclipse is an open source IDE (integrated development environment) particularly popular for Java development. It’s available to download for each of the development platforms supported by Android (Windows, Mac OS, and Linux) from the Eclipse foundation homepage:
www.eclipse.org/downloads/
There are many variations available when selecting your Eclipse download; the following is the recommended configuration for Android:
❑ Eclipse 3.3, 3.4 (Ganymede)
❑ Eclipse JDT plug-in
❑ WST
WST and the JDT plug-in are included in most Eclipse IDE packages.
Installing Eclipse consists of uncompressing the download into a new folder. When that’s done, run the Eclipse executable. When it starts for the first time, create a new workspace for your Android development.
Using the Eclipse Plug-in
The ADT plug-in for Eclipse simplifies your Android development by integrating the developer tools, including the emulator and .class-to-.dex converter, directly into the IDE. While you don’t have to use the ADT plug-in, it does make creating, testing, and debugging your applications faster and easier.
The ADT plug-in integrates the following into Eclipse:
❑ An Android Project Wizard that simplifi es creating new projects and includes a basic application template
❑ Forms-based manifest, layout, and resource editors to help create, edit, and validate your XML resources
❑ Automated building of Android projects, conversion to Android executables (.dex), packaging to package fi les (.apk), and installation of packages onto Dalvik virtual machines
❑ The Android Emulator, including control of the emulator’s appearance, network connection settings, and the ability to simulate incoming calls and SMS messages
❑ The Dalvik Debug Monitoring Service (DDMS), which includes port forwarding; stack, heap, and thread viewing; process details; and screen capture facilities
❑ Access to the device or emulator’s fi lesystem, allowing you to navigate the folder tree and transfer files
❑ Runtime debugging, so you can set breakpoints and view call stacks
❑ All Android/Dalvik log and console outputs
Installing the ADT Plug-in
Install the developer tools plug-in by the following steps:
1. Select Help ➪ Software Updates ➪ Find and Install … from within Eclipse.
2. In the resulting dialog box, choose Search for new features to install.
3. Select New Remote Site, and enter the following address into the dialog box, and enter-
https://dl-ssl.google.com/android/eclipse/
4. The new site you entered should now be checked. Click Finish.
5. Eclipse will now download the plug-in. When it’s fi nished, select Android Plugin ➪ Developer Tools from the resulting Search Results dialog box, and click Next.
6. Read and then Accept the terms of the license agreement, and click Next and then Finish. As the ADT plug-in is not signed, you’ll be prompted before the installation continues.
7. When complete, you’ll have to restart Eclipse and update the ADT preferences. Restart and select Window ➪ Preferences … (or Eclipse ➪ Preferences for the Mac OS).
8. Then select Android from the left panel.
9. Click Browse …, and navigate to the folder into which you unzipped the Android SDK, then click Apply and OK.
If u have an installation error of org.eclipse.wst.sse.ui. then insatall software from the following-
Eclipse 3.6 (Helios):http://download.eclipse.org/releases/helios
Eclipse 3.5 (Galileo):http://download.eclipse.org/releases/galileo
Eclipse 3.4 (Ganymede):http://download.eclipse.org/releases/ganymede/
Updating the Plug-in
As the Android SDK matures, there are likely to be frequent updates to the ADT plug-in. In most cases, to update your plug-in, you simply:
1. Navigate to Help ➪ Software Updates ➪ Find and Install …
2. Select Search for updates of the currently installed features, and click Finish …
3. If there are any ADT updates available, they will be presented. Simply select them and choose Install.
Sometimes a plug-in upgrade is so significant that the dynamic update mechanism can’t be used. In those cases, you may have to remove the previous plug-in completely before installing the newer version as described in the previous section.
Starting a new project
To create a new Android project using the Android New Project Wizard:
1. Select File ➪ New ➪ Project.
2. Select the Android Project application type from the Android folder, and click Finish.
3. In the dialog that appears, enter the details for your new project. The “Project name” is the name of your project fi le; the “Package name” specifies its package; the “Activity name” is the name of the class that is your initial Activity; and the “Application name” is the friendly name for your application.
4. When you’ve entered the details, click Finish.
The ADT plug-in then creates a new project that includes a new class that extends Activity. Rather than being completely empty, the default template implements “Hello World.” Before modifying the project, take this opportunity to configure run and debug launch configurations.
Creating a Launch Configuration
Launch configurations let you specify runtime options for running and debugging applications. Using
a launch configuration you can specify the following:
❑ The Project and Activity to launch
❑ The emulator options to use
❑ Input/output settings (including console defaults)
You can specify different launch configurations for Run and Debug modes. The following steps show how to create a launch configuration for an Android application:
1. Select Run ➪ Open Run Dialog … (or Run ➪ Open Debug Dialog …).
2. Right-click Android Application on the project type list, and select New.
3. Enter a name for the configuration. You can create multiple configurations for each project, so create a descriptive title that will help you identify this particular setup.
4. Now choose your start-up options. The first (Android) tab lets you select the project and Activity that you want to start when you run (or debug) the application.
5. Use the Target tab to configure the emulator. There are options to choose the screen size, device skin, and network connection settings. You can also optionally wipe the user data on the emulator and enable or disable the start-up animation. Using the command-line textbox, you can specify additional emulator start-up options if needed.
6. Finally, set any additional properties in the Common tab.
7. Click Apply, and your launch configuration will be saved
Running and Debugging Your Android Applications
You’ve created your first project and created the run and debug configurations for it. Before making any changes, test your installation and configurations by running and debugging the Hello World project. From the Run menu, select Run or Debug to launch the most recently selected configuration, or select Open Run Dialog … or Open Debug Dialog … to select a configuration to use.
If you’re using the ADT plug-in, running or debugging your application:
❑ Compiles the current project and converts it to an Android executable (.dex).
❑ Packages the executable and external resources into an Android package (.apk).
❑ Starts the emulator (if it’s not already running).
❑ Installs your application onto the emulator.
❑ Starts your application.
If you’re debugging, the Eclipse debugger will then be attached, allowing you to set breakpoints and debug your code.
Understanding the app
With that confirmed, let’s take a step back and have a real look at your first Android application. Activity is the base class for the visual, interactive components of your application; it is roughly equivalent to a Form in traditional desktop development. The following snippet shows the skeleton code for an Activity-based class; note that it extends Activity, overriding the onCreate method.
package com.paad.helloworld;
import android.app.Activity;
import android.os.Bundle;
public class HelloWorld extends Activity {
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
}
}
What’s missing from this template is the layout of the visual interface. In Android, visual components are called Views, which are similar to controls in traditional desktop development.
In the Hello World template created by the wizard, the onCreate method is overridden to call setContentView, which lays out the user interface by inflating a layout resource, as highlighted below:
#Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
}
The resources for an Android project are stored in the res folder of your project hierarchy, which includes drawable, layout, and values subfolders. The ADT plug-in interprets these XML resources to provide design time access to them through the R variable.
The following code snippet shows the UI layout defined in the main.xml fi le created by the Android project template:
<?xml version=”1.0” encoding=”utf-8”?>
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”
androidrientation=”vertical”
android:layout_width=”fill_parent”
android:layout_height=”fill_parent”>
<TextView
android:layout_width=”fill_parent”
android:layout_height=”wrap_content”
android:text=”Hello World, HelloWorld”
/>
</LinearLayout>
Defining your UI in XML and inflating it is the preferred way of implementing your user interfaces, as it neatly decouples your application logic from your UI design. To get access to your UI elements in code, you add identifier attributes to them in the XML definition. You can then use the findViewById method to return a reference to each named item. The following XML snippet shows an ID attribute added to the TextView widget in the Hello World template:
<TextView
android:id=”#+id/myTextView”
android:layout_width=”fill_parent”
android:layout_height=”wrap_content”
android:text=”Hello World, HelloWorld”
/>
And the following snippet shows how to get access to it in code:
TextView myTextView = (TextView)findViewById(R.id.myTextView);
Alternatively, if you need to, you can create your layout directly in code as shown below:
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
LinearLayout.LayoutParams lp;
lp = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT ,
LayoutParams.FILL_PARENT);
LinearLayout.LayoutParams textViewLP;
textViewLP = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT ,
LayoutParams.WRAP_CONTENT);
LinearLayout ll = new LinearLayout(this);
ll.setOrientation(LinearLayout.VERTICAL);
TextView myTextView = new TextView(this);
myTextView.setText(“Hello World, HelloWorld”);
ll.addView(myTextView, textViewLP);
this.addContentView(ll, lp);
}
All the properties available in code can be set with attributes in the XML layout. As well as allowing easier substitution of layout designs and individual UI elements, keeping the visual design decoupled from the application code helps keep the code more concise.
Types of Android Applications
Most of the applications you create in Android will fall into one of the following categories:
❑ Foreground Activity An application that’s only useful when it’s in the foreground and is effectively suspended when it’s not visible.
❑ Background Service An application with limited interaction that, apart from when being configured, spends most of its lifetime hidden.
❑ Intermittent Activity Expects some interactivity but does most of its work in the background. Often these applications will be set up and then run silently, notifying users when appropriate.
Complex applications are difficult to pigeonhole into a single category and include elements of all three. When creating your application, you need to consider how it’s likely to be used and then design it accordingly. Let’s look more closely at some of the design considerations for each application type described above.
Foreground Activities
When creating foreground applications, you need to consider the Activity life cycle carefully so that the Activity switches seamlessly between the foreground and the background. Applications have no control over their life cycles, and a backgrounded application, with no Services,is a prime candidate for cleanup by Android’s resource management. This means that you need to save the state of the application when the Activity becomes invisible, and present the exact same state when
it returns to the foreground.
Background Services
These applications run silently in the background with very little user input. They often listen for messages or actions caused by the hardware, system, or other applications, rather than rely on user interaction. It’s possible to create completely invisible services, but in practice, it’s better form to provide at least some sort of user control. At a minimum, you should let users confirm that the service is running and let them configure, pause, or terminate it as needed.
Intermittent Activities
Often you’ll want to create an application that reacts to user input but is still useful when it’s not the active foreground Activity. These applications are generally a union of a visible controller Activity with an invisible background Service.
These applications need to be aware of their state when interacting with the user. This might mean updating the Activity UI when it’s visible and sending notifications to keep the user updated when it’s in the background.
Android Development Tools
The Android SDK includes several tools and utilities to help you create, test, and debug your projects. For more detail than is included here, check out the Android documentation at:
http://code.google.com/android/intro/tools.html
As mentioned earlier, the ADT plug-in conveniently incorporates most of these tools into the Eclipse IDE, where you can access them from the DDMS perspective, including:
❑ The Android Emulator An implementation of the Android virtual machine designed to run on your development computer. You can use the emulator to test and debug your android applications.
❑ Dalvik Debug Monitoring Service (DDMS) Use the DDMS perspective to monitor and control the Dalvik virtual machines on which you’re debugging your applications.
❑ Android Asset Packaging Tool (AAPT) Constructs the distributable Android package files (.apk).
❑ Android Debug Bridge (ADB) The ADB is a client-server application that provides a link to a running emulator. It lets you copy files, install compiled application packages (.apk), and run shell commands.
The following additional tools are also available:
❑ SQLite3 A database tool that you can use to access the SQLite database fi les created and used by Android
❑ Traceview Graphical analysis tool for viewing the trace logs from your Android application
❑ MkSDCard Creates an SDCard disk image that can be used by the emulator to simulate an external storage card.
❑ dx Converts Java .class bytecode into Android .dex bytecode.
❑ activityCreator Script that builds Ant build fi les that you can then use to compile your Android applications without the ADT plug-in
The Android Emulator
The emulator is the perfect tool for testing and debugging your applications, particularly if you don’t have a real device (or don’t want to risk it) for experimentation. The emulator is an implementation of the Dalvik virtual machine, making it as valid a platform for running
Android applications as any Android phone. Because it’s decoupled from any particular hardware, it’s an excellent baseline to use for testing your applications. A number of alternative user interfaces are available to represent different hardware configurations, each with different screen sizes, resolutions, orientations, and hardware features to simulate a variety
of mobile device types. Full network connectivity is provided along with the ability to tweak the Internet connection speed and
latency while debugging your applications.
The ADT plug-in integrates the emulator into Eclipse so that it’s launched automatically when you run or debug your projects. If you aren’t using the plug-in or want to use the emulator outside of Eclipse, you can telnet into the emulator and control it from its console.
Dalvik Debug Monitor Service (DDMS)
The emulator lets you see how your application will look, behave, and interact, but to really see what’s happening under the surface, you need the DDMS. The Dalvik Debug Monitoring Service is a powerful debugging tool that lets you interrogate active processes, view the stack and heap, watch and pause active threads, and explore the file system of any active emulator. The DDMS perspective in Eclipse also provides simplified access to screen captures of the emulator and the logs generated by LogCat.
If you’re using the ADT plug-in, the DDMS is fully integrated into Eclipse and is available from the DDMS perspective. If you aren’t using the plug-in or Eclipse, you can run DDMS from the command line, and it will automatically connect to any emulator that’s running.
The Android Debug Bridge (ADB)
The Android debug bridge (ADB) is a client-service application that lets you connect with an Android Emulator or device. It’s made up of three components: a daemon running on the emulator, a service that runs on your development hardware, and client applications (like the DDMS) that communicate with the daemon through the service.
As a communications conduit between your development hardware and the Android device/emulator, the ADB lets you install applications, push and pull files, and run shell commands on the target device. Using the device shell, you can change logging settings, and query or modify SQLite databases available on the device.
The ADT tool automates and simplifies a lot of the usual interaction with the ADB, including application installation and update, log files, and file transfer (through the DDMS perspective). To learn more about what you can do with the ADB, check out the documentation at http://code.google.com/android/reference/adb.html.
PART III
Creating Applications and Activities
Before you start writing Android applications, it’s important to understand how they’re constructed and have an understanding of the Android application life cycle. In this chapter, you’ll be introduced to the loosely coupled components that make up Android applications (and how they’re bound together using the Android manifest).
Android applications consist of loosely coupled components, bound using a project manifest that describes each component and how they interact. There are six components that provide the building blocks for your applications:
❑ Activities Your application’s presentation layer. Every screen in your application will be an extension of the Activity class. Activities use Views to form graphical user interfaces that display information and respond to user actions. In terms of desktop development, an Activity is equivalent to a Form.
❑ Services The invisible workers of your application. Service components run invisibly, updating your data sources and visible Activities and triggering Notifications. They’re used to perform regular processing that needs to continue even when your application’s Activities aren’t active or visible.
❑ Content Providers A shareable data store. Content Providers are used to manage and share application databases. Content Providers are the preferred way of sharing data across application boundaries. This means that you can configure your own Content Providers to permit access from other applications and use Content Providers exposed by others to access their stored data. Android devices include several native Content Providers that expose useful databases like contact information.
❑ Intents A simple message-passing framework. Using Intents, you can broadcast messages system- wide or to a target Activity or Service, stating your intention to have an action performed. The system will then determine the target(s) that will perform any actions as appropri

Google API for Java

I'm relatively new to programming and am currently learning Java.
Google provides their API in Java for their various products. I downloaded it, followed the instructions to use ANT to get it all ready to go, but I'm stuck on how to actually start using it. I can't get their libraries to import into my programs using the JVM compiler. It just says a bunch of, "that package doesn't exist", and things of that nature. I can't even get Google's sample code to load any of the API packages.
How does one actually use the API once it's all extracted and in the C:\Program Files\Java\gdata folder? Can I not use the JVM compiler? I had to use ANT to set it all up... does that mean I have to somehow use ANT to use the API? I'm a little confused.
If somebody could write up a step-by-step on how to start using the API, that would be so awesome.
Judging from your post, you seem to be referring to the GData APIs. It's worth noting that Google is pushing Google APIs Client Library for Java for all new Google JSON APIs.
These APIs + samples are built with Maven2 and are pretty easy to setup.
Also judging from your post, you might want to get up to speed with basic java stuff like project setup in your IDE (Eclipse / IntelliJ ?), Build tools (Maven / ANT). Learn those things first before getting into the Google APIs. Go to the maven site and see how you can build a simple project. See how to import that project in Eclipse, and checkout the Maven plugin for Eclipse.
Most of the samples for Google APIs Client Library for Java (ex: The Books API Sample) provide step by step instructions on how to get things up and running (starting with checking out the code from the google versioning control to building it and running the sample on your environment).
Hijacking this threat a bit, but I'm also learning about APIs, Facebook and Twitter in particular.
With regard to android and java, I've done the tutorial for logging into facebook and posting basic status update but don't really understand the code; which parts are the API?
Really appreciate it if you could point me to another thread or site that explains how to use the API. I'm stuck on how to create a method that does event creation for facebook.
Thanks in advance!

Developer affiliate program for windows mobile developer

Developer affiliate program for windows mobile developer
If you want to sell your software for mobile devices and have get the highest earnings on the web you have come to the right website.
The available platforms are Windows Mobile, iPhone, BlackBerry and Symbian.
In order to submit the software in our catalogue and thus begin to sell, just send an e-mail to the address allinone.zucchelli#gmail.com This e-mail address is being protected from spambots. You need JavaScript enabled to view it with the following information:
· The installation file, if possible in an installation format. (For windows mobile see for example Pocket PC Installation Creator free licence for generating cab files)
· A description of your application
· The application language
· The price at which you intend to sell the software
· An image of presentation which will appear on our catalogue
· If necessary, system requirements such as compact framework, for example
· The devices compatible with this type of application
Within 24 hours our team will insert your application in our catalogue in the category best suited to it.
For each piece of software sold you will receive a notification e-mail and will furthermore receive a report of the sale with the amount you have earned.
Payments are made once the software amount reaches 100€, and the method of payment will be chosen by the developer him/herself.
All In One Pocket PC also reserves the right to ask the developers for support in the case of problems with the applications sold.
Thanks
http://www.allinonepocketpc.com
it's fantastic

Security for windows phone app

I am developing an enterprise application for my client. Now client has demanded to apply security to my code like obfuscation of the code so that when hacker got .xap file and tries to decompile it, code should be displayed in unreadable format like proguard in android.
I have tried may things like "preemptive dotfuscator and analytics" option from "tools" in visual studio. I have applied process successfully but after checking decompilation output. code was still in readable format . it has converted needless things like giving integer value to static constants fields .
I want to know exact steps for obfuscation, i don't want theory about it as there is plenty of theory available on microsoft developer website.

creating a WP10 app online

well, i come from android and still use it.
Now i bought me a Lumia 520 as mp3 player (as a 32gb microSD and the lumia is much cheaper than ANY mp3-player of size 16gb +)
I successfully upgraded my Lumia tp Win10 preview and kinda like it.
Now i'm about to personalize the lumia for my needs as mp3-player/navigation and maybe some internet features. (like local transoirtation).
So far so good, now i thought "why not have an app where i can view my website on one click?" "or how about a custom running order app for a concert?" (without any programming knowledge).
On android, there is no problem: http://www.appsgeyser.com/create-url-app/
Appsgeyser lets me create an embedded Website or a "list of information" at one click with custim icons, theming, ect for free with easy to use layout and no programming knowledge.
Now i looked, if there is something like that for Windows Phone 10. Well the windows 10 app studio by Microsoft seems to have some of the features. (listing, theming, rss-feed, yet no embedding of an existing web-page), but it is yet not open / not supported for WP10.
Maybe some of you have stumbled over such a website. It has to be free and does not need many skinning/menu features. A simple list or website-embed is enough for me.
Thanks in advance.
Update: I've tried a bit more and found a solution:
Just create Windows Phone 8.1 Apps in the appstudio.
Download your file (appx) and send it to your livemail account linked to your phone.
Have a QR code scanner and scan the QR code for the "Install Windows Phone 8.1 Certificate".
Open the downloaded/scanned link on your phone and login to your live account and you'll get a file.
Open that file and you'll be prompted for some Microsoft Developer something or similar. Allow it.
Now open your email with the sent file you send yourself per mail ^ and open the appx and it should install.
Then you have your new own WP app.

Categories

Resources