titanium studio save image into the native gallery - image

i would know if it's possible to save an image (from imageView, retrieve by webservice not from the camera) in the native gallery, both on ios and android ?
I suppose that yes, but i can't find the native gallery path to use for saving file (like Ti.Filesystem.externalStorageDirectory).
thanks

Yes you can do it. If you want to save the image into device's gallery you might use saveToPhotoGallery method:
https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Media-method-saveToPhotoGallery
If you want to save the file inside the device, have a look at this code snippet:
https://gist.github.com/timoa/3733505

#gsoulie Just have a look at my problem that I met before, Check Here! Hope this can help you!

Related

How to display a KML (or GPX?) file on a Nativescript Angular app?

I'm trying to make an app using Nativescript-Angular that displays a route on a map like this : https://prnt.sc/10cy40s using .kml or .gpx files that I upload online somewhere else.
But I can't find anything regarding this with Nativescript-Angular or maybe I'm not asking the right questions ^^'
Thanks in advance !
Edit : To be more clear, I'm not expecting a magic answer, but more of a guidance about what I missed during my research.
There's no native KML support in the google-maps-sdk plugin, but what I did was extract the coordinates and create a polyline. This has worked well for me.

How to resize image file on Xamarin.forms. (+ writeableBitmap package can't be added)

I'm making iOS and Android app using with Xamarin.forms. (PCL project)
I need to resize my image file from 'MediaFile class' that is returned from 'CrossMedia.Current.PickPhotoAsync ()'.
What's your best way to do it?
and I have searched long time and noticed that many people uses 'writeableBitmap'.
But this 'writeableBitmap' nuget package can not be added because Xamarin platform is updated?
I got great answer from here.
https://forums.xamarin.com/discussion/comment/199212#Comment_199212
It's using DependencyService and it works beautifully.
After applied DependencyService, I got a question.
In my thinking, image file is not dependent so why don't we process it just in 'forms' using with SOME image process library in .net? (I'm not a .net developer but I believe that there is many library to process image file)
I suspect that we should have done because we want to use built-in image processing library(like UIKit) so that we could avoid adding new one?
Am I correct?

Is there a cache type memory in Titanium I can use to persist data?

I have a simple app, and I added a tutorial with a few views with Labels and explanations, this was no problem, but I want it to run only once while the app is installed, or just when the user clicks the help sign.
is there a cache type memory on Appcelerator titanium that I could save it in both OS's ?
thanks in advance.
You can use http://docs.appcelerator.com/platform/latest/#!/api/Titanium.App.Properties to store data
Ti.App.Properties.setString('foo','bar');
var foo = Ti.App.Properties.getString('foo');
or you can save a file (txt,json)

Where are the Xcode 'prepackaged' images stored?

I need access to the image of the default clear button that apple provides because I want to use it somewhere else in my app, where can I find the image file? If apple doesn't allow access to them, does anyone have a link to this image, i've been searching for a while now and haven't found a proper .png image i can use (I don't have photoshop, so I can't edit them myself).
The image I'm talking about is the one that shows up if i add this line of code:
textfield.clearButtonMode = UITextFieldViewModeWhileEditing;
I suggest you to use this. http://www.teehanlax.com/tools/iphone/
It's a psd, but you should be able to extract the ressource using a tool like acorn.
Ok, I was feeling nice:

How to load pdf file on CStatic control in VC++

I want to draw/load pdf file which contain image, on the CStatic control in my VC++ project.
But, I don't know how to load pdf file on CStatic control.
I have searched a lot, but dint find any right direction.
In Mac, Its possible using specific function, but is there any way in Windows ?
Can you please suggest me any right direction...
Thanks in advance.
EDIT
I want to load image in PDF to CStatic, reason behind that I want to maintain image quality. Just load vector data of PDF image to on CStatic.
Please suggest ... !!!
There is no way to Show a PDF file inside a static control.
There are several ActiveX Controls that can show a PDF file. Also Adobe ships and AcroPdf ActiveX file that is free to use.
Here is a sample
If you just want to Show formatted data you can use an RTF-Control

Resources