Xap file in windows phone app - windows-phone-8

I have 2 Xap file in "MyApplication -> Bin -> Release" folder
1)MyHelloWorldSampleApp.xap(3,820KB)
2)MyHelloWorldSampleApp_Release_AnyCPU.xap(4,631KB)
Anybody can explain about whats the difference between this two.
Thank you.

The naming convention for WP8 app is "MyHelloWorldSampleApp_Release_AnyCPU.xap". "MyHelloWorldSampleApp.xap" is most likely a remnant from the WP7 version of your project, and should be deleted to avoid confusion.
To publish on the Marketplace, it is strongly recommended to pick the release version. The debug version disables some optimizations to work better with the debugger. Since it's not possible to attach the debugger to an application published on the Marketplace, there's strictly no point in publishing the debug version.

Related

Compiling sqlite-winrt for using SQL in WinRT/WP app with SQLite

I'm trying to use the sqlite-winrt library at https://sqlwinrt.codeplex.com (cf. http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/05/30/sqlite-winrt-wrapper-for-windows-phone.aspx) because I need to access an SQLite database via SQL commands in a WinRT 8.1 and a WP8 app and this library seems the only available option.
Anyway, there is no binary release and if I try compiling the source I get several link errors for unresolved externals against the SQLite DLL. I posted an issue at codeplex but got no reply yet, so I was wondering if anyone had already managed to successfully compile this lib and how (or if you know of any viable alternative for RT8.1 and WP8). Here is what I did:
downloaded the latest source from the site.
downloaded and installed 2 VSIX from http://www.sqlite.org/download.html: sqlite-winrt81-3080002.vsix for RT 8.1 and sqlite-wp80-winrt-3080100.vsix for WP.
executed the powershell scripts in each subfolder of the source code solution, which are required to update the projects with newer releases of the SQLite for WinRT extension. The current versions of the scripts refer to SQLite for WinRT 8.1 (prerelease) which is the same I downloaded above.
opened the VS2013 solution and removed the RT project (I just need RT8.1 and WP, this was for WinRT 8.0).
5) built the solution, which failed with link errors.
If I see the RT8.1 project properties, I can confirm the reference to SQLite is under C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\SQLite.WinRT81\3.8.0.2.
Did anyone manage to use this lib? Thanks!
I also once had that problem. I fix it by editing the project file manually. At that time, the powershell script updating the wrong path. That's why I always failed when compiling my project. After I edit the project file using external text editor (I use sublime text), the projects are linked correctly.
You can try DatabasesCx. It is another SQLite Wrapper using Windows Runtime Component technology. It is freeware distributed as precompiled binary. You can find the details at http://www.almanacsoft.com/databasescx

WP8 - Re-using a native DLL through Windows Runtime Component

I have a native dll that I'd like to use in a WP8 project that I'm working on. I've done some research and have created a C++ Windows Runtime Component (WRC) to wrap the native DLL. The WRC project uses a .lib file, and my WP8 application calls the WRC project.
My solution compiles all fine, but when my application makes a call to a method in the native DLL, I get a The specified module could not be found. (Exception from HRESULT: 0x8007007E) exception.
From reading around it seems like the dll is not being loaded. I've copied all relevant dlls to the output dir of where the .exe file is and also in various places but the error keeps showing up.
If anyone could point me in the right direction I'd be very grateful. Also if more info is required I'll post that up also.
The DLL must be included in your XAP package. Something you can see being taken care of in the Output window when you build your app, it starts with the "Begin Xap packaging" messages and then lists all the files that get added. The runtime error says it is not being included.
There is remarkably little guidance on how to ensure that a file gets included in a phone package when MSBuild cannot figure out the dependencies by itself. It certainly won't for your DLL, no way the build system can tell if it isn't a project in your solution. Seems you're operating a bit on the bleeding edge in this case :)
But this works well when I try it, going by the MSBuild output and not by actually testing it: Project + Add Existing Item. Navigate to your DLL and select it. Select it in the Solution Explorer window and look in the Properties window. Ensure that "Build Action" = Content, Copy to Output Directory = "Copy if newer". Rebuild, you'll now see the file getting added to the XAP. Which should solve this particular error. There might be others :)
Windows Desktop or Windows Store native DLLs are not binary compatible with Windows Phone, even if they are built for the same CPU architecture.
Therefore you will need to recompile your native DLL for the Windows Phone toolset.
About Windows Runtime Components:
On Windows Phone a Windows Runtime Component is itself a native DLL (.NET is not supported on the phone). The binaries of Windows Runtime Components cannot be shared between Windows Store apps and Windows Phone apps.

