I note that other apps (testing on Android) like WhatsApp, etc have folders that contains images the user has used/downloaded. These folders (like WhatsAppImages) are visible in other apps (Gallery/File Explorers, etc) so you can use those files to share, delete, etc like any other file.
In my codenameone app I download image files but they cannot be seen anywhere on the local device. I understand that for security apps run in a sandbox and this may be why.
But how do these other apps make their downloaded files visible to the general file system and other apps ?
Many Thx
Codename One doesn't support that at this time but you can use native interfaces to add this as explained here for Android: How to save image in android gallery
and here for iOS: How can I save an image to the camera roll?
You can also file an RFE to add this either as a cn1lib or API.
Related
My app backs up its data in a zip file that uses Share.RequestAsync to store the file. This works great because it presents all the possible sharing options including email, messaging, and cloud devices like Google Drive, Dropbox, etc.
In order to load that zip file from wherever it was stored I use FilePicker.PickAsync. The problem is that this presents a very limited number of options for selecting the file. It offers either the local device or a single cloud service (iCloud on iOS or Drive on Android). What if I want to restore the zip file from Drive in my app on my iPhone?
Why is there such a difference in the xamarin share options when it comes to saving and loading files? It seems like the Share class should offer a method to load files that presents the same options that it does for sharing. Or at least the FilePicker.PickAsync should present the same interface as Share.RequestAsync for load options. Am I missing something?
Here is what the share dialog looks like compared to the file picker on iOS. It is similar on Android. The share offers access to iCloud, Drive and Dropbox while the picker only offers access to iCloud.
I'm a UI designer working with a junior app developer.
We are working on an app I gave him the assets and there sizes using Zeplin app, he showed me the app and it was different than was design telling me that Xamarin doesn't use pixels or dpi but using a number without any measurement.
Is there any way to help him as a designer or something he can use to make the program use pixels or dpi.
#Muslem Mohammed
I think as you are an UI Designer, you are aware that how to provide assets for native app development if not please check for below process.
You can provide Android Assets in the form of Mdpi drawable, hdpi, xhdpi, xxhdpi.
And for iOS 1x, 2x and 3x same like native app assets.
And the developer place all those images into respective folder with respect to the platform.
Example: For Android you will be providing 5 kinds of images with same name respect to the folder I mentioned above.
sample.png for respective folders with the resolution, developer place those images into Android specific project.
Then developer place all images under resources and keep in respective folders.
For iOS also provide the images with same name and by applying 1x,2x,3x with sample below,
sample.png, sample#2x.png and sample#3x.png.
Then developer go to iOS project and place all ios images into Resources folder.
And finally developer will place the image control like below,
<Image source="sample.png" />
And this will show up the image in iOS and Android as well.
Suppose we write a Xamarin MVC application which is deployed to a device and runs connected to the web.
If we need to update the application by downloading some images, CSS, or .js files using WCF service, for example, is that possible?
Does iOS, Android, and Windows allow you to do that?
Thanks
You can not update the app bundle itself on either iOS or Android, and presumably UWP but I am not very familiar with that platform so not sure. For iOS and Android the app bundles are signed so they can not be modified or else the signature will no longer be valid. You can, however, download anything you want and store the downloaded files in the file system. Every app does have a file system it can access to read and write from. See this Xamarin doc:
Forms:
https://developer.xamarin.com/guides/xamarin-forms/working-with/files/
You might also want to look into the PCLStorage plugin:
Xamarin Component: https://components.xamarin.com/view/pclstorage
NuGet: https://www.nuget.org/packages/PCLStorage/
Source: https://github.com/dsplaisted/PCLStorage
(I know I should paste relevant bits from links, but there is just too much to paste and would end up pasting the whole article. If above link is broken, just google "Xamarin working with files")
Note: I work for MS/Xamarin
I am a developer of iOS, and developed a mac app. Now I want to distribute my app so that a searched for it and found that we need to upload .app to Mac App Store it looks fine. While for self distribution we can have three options:
is to share our app
is to create .dmg file
is to share .pkg file (Package Maker).
In pkg file my client want to install app without introduction, read me as well as license agreement, I removed the license and readme but unable to remove introduction section. Please help me out from hereā¦
Thanks in advance
If you dont need any introduction, readme etc, the best option is to create a DMG.
You don't need any external tools for this.
Copy your app to a new folder.
Open Disk Utility -> File -> New Image -> Image From Folder.
Select the folder where you have placed the App. Give a name for the DMG and save. This creates a distributable image for you.
If needed you can add a link to applications to DMG. It helps user in installing by drag and drop.
How to create a dmg file for a .app for mac.?
It's a subjective issue, but .dmg's are a good and popular way to distribute the apps - user double-clicks, drags app, ejects just as they would a USB stick, done.
You can get apps to help you build them, but its not too Hard with Disk Utility, you just need to mess around a little to make it look nice. Here is one way to do it:
Use Disk Utility to create a new empty sparse bundle disk image
Double-click the image to open it.
Copy your app into the image.
Make a link to /Applications in the image.
Hide the toolbar/sidebar/etc. as desired.
Using View Options set to always one in icon mode.
Also add a background image if you like using View Options. Background images often contain text such as "Drag App to Application". Layout the app and /Applications icons to match your background image.
In another Finder window eject the sparse bundle.
In Disk Utility use Images -> Convert... to convert the sparse bundle to a read-only DMG
HTH
I strongly recommend DMG Canvas . For a very modest price, it allows you to create a professional looking dmg, with a license agreement and every other common feature.
I'm not affiliated in any way with the software, just a long time user.
I would like to read/write to the DCIM folder.
I was able to perform this operation under 3.1.3, but it fails under 4.0. Has the actual location been moved within the iPod directory tree?
Previously it was located at:
/var/mobile/Media/DCIM
I do not have a jailbroken 4.0 machine, so I cannot find the true location of the DCIM folder.
Did apple close the exploit of being able to write to the location from any application, or did they move it to another location??
This feature was removed for security reasons.
It allowed apps to see your GPS location from photos in the folder.
To be straight, now there is virtually NO way to access the user's photos apart from the UIImagePickerController? Even if I don't want to submit an app featuring these functions to the AppStore?
I can read out all of the thumbnails on my iPhone 4, but not the DCIM...