Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Regular Contributor
manikantan
Posts: 63
Registered: ‎11-27-2010
My Device: -
My Carrier: -

Problems while publishing

[ Edited ]

I have completed an application for the Playbook and it runs well in the Debug mode (from Flash Builder) on the simulator. However, when I changed the configurations in RUN, and the background changes to Black. (happened after I created the XML file). My application background was white.

My .as file has the code to dictate that backgroundd should be white.

[SWF(width="1024", height="600", backgroundColor="#ffffff", frameRate="30")]

Can someone tell me if I am missing something ?

 

Also, since the application is complete, I wish to put in the market and compete for the free playbook. Can someone point to a document that describes the procedure to package/sign the application and take it to the Blackberry stores ?

 

Thanks..

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Problems while publishing

[ Edited ]

hey manikantan,

 

that is rather unusual. i want you to do perform the following steps and see what happens. first i want you to create a new application (attached sample code below) and go through the same procedure as you did to to your application (debug, then do the run configuration, etc). Do this exactly as you did your orignial application. Finally see the output. Has the background on this also changed? It should yeild a yellow background. The attached code below is a toggle switch test from another thread. I've run through all the steps including the run configuration and it always outputs a yellow background.

 

 

package
{
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.MouseEvent;
	
	import qnx.ui.buttons.ToggleSwitch;
	import qnx.ui.events.SliderEvent;
	
	[SWF(width="1024",height="600",backgroundColor="#FFFF00",frameRate="30")]
	public class ToggleSwitchTest extends Sprite
	{		
		private var toggle:ToggleSwitch;

		public function ToggleSwitchTest()
		{
			super();
			
			// support autoOrients
			stage.align = StageAlign.TOP_LEFT;
			stage.scaleMode = StageScaleMode.NO_SCALE;
			
			toggle = new ToggleSwitch();
			
			/*
			 * We are accounting for both actions slide and click
			*/
			
			toggle.addEventListener(SliderEvent.START, startToggle);
			toggle.addEventListener(MouseEvent.CLICK, clickChange);
			
			addChild(toggle);
			
		}
		public function clickChange(e:MouseEvent):void
		{
			/*
			 * This function receives the MouseEvent.Click event when the user
			 * decides to click on the slider instead of swiping it
			 * The value is the ending position of the slider not
			 * not revealed selection so we have to do an inverse of the
			 * ToggleSwitch's value (e.g. 0 == False and 100 == True);
			*/
			trace("Click Result: " + !(toggle.value));
		}
		public function startToggle(e:SliderEvent):void
		{
			/*
			 * We have to start listening to the END event to find
			 * the final position of the ToggleSwitch
			*/
			toggle.addEventListener(SliderEvent.END, endToggle);
		}
		public function endToggle(e:SliderEvent):void
		{
			trace("Ended: " + toggle.value);
			
			/*
			 * Depending on the last position of the slider switch, the value
			 * is between 0 and 100. If the last position is between 
			 * 0 and 49 the slider goes to poistion 1 (True) but when
			 * the slider is on the 1 (True) the ToggleSwitch's actual selection
			 * is 0 (False) (toggle.value = slider position)
			*/
			if (toggle.value < 50)
			{
				trace("Value should be false");
			}
			else
			{			
				/*
				* Depending on the last position of the slider switch, the value
				* is between 0 and 100. If the last position is between 
				* 50 and 100 the slider goes to poistion 0 (False) but when
				* the slider is on the 0 (False) the ToggleSwitch's actual selection
				* is 1 (True) (toggle.value = slider position)
				*/
				trace("Value should be true");
			}
			toggle.removeEventListener(SliderEvent.END, endToggle);
		}

	}
}

 

 

 

As for the submitting process they currently do not require that you sign your apps nor do they recommend it because they havent made it available to accomplish yet. So you simply take the bar file unsigned and upload it to their website. Here is a link with further details of what to do with the bar file:

 

http://devblog.blackberry.com/2010/12/submit-playbook-apps-to-app-world/#more-2877

 