Publish WinRT application with SharpCompress library

The current SharpCompress.WindowsStore.dll library published on Nuget is build in Debug mode. I got this error from the Windows Store App Certification Kit.
Error Found: The debug configuration test detected the following errors:
The binary SharpCompress.WindowsStore.dll is built in debug mode.
Is there any way to have/compile the SharpCompress lib in Release Mode?
I'd rebuild it in release mode.
What, you didn't think about that?
It's on NuGet, right? NuGet packages often list a project site. So looking at the page I can see the link points right over here. That's on GitHub. That's where source lives.
You can either fork it (which there isn't really a point, since you don't want to develop it), clone it (aka use a Git tool such as GitHub for Windows) to your local machine, or just download the latest code in a zip file.
From there you can build in release mode and away you go. May not be just that easy, as there might be some dependencies or such that need resolving. Now off you go.

What is the correct version for Box Android sdk

I go http://developers.box.com/onecloud/ to download the Android SDK. I got box-box-android-sdk-5482811 Is this the latest version?
Because when I open up the OneCloudAppToAppSample, even the R. variable is not well defined. And I cannot run the sample code.
Where can I find more help or documentation on using Box with Android SDK?
The SDK is being improved quite frequently, so our advice would be to always use the latest version on the "master" branch. We consider the master branch to be our stable release. In your case, 5482811 should work fine.
Regarding your issues with the sample app, I don't seem to have any problems compiling it off of a fresh download. I can think of one thing you might be running into:
The sample app was configured to point to target "Google APIs:15". It's possible you don't have this installed (through the Android SDK manager). We actually should not have configured this build target, since the project doesn't use the Google APIs, and we'll fix that in our next release.
In the meantime, could you try this (assuming you're using Eclipse):
Right-click on the OneCloudAppToAppSample project and go to Properties.
Go to the Android section on the left, and change the build target to Android 4.0.3 - 15 (not the Google APIs version).
Project -> Clean -> Clean all projects.

AIR file too big, breaks during installation

A client is having me convert an HTML5 video web application that I've already built into an AIR app.
The end users are going to need this to work with no internet access, so I MUST include a LOT of video files with the installer. This works fine on my machine, but my client can't install it because the .air file is too large and they don't have enough RAM. We'll need this installed on a number of laptops that aren't super powerful.
My SDK is up to date and we're using AIR 3.1.
Has anyone else run into a similar situation? Is there any workaround? For instance could I either include both the installer and the .air in a zipped folder, then have the installer move the video files to the appropriate location, or use AS to have the installer download the files (they will have internet access when installing).
I'd recommend you not to include heavy video files into your application. Downloading assets from web is a descent idea, I use same technique for several museum touchscreen apps.
So here's workflow: on startup app tries to connect to "assets server" and request list of files to download. It can be list of all the files, or list of files that have been updated/added since timestamp that you pass with your request. Then you download them to File.applicationStorageDirectory. Not to have mess in that directory I put all of them to "cache" subdirectory.
In case there's no internet connection for some reason when you install that app, you can have all that "cache" folder on your memory-stick/externalHD so you can manually perform that downloading process.
If you use Greensock's LoaderMax: I've written a simple URLStreamLoader that extends LoaderItem, handy for downloading files. Can share that.
The problem is quite obvious: the Adobe AIR provided installer for deploying your application is lacking.
However, Adobe recently released a new feature for deploying Adobe AIR apps: "runtime captive bundle" (Windows or OSX).
Which means 2 important things:
You receive an .exe which no longer requires an user to have Adobe AIR runtime installed (and no more incompatibilities when targeting multiple Adobe AIR runtimes).
You are no longer provided with an installer, and you have to find your own (which solves your problem halfway).
Target bundle when "compiling", and then just use a better installer (Windows or OSX) - think you are just deploying a normal application (worked for me:) ). There are too many installers arround to mention.
Your installer of choice + bundle compiling, together solve your offline installation requirement and the memory exhausting issue.
Packaging a captive runtime bundle for desktop computers