How to make auto start application in blackberry - blackberry

I don't know how make my application as auto start application.That is my expectation is,After simulator loads it should not open normal main screen which consist of contacts icon,message icons. it should directly run my application.

Try project->properties->BlackBerry Project Properties->Application tab->Auto-run on startup
See BlackBerryForums.com - Running a Java App on Startup

Here's another link related to the subject matter:
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800660/How_To_-_Create_an_auto-start_MIDlet.html?nodeid=1408081&vernum=0
However, it sounds like you might be expecting the simulator to work like other manufacturer simulators where the application you are working on automatically boots when the simulator starts. This doesn't happen with the BlackBerry simulator, but your app should be located in the Download folder.

To add to Max Gontar's answer, make sure that this same name is stored in the property:
BlackBerry Project Properties -> Build tab -> Output file name
And then the Debug Configuration needs to be updated with this same Output file name. By default, the debug configuration inserts the name of the project, which is not always the same as this output name.
That's the part that got me caught out (project name was copied from a different project).
So it is possible.

Through XML descriptor of any blackberry application one can set checked on auto-run on start up and select start up tier for your application.

Related

Air to IPad Release Build failing on asset loads

Having some issues getting a release build of an Air IOS Ipad app running (starling based).
I am doing a release build, and saving the ipa file on my drive. I double click the ipa to get it into iTunes, and from there I do an app install onto the iPad.
Once on the ipad, the app fails to load any external files.
I put up a preloader, and attempt to load assets via Loadermax, however, it seems to fail.
Here is the code section that the app fails on: (NOTE: this all works in debug mode, both in Air simulator, and debug mode on device via usb)
import com.greensock.events.LoaderEvent;
import com.greensock.loading.ImageLoader;
import flash.filesystem.File;
...
...
var _imageLoader:ImageLoader;
...
...
private function loadAssets():void{
var _appFile:File = File.applicationDirectory;
_appFile = _appFile.resolvePath("assets/statics/blueImage.png");
_imageLoader = new ImageLoader(_appFile.nativePath, {onComplete:onImageLoaded, onFail:onImageLoadFail});
}
private function onImageLoaded(e:LoaderEvent):void{
traceOut("OH MY GOD BATMAN, IT WORKED!!!"); // traceOut is a helper method that prints to a textfield on the display
}
private function onImageLoadFail(e:LoaderEvent):void{
traceOut("back to the Bat Cave...");
}
...
...
In debug mode, the above code shows:
OH MY GOD BATMAN, IT WORKED!!!
In release build:
back to the Bat Cave...
Anyone know where I am going off the rails? I am not using any ANE's or such.
Based in SDK: "http://ns.adobe.com/air/application/14.0"
PCs are not case sensitive but Ios is. While in simulator or debug mode a file name "myFile" would work even if it's really "myfile" (note the cap difference) on release mode it will fail.
If that doesn't work then try using the url property of File instead of nativePath. Also you can easily check is the file exist prior to loading it:
if(_appFile.exist)
Also when depending on custom frameworks you force yourself on depending on their shortcomings. Use a classic Loader instance to repeat the same operation and see if that one succeed. You'll be surprise the number of times a custom framework can fail on simple operations simply because the way it's setup internally.
Firstly, Thank you to to the individuals who assisted in getting to the root of this problem and solving, especially BotMaster.
The issue really has to do with Flashbuilder, and a bug that is associated with it's Build Release wizard.
After reading this:
https://forums.adobe.com/message/5750011
What I did was:
click the "Export Release Build" button in Flashbuilder,
IMPORTANT: check the box for "Keep bin-release-temp folder"
Click Next
Click Cancel
Via Windows Explorer, navigated to the bin-debug folder, and copied the "assets" and "configuration" folders to the "bin-debug-temp" folder that was generated by flash-builder
I return to Flash builder, and Click on "Export Release Build" button again.
Check the box for "Keep bin-release-temp folder"
Click Next
Check the boxes beside "assets" and "configuration", Click Finish.
the newly generated ipa file had the folders I required.
Once again, thanks to those who contributed to resolve this bug.