hope that helps. good luck!

 

Edit: Also can you post the XML file from your original application that you created.

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Problems while publishing

[ Edited ]

You may need to post more code for us to help out.  The parameters to your root Sprite is probably not sufficient to know what may have occured.

 

You need to register in the BB vendor portal here:

https://appworld.blackberry.com/isvportal/home/login.seam;jsessionid=69E3157EB09C6CB3CD319C530484C2D...

 

You can upload your BAR file after you have been registered.  Signing has not occured yet.  BB was suppose to release the signing tool and procedure on 12/15, but they have not done so yet.  You can submit your applications unsigned for now, but will be required to resubmit once the signing tool and procedure has been published.

 

Please use plain text.
Developer
Zymatic
Posts: 144
Registered: ‎12-18-2010
My Device: Limited Edition Z10 & Blackberry Playbook
My Carrier: Rogers Wireless

Re: Problems while publishing

You mentioned that the background only started to turn black after you created the xml file,  is it possible that the application is not being set to visible, either through your .as file or the xml file?  Look for the line containing the <visible></visible>  tags and make sure it is uncommented and place the word true between them like this:  <visible>true</visible>.

 

Not sure if thats your problem but its worth a look.

 

Zymatic

Playbook Apps:
Touch Painter, LinkShrink

BB10 Apps:
NoteToSelf , LinkShrink
Please use plain text.
Regular Contributor
manikantan
Posts: 63
Registered: ‎11-27-2010
My Device: -
My Carrier: -

Re: Problems while publishing

I have sent u a pvt message, requesting your email address so that we can exchange files .

Thanks for your help.

Please use plain text.
Regular Contributor
manikantan
Posts: 63
Registered: ‎11-27-2010
My Device: -
My Carrier: -

Re: Problems while publishing

I ran the application using desktop(standalone) Flash player and background is still white. Its only when I load it onto the simulator that the background changes.

 

Does it have anything to do with AIR's app.xml file ?

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Problems while publishing

hey manikantan,

 

we would need to look at the XML file to know for sure. but quick question, is it just hte background that changes? can you see all your other elements?

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Regular Contributor
manikantan
Posts: 63
Registered: ‎11-27-2010
My Device: -
My Carrier: -

Re: Problems while publishing

Yes, it is only the background that changes.

 

Here is my App XML ->

 

 

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/2.5">

<!-- Adobe AIR Application Descriptor File Template.

	Specifies parameters for identifying, installing, and launching AIR applications.

	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.5
			The last segment of the namespace specifies the version 
			of the AIR runtime required for this application to run.
			
	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
			the application. Optional.
