How to create app bundle with different assets in different language - android-studio

Please guide me, i want to create app with some audio files in assets folder, these files is different for every language, like: 'assets/en/hello.mp3' and 'assets/fr/hello.mp3'.
I want to build my app with 'android app bundle', so that user with specific language can get his/her language assets with smaller build file size.
So how to architect my app with android app bundle?

No build system has native support for this feature yet unfortunately, however bundletool and Play already support it, so if you organize your asset files after the following pattern, it should just work:
assets/<dirname>#lang_en/hello.mp3
assets/<dirname>#lang_fr/hello.mp3
assets/<dirname>/hello.mp3
Where "<dirname>" is any string you want.
The last file in my example would be only delivered to users which have neither French nor English as their language on the device.
Note that when the user changes the language on the device, it will take a few hundreds or milliseconds or seconds to download the right asset, so you'll have to manage this transition on your own (i.e. you can't assume that the asset is already on the device for the new language as it may not have been downloaded yet).

Related

Windows Universal 10 force download language resource

We are creating a Windows 10 Universal App in 3 different languages, one of them being minoritary (Basque). During our local testing we could change to any of them, but when installing the app from the Windows Store the Basque resources are not available unless Basque is listed as one of the OS languages.
We've set the NeutralResourcesLanguage attribute to Basque, hoping that the Basque resources would get embedded in the app, so they were always available, but to no avail.
Is there any way to force the download of the Basque resources regardless of Basque being listed as a language at the OS level?
Is there any way to force the download of the Basque resources regardless of Basque being listed as a language at the OS level?
Yes, you can set the Generate app bundle to Never when you package your app.
If the bundle file is generated, then he will cut your application into different parts to optimize the download. For language resource, it will only download the resources file relevant to the language of the device. If you don't have the corresponding Windows-Language-Pack installed, the app will not show the related language for that property which is pointing to the resources file.
For more information, you can refer to Dynamically change the language of a universal app.

How to handle downloadable assets in MvvmCross

I have an app that synchronises content with a web server so that the app ends up with an offline and cut down version of the server based web pages. All text and html is stored in a SQLite database but what is the best approach for handling file assets? In my case this is a mix of image and audio files.
The synchronisation is all set up in the core project and my Touch project has a Content directory set up for storing the assets and my intention had been to have a similar setup for Droid. I could pass the list of files needed to the UI projects and download them from there but that seems wrong.
Thanks.
For that I would create a Service in Mvx which the ViewModels you create use for getting the external assets. Take for instance the Daily Dilbert Tutorial. You could consider the daily comics as being very similar to your external assets, where the DilbertService is used to get all the comics and presents them in a List. However your list could be a list of files located on the SDcard or where you decide to store your files.

Publish Web App files to different locations