Where is the Deployement Screen

I am trying to keep my application in the background on the iOS platform using firemonkey.
I have came across an answer witch tells me how to make the application remain in background.
Here is the answer:
You'll need to copy the info.plist file and modify it using a unix EOL
friendly editor (such as Notepad++). Add the following lines to it:
UIBackgroundModes voip
In the Deployment screen for your project, uncheck the original
.info.plist, and add the copy you modified. Note that if you
change any project options that changes the original, you'll need to
go thru this process again, or just reflect the changes in the
modified file.
How ever I can't figure out where is the Deployment screen. Does anybody know ?
(NOTE: I don't do iOS development, so this info is based on some quick experimentation with a new iOS FMX project in XE5.)
Those instructions are for XCode, which isn't Delphi. Delphi doesn't have the XCode deployment screen.
The Delphi equivalent is in Project->Deployment from the IDE main menu. You can locate the .plist file in the Local Name column, in the form YourProject.info.plist. I think the original copy is actually generated when you build your project for deployment (either Release or Debug) to the simulator or device, so you may have to do that first in order to find it.
If you look at the samples for XE5 (which seems to be the one in Samples\Delphi\DataSnap\connectors\iOSClients\client_company_tweet), you can see where they're located once the file has been generated.

How to specify application data package in Xcode Schemes?

I'd like to specify an application data package using Xcode schemes so that I can customize and deploy to the device during testing. However, by default, the Scheme | Option | Application Data combo box has no items in it.
I guess I would need to create the package and add it to my xcodeproj. But I can't find any documentation about this, not even in the bulky book Xcode4 Unleashed. I also tried to build for Archive first. But after that still "No Data" under the Option page.
Easiest way I know is to go to the Organiser (apple shift 2), and then find a connected device.
Go to applications and select the application you need app data for and hit download. This is going to dump some of the sandbox data into a package on your dev machine.
To use this in the scheme, you just need to add this to your project, and then it will show up in the drop down.
As far as I can see, there isn't a way to choose what data to put in the xcappdata file, but since it is a package, you can open it in the finder ( show package contents) and get rid of anything you don't want.
Hope this helps

Error Starting MyApplication: Can't find entry point

I was successfully created a signed Blackberry app. I have ever deployed it and succeed. But i wonder why somehow, when now i debug it, the app won't run and said,
Error Starting `MyApplication`: Can't find entry point
During debugging, my project doesn't show any errors, packaging works well. As far as i remember, i do not perform any significant changes on my code nor on the project description and properties, before i got this error. Anyone here ever faced the same problem?
For your info, my project has only one main method and uses SMS listener thread inside UiApplication class. I get this error both on real device and simulator. I was trying to completely uninstall the app, but coincidentally it cannot be deleted because delete menu doesn't appear.
First of all, make sure that the main method is in a publicly accessible Class, and add a breakpoint to the first line inside the method, to check that the application isn't throwing an exception and dying on your. Also try putting the whole main method into a try/catch with exception logging to get a look at what might/might not be going on.
Secondly, it is possible that the device/simulator being used just needs the previous version of the application deleting. Go to the settings and navigate to the third party installed apps, and make sure yours is removed. A reboot is required (battery pull). On simulator, navigate to the bin/simulator folder in your SDK directory and run the cleanup.bat file to reset the simulator. Then try again. You say that the delete menu doesn't appear, I assume this is on the Third party Installs screen?
A third option is to go into your application descriptor xml file, and check that there is a visible entry point, and that everything is correctly filled in.
Also try doing a refresh and clean build, and checking that all the files are correctly compiling (is there a class file created correctly in your bin folder? And has the distribution folder correctly populated with the cod/jad files for distribution?)
Another option is to re-import the project into your IDE to force the IDE to regenerate some files, and to try loading another project onto the device. If that works an option could be to copy your class files etc over to the new project.
Some of the above are a hassle, but welcome to BlackBerry development!

Application not getting deployed on Blackberry simulator

I am tried deploying .cod,.alx.jar files on blackberry simulator 8100;the application is not getting deployed on phone.I am using Blackberry plugin for Eclipse.
How can I solve this issue?
Please help
Update
Hi,
Thanks for your reply.
I am trying to run the application the way you suggested.
Do I need to setup new run configuration every time I run any project?
What should be default value for build configuration ? [Debug,Private,or Release]
Copying the .cod files into the simulator's directory (where all the other .cod files are) and restarting the simulator will work.
Probably though you want to automatically deploy from Eclipse. If this isn't working for you, there are a couple of things to check:
Check that the project has been activated for BlackBerry - from the right-click menu for the project, make sure that Activate For BlackBerry is checked.
If that's already checked (as it is by default when you create a new BB project), then sometimes explicitly building the project will do the trick: From the Project menu, choose Build Active BlackBerry Simulation
EDIT: In response to some comments below I thought of something else. The configuration you choose may have something to do with your problems (BlackBerry -> Build Configurations). The configuration in the JDE Plug-in doesn't affect the code generated, but it does affect which projects are activated for BlackBerry. If you switch configurations, your project may become un-activated.
Since it doesn't affect the code, I usually just pick one configuration and stick with it throughout debugging and release.
You might be missing 'jar' in your PATH. If so, the eclipse BB plugin silently fails and your application won't be pushed to your simulator plugin directory. To see this failure within eclipse, choose 'Project > Build Active BlackBerry Simulation'.
If you don't have jar in your path, then you will see:
I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified rapc executed for the project
So, if your JDK is here:
C:\Sun\SDK\jdk\bin
Then append it to your system environment's PATH variable, then re-run 'Build Active BlackBerry Simulation' and you should see:
rapc executed for the project [YOUR PROJECT]
Here are a couple of ideas:
1) If you have any build errors then the application won't deploy to the Simulator. The Eclipse compiler (that underlines compile errors in red) is different to the "rapc" one that creates the binary for the Simulator. I have heard of situations where the Eclipse build seems to work, but the rapc compile fails - check the Console for the detailed rapc output (this might not look like a normal Eclipse build error).
2) In the Eclipse menu, open BlackBerry -> Configure BlackBerry Workspace.
Under BlackBerry JDE choose Code Signing and make sure the three RIM checkboxes are selected. I had compile errors when these weren't selected.
Under BlackBerry JDE choose Installed Components. Choose to use the Component Package 4.7.0 as I have heard of problems with the 4.5.0 Simulator.
You should delete all these extra answers you posted, or you might get downvotes - they should be comments instead of answers.
Check if your simulator is set up to clean the file system / configuration before launching the simulator. Simulators can be set up like this. If you deactivate it, the application should not disappear.
For future readers, there is another possibility for this issue. Check your workbench project directory (folder) for a ProjectName.err file. This may provide a clue as to why your build is silently failing and thus not deploying. In my case, it was an "Error!907", a new icon I added to my project was too big. There was absolutely no other indications in Eclipse 3.4.1 that there was a problem in my build.
Just ran through the same kind of problem : project compiled fine but didn't deploy on any device or on any simulator, even though the debugger said it was attached !
The problem came from a .zip file that was located in the ./src directory of the project, deleting or moving it somewhere else resolved this case.
I wish I hadn't spend 2+ hours on such a stupid problem :/
I know this is old, but you have to do the "generate ALX" option from right clicking the project menu as well or it won't deploy, at least it doesn't for me.
I ran into the same problem again and none of answers posted here worked for me.
I played around and finally made it work. The problem was that the output file name contained a hyphen ('-'). Changing this name in the Build section of BlackBerry app descriptor did the trick.
I mean, how stupid a developer must be to slip that kind of bug. No error reported and why reject the names with hyphens in the first place? Give me back my two hours RIM "developers"!
I had the same problem. The reason was using 'ΓΌ' character in the title.
I have been facing this problem today, but with a MIDlet project. It turned out to be that I forgot to specify the "Name of main MIDlet class" in the BlackBerry Application Descriptor (BlackBerry_App_Descriptor.xml). Once I specified it the application appeared on the simulator correctly.

Resources