| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Creating QC Android Apps using Eclipse

Page history last edited by Lee Barney 13 years, 3 months ago

 

There are two types of Android apps you can create.  The first is hybrid apps that allow you to write your entire application in JavaScript, HTML, and CSS.  The second is native apps where you right your application in Java.  Instructions for creating both types of apps are described here.  You will also find these instructions in the QuickConnectFamilyPC download from sourceForge.

 

 

Setting up Eclipse to create QuickConnect Android hybrid applications

 

1.     Install Eclipse, the Eclipse Android Plugin, and the Android SDK by following the instructions at http://developer.android.com

 

2.     Import the QuickConnect Android Base project into Eclipse by right clicking (or for Mac control clicking) in the Package Explorer and selecting Import->General->Existing Projects into Workspace.  Select the Base project found in the zip file you download from sourceForge.

 

Creating QuickConnect Android hybrid applications using JavaScript, HTML, and CSS

 

1.  Copy the Base project and paste it into the Eclipse Package Explorer view. 

2.  When asked for the name of the copied project replace the "copy of Base" reference with the name you wish your application to have.

3.  Expand the src->org.quick.connect package.

4.  Right click (or for Mac control click) on the QuickConnectActivity.java file and give it a name unique to your application (ex. XXXXActivity.java).

5.  Allow all changes to be made throughout the application.

6.  Edit the AndroidManifest.xml file, in textual view, and change the .QuickConnectActivity entry to .XXXXActivity to match the name from step 4.

7.  Delete this instruction text file.

8.  Write your application in the HTML, CSS, and JavaScript files found under the assets directory in the Package Explorer.  (SeeCross Platform Mobile Development with QuickConnect)

9.  Build and run.

 

 

 

 

Setting up Eclipse to create QuickConnect Android hybrid applications

 

1. Install Eclipse, the Eclipse Android Plugin, and the Android SDK by following the instructions at http://developer.android.com

 

 

Creating QuickConnect Android Native Java applications

 

1. Add the QCAndroidNative.jar file to your Build Path.

2. Copy the org.quickconnectfamily.QCCommandMappings.java file into your application.

3. put the following code in the onCreate method of the main Activity created for you by the Eclipse Android plugin.

 

QCCommandMappings.mapCommands();

/* 

//an example of how to call QC handleRequest

        self = this;

        Button aTestButton = (Button)findViewById(R.id.Button01);

 

 

        aTestButton.setOnClickListener(new OnClickListener() {

            public void onClick(View v) {

            ArrayList<Object> parameters = new ArrayList<Object>();

            parameters.add(self);

            QuickConnect.handleRequest("showDialog", parameters);

}

});

*/

3.  

4. Create Validation, Business, View, and Error Control Objects.  These inherit from org.quickconnectfamily.CommandObject.

5. Create mappings of your Control Objects to commands in the Add in listeners, etc. to make the calls to the triggering command.  (See the explanation on the QuickConnect wiki.)   As you map multiple Control Objects to one command your create a 'Control Stack'

6. Make your calls to QuickConnect.handleRequest, as seen in the sample above, passing in the command to execute the appropriate Control Stack as the first parameter.  The second parameter is an ArrayList of any other items you need to use in your Control objects.  Code executed using the handleRequest call is pre-threaded for you to maximize end user experience.

7. Build and run.

 

 

Comments (0)

You don't have permission to comment on this page.