I'm start to develop modules for DotNetNuke. I followed different tutorials(most by Chris Hammond) but there is something i don't like, and I'm searching a different way to do so.
He recommends to put a DotNetNuke installation, with IIS and SQL Server, on the developer PC and put your Project into the DesktopModules folder. I don't like it because i want to separate my project from DotNetNuke.
Is there a way to split the build/publish to different location like dll into folder x and all other stuff into folder y?
You could, but I don't really see the point. I see where you're coming from because it seemed awkward to me at first as well, but it really is the most efficient way to develop on the DNN platform. I have mine set up so all of my modules are in the same solution and branched in source from the root DNN folder. We don't keep the DNN core in source so the developer is responsible for that, although that may change at some point to keep versioning consistent.
By keeping your project located where it's installed, you can develop your modules the same way you'd develop any other web app you're building. If you make a change in markup you just have to save the file and refresh your page. If you change something in code just build and refresh.
If you really must keep them separate, you can absolutely do so (really the only benefit of this that I can see is that if you uninstall a module and accidentally click the checkbox to delete files - it happens - you don't have to worry about it). Create your project where you want it, change the Output Path to your DNN bin folder, and create post-build events to copy all of your .js, .ascx, and .css files (plus any others you may need - images, HTML files, XML files, etc.) to appropriate folder(s) in the DesktopModules folder. Just remember that you have to build the project every time you make ANY changes to test them, and you have to write/change your post-build events every time you add a new type of resource, change/add a directory, etc.
Either that or you can build an install package and uninstall/reinstall the module every time you change some padding in your stylesheet ... but I'd stick with keeping the project in the DesktopModules folder.
Sure you can do that.
Set up your solution and module projects anywhere, build the projects and copy the appropriate parts (such as the *.ascx , *.ascx.resx, *.dnn files) back to your website folder -
website/ DesktopModules/Your_module_name
Copy the module dll to the website's bin and you good to go.

Create Lite version of my app with MonoTouch

I created my iPhone app with MonoTouch and deployed it to the AppStore. Now I want to add a free lite version of the same app. What is the best way to do this with MonoTouch/MonoDevelop?
So far I created a new Provisioning Profile for the lite version. I can change the build options to use the full or the lite profile. But what else do I have to change and how? I think at least the app name should be changed, but how???
Thanks,
Christian
The way I do these things is to create a new project, then add the existing c# files from the first project as a link. You will see this option on the "add existing file" dialog. Keep in mind all your Icon/Splash screen files will have to be copied though, MonoDevelop doesn't handle these right if they are linked.
Just a side note, you can get by with less provisioning profiles. Create one as com.yourcompany.*, then name your apps com.yourcompany.yourapp1, yourapp2, etc.
So I have a profile for Development, AdHoc, and AppStore, but I have several apps deployed.
Rather than link files, I prefer to make three projects: A library project which will have all the UILogic called X.Touch.Core and two more which will have a reference of the Core. X.Touch.Lite and X.Touch.Premium. This way you don't need to have linked files, it can be painful. You can put a file called settings.xml and perform some feature toggling there.

Distribute MonoTouch app to testers using Organizer?

I am trying to archive my MonoTouch app and to supply it to our testers using Apple's/Xcode's organizer.
Can somebody tell me how to do that? In ObjC projects I can archive an application. But how can I achieve the same in MT/MonoDevelop?
My starting point was this documentation:
http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/iphone_development/145-Distributing_Applications/distributing_applications.html
René
The archive that Xcode provides is in the form of an .ipa file. This is a glorified zip file with a certain expected file structure.
The .ipa is made up of the following components:
A folder named "Payload", which contains the compiled
(release/iPhone) .app
a 57x57 .png icon file (which is displayed while the app is being
downloaded)
a 512x512 .png file of the icon once again - however this has to
renamed itunesartwork with no extension
iTunesMetadata.plist - this contains information about the app,
such as copyright name, genre, itemname, softwareIconNeedsShine (you
can google what information this needs).
The way I package up our .ipa, is I have a folder called "App Packaging" which has all of these components already in, and I simply update the .app file whenever we do an upload, "Compress..." then rename the file to x.ipa (OS X will ask if you want to use this extension, make sure you select ("use .ipa" !).
You can then send the file to the testers to install via itunes. If the testers are all testing on devices that are iOS 4.0+ then it is possible to distribute this over the air as well but I can go into that only if you would like me to?
EDIT - Over the air distribution
It is possible to do over the air distribution of apps as well. We use it for distribution of an enterprise app we develop but it is possible to use it for testing purposes as well. It should be noted here that in order for the app to installed, the device needs to be included in the provisioning profile you signed the app with (but you knew that already!).
In order to do over the air, you need 3 things:
the .ipa file we created earlier.
a 57x57 .png icon file (same as the one included in the .ipa preferably)
a file called "Manifest.plist"
The Manifest plist contains the following structure/information:
You'll then want to upload all of these files to your website/intranet etc. In order to download the app, you'll need to create a page that points to the Manifest.plist file and then then iOS takes care of the rest and downloads the app from the location specified in the manifest.
There is now a much much easier way. On the Project menu in MonoDevelop, choose Publish to TestFlight.
You'll need a free TestFlightApp.com account, but it works great!

Resources