Is there a way I can get application name, application version and application icon, for the package that is not yet installed by delphi?
*.apk files are basically zip files, so you can have a look at the single resources at least to get the app icon. The ApplicationManifest.xml is howewer compiled into some binary format, so this might be a bit harder to decode (but there are answers that show code for that task as well here: How to parse the AndroidManifest.xml file inside an .apk package).
Related
I was working on a language translation project in trados on a virtual machine. Half of the work was done and the translated words were exported into a Word docx file. Upon restarting the virtul machine, the project file appears to have been corrupted as trados shows no signs that the project was worked on. When I manually open the sdlproj (trados project) file, trados cannot open the file mentioning the following:
: An error occured whilst trying to determine the file version
I have tried creating a new project and used pre-translate using batch tasks but that did not seem to have imported the previously translated document. I need to figure out how to recover my project so that I can recover the translated document (so I do not have to redo the work) as well as recover the translation memory for trados. The translation memory folder is present inside the original project folder. I would really appreciate any suggestion to further troubleshoot and fix this issue. I have tried their support desk but they do not appear to be available today. Two solutions I observed from their forum suggested:
save the project file with a zip extension, extract the contents and then open the sdlxiff file from there
recreate the project and use pre-translate.
In my case, I was able to open the sdlxiff file from the translated language directory. This opened the project with the text that had previously been translated. I am not certain whether I need to remove the sdlproj file or simply save the project hoping that it will overwrite the corrupted file. In either case, I will update this post once I get an answer to that.
I have a iOS and OSX application which is document based and i am saving complex folder hierarchy inside the document so i change my UTI type to document package.
But the problem is that according to apple Document Package is just a folder. If i open the document package on windows or linux machine it consider it as folder despite of having a .abc extension. I figured out that one solution to this problem is that i zip the folder while saving. But i don't think that it is a good approach because every time i open up the file i will have to decompress the folder and compress it again on re-saving.
Is there any other solution to this problem?
I found another better solution.
Solution is to use SQLite database as your document as long as you have text to save on the file systems. In my case i also had images, so i created a table for all the images and a table for all the files contents that i used to write on files. So the document will have custom extension(.abc) which will only be opened with your application.
My iOS app uses data that is packaged by theme into theme bundles. For example theme_math.bundle, theme_history.bundle, etc. A theme bundle contains a .sqlite file and images. The idea would be that those bundles can be downloaded when necessary by the app (theme_x.bundle.zip).
There are hundreds of themes that are stored in a database, and I'd like to automate the process of creating a bundle for every theme with the appropriate name.
Is this approach fine to deliver application content to an iOS app?
If using bundles is fine, how can I automate that process?
This would appear to be a fine idea. You can automate this by creating a shell program file, or use some other scripting language (python, ruby, etc).
A bundle is really just a folder that gets special treatment. It can have an icon when viewed in the Finder, etc. So your high level program will create a bundle (mkdir Name.bundle), then copy whatever resources you want into that directory - Name.bundle. When you're done zip the bundle up, and put it where it can be downloaded.
Bundles often have a plist inside with special flags set (as an executable on OSX does), but don't think you need this.
Its possible that you may need to set some special bits on the bundle for iOS to recognize it - I really don't know for sure. If so see this thread.
I am developing for Blackberry usign phonegap and I need to copy all my app files to a writable location (I assume the app file location is red only).
Setting up the plugin to do this is easy enough using Java, however the problem I am having is finding the location of these files specific to my app so that I can copy and move them.
From previous reseaerch it seems that Class.getResourceAsStream would work e.g.
getClass().getResourceAsStream("/index.html");
However do not userstand how this can be specific to my app.
Thanks,
BlackBerry application file is packaged as *.cod file. It is kinda modified java *.jar file with hierarchical structure (folders, packages inside of the archive).
When you run getClass().getResourceAsStream("/index.html"); you get index.html file from the root package of your *.cod file. If there's a file attached upon compilation process, then you will get it, otherwise the operation fails.
As you want to use a writable media, then consider FileConnections API of the RIM SDK.
cod files are stored to a special location (not the filesystem). But you will need to deal with the filesystem if you want to write files to the device memory or memory card.
Is there anyway to programmatically get a list of iOS apps from iTunes?
AppleScript does not seem able to do this.
The only way I can think of is looking in the 'iTunes Media/Mobile Applications' folder. But this way a lose all metadata.
Any suggestions to get list of iOS apps including the metadata?
Thanks
I now actually went with the solution to scan the 'Mobile Applications' folder.
In order to get the metadata I had to do the following:
the *.ipa are simply archives
unzip/extract the 'iTunesMetadata.plist' inside
parse the plist
voila you got all metadata
This whole process is actually pretty straightforward in python as your already have both zipfile and plistlib.
One thing to lookout for though is that plistlib in python can not handle the new binary plist files. So you first have to convert them to their corresponding xml format. (only some *.ipa seem to be in binary form).
This can be done quite easily with the following line of code:
os.system("/usr/bin/plutil -convert xml1 %s" % file_name )
Now the only thing I still have to figure out is how to get the currently installed apps on the device...