-->

	<!-- A universally unique application identifier. Must be unique across all AIR applications.
	     Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
	<id>TED</id>

	<!-- Used as the filename for the application. Required. -->
	<filename>TED</filename>

	<!-- The name that is displayed in the AIR application installer. 
	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
	<name>TED</name>
	
	<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade. 
	     An updated version of application must have a versionCode value higher than the previous version. Required for namespace >= 2.5 . -->
	<versionNumber>1.0.0</versionNumber>
		         
	<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
	<!-- <versionLabel></versionLabel> -->

	<!-- Description, displayed in the AIR application installer.
	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
	<!-- <description>This is an example that fetches the latest videos from TED.</description> -->

	<!-- Copyright information. Optional -->
	<!-- <copyright></copyright> -->

	<!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
	<!-- <publisherID></publisherID> -->

	<!-- Settings for the application's initial window. Required. -->
	<initialWindow>
		<!-- The main SWF or HTML file of the application. Required. -->
		<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
		<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
		
		<!-- The title of the main window. Optional. -->
		<!-- <title></title> -->

		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
		<!-- <systemChrome></systemChrome> -->

		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
		<!-- <transparent></transparent> -->

		<!-- Whether the window is initially visible. Optional. Default false. -->
		<!-- <visible>true</visible> -->

		<!-- Whether the user can minimize the window. Optional. Default true. -->
		<!-- <minimizable></minimizable> -->

		<!-- Whether the user can maximize the window. Optional. Default true. -->
		<!-- <maximizable></maximizable> -->

		<!-- Whether the user can resize the window. Optional. Default true. -->
		<!-- <resizable></resizable> -->

		<!-- The window's initial width in pixels. Optional. -->
		<!-- <width></width> -->

		<!-- The window's initial height in pixels. Optional. -->
		<!-- <height></height> -->

		<!-- The window's initial x position. Optional. -->
		<!-- <x></x> -->

		<!-- The window's initial y position. Optional. -->
		<!-- <y></y> -->

		<!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
		<!-- <minSize></minSize> -->

		<!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
		<!-- <maxSize></maxSize> -->
	</initialWindow>

    <!-- We recommend omitting the supportedProfiles element, -->
    <!-- which in turn permits your application to be deployed to all -->
    <!-- devices supported by AIR. If you wish to restrict deployment -->
    <!-- (i.e., to only mobile devices) then add this element and list -->
    <!-- only the profiles which your application does support. -->
    <!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->

	<!-- The subpath of the standard default installation location to use. Optional. -->
	<!-- <installFolder></installFolder> -->

	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
	<!-- <programMenuFolder></programMenuFolder> -->

	<!-- The icon the system uses for the application. For at least one resolution,
		 specify the path to a PNG file included in the AIR package. Optional. -->
	<!-- <icon>
		<image16x16></image16x16>
		<image32x32></image32x32>
		<image48x48></image48x48>
		<image128x128></image128x128>
	</icon> -->

	<!-- Whether the application handles the update when a user double-clicks an update version
	of the AIR file (true), or the default AIR application installer handles the update (false).
	Optional. Default false. -->
	<!-- <customUpdateUI></customUpdateUI> -->
	
	<!-- Whether the application can be launched when the user clicks a link in a web browser.
	Optional. Default false. -->
	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->

	<!-- Listing of file types for which the application can register. Optional. -->
	<!-- <fileTypes> -->

		<!-- Defines one file type. Optional. -->
		<!-- <fileType> -->

			<!-- The name that the system displays for the registered file type. Required. -->
			<!-- <name></name> -->

			<!-- The extension to register. Required. -->
			<!-- <extension></extension> -->
			
			<!-- The description of the file type. Optional. -->
			<!-- <description></description> -->
			
			<!-- The MIME content type. -->
			<!-- <contentType></contentType> -->
			
			<!-- The icon to display for the file type. Optional. -->
			<!-- <icon>
				<image16x16></image16x16>
				<image32x32></image32x32>
				<image48x48></image48x48>
				<image128x128></image128x128>
			</icon> -->
			
		<!-- </fileType> -->
	<!-- </fileTypes> -->

</application>

 

 

Please use plain text.
Developer
Zymatic
Posts: 144
Registered: ‎12-18-2010
My Device: Limited Edition Z10 & Blackberry Playbook
My Carrier: Rogers Wireless

Re: Problems while publishing

manikantan one thing I noticed that goes back to what I said before is in the xml file you have this line:

<!-- <visible>true</visible> -->

 

try removing the <!-- as the beginning and the --> at the end so that it looks like this:

<visible>true</visible>

 

 

I don't know if you are familiar with xml or not but the <!-- and the -->  are how you mark things as comments so they are ignored.

 

Again, I dont know if this is the cause but its worth a try.

 

Zymatic

Playbook Apps:
Touch Painter, LinkShrink

BB10 Apps:
NoteToSelf , LinkShrink
Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Problems while publishing

hey,

 

yeah zymatic seems to be correct. at least my file looks different in that sense to from yours. add the following lines to your XML file right before the </initialWindw> tag like so:

 

 

	<autoOrients>true</autoOrients>
    <fullScreen>false</fullScreen>
    <visible>true</visible>
  </initialWindow>

 

those three lines should appear right before the </initialWindow> end tag. good luck!

 

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.