I am new To Intelxdk and want to know whether I can achieve the points.
Handle limited/no internet connection case
Upload file from file manager to the server
Sqlite connection, execute queries(select,add,...)
Navigate between screens using variables(Ex : user_id)
Apply UI design, and handle multiple resolutions for each platform
Download file from server to device
Use maps for a given longitude and latitude
Swipe images by fingers
Package the app for Android & iOS
Push notification configuration
Capture image from camera, save it, and upload it to server
Share text to social networks(Facebook,Twitter) using their apis
Share text to social networks using intent
Call XML webservice, and parse response
Call SOAP webservice, and parse response
Handle device rotation(landscape)
Sorry for big question,
anyone who has any details about all or one of those points. Please let me know,
I will be grateful.
I've also answered this on our forum...
Please see our demo apps and documentation for answers to your questions. I'll try to provide some quick answers below.
Many of your questions presume the XDK is providing platform services -- please note that the XDK provides debug and build services that put your HTML5 code into an embedded webview (an embedded browser window), where many of the features and functions depend on what is available in the embedded webview. This embedded webview container includes JavaScript API "extensions" that provide access to device resources that you normally would be restricted from using in a standard browser, such as access to device features and contacts, but, in general, if you can do something in a browser you can do it in the webview.
Also, keep in mind that the resources available in a webview on a mobile device (memory and CPU) are much more limited than what you are used to on the desktop browser. The desktop browser has nearly unlimited resources, that is not the case with a mobile device. You must design your app to be "lean and mean" for best results. Do not include large numbers of CSS and JS files, especially if you are only using one or two elements within those included apps.
1-Handle limited/no internet connection case
An XDK apps does not require a network connection. If your app uses a network connection it is up to you to determine the behavior when there is limited or no network connectivity. If you only try to access the network when the network is available...
2-Upload file from file manager to the server
There is no such thing as a "file manager" on a mobile device. How you locate and upload files is very device dependent and how you choose to upload them to a server is also up to you to decide. There are standard HTML5 techniques and a few APIs that can help.
3-Sqlite connection, execute queries(select,add,...)
Again, this is device/target platform dependent, it is not dictated by the XDK.
4-Navigate between screens using variables(Ex : user_id)
In general, we advise against using multi-page apps, due to JavaScript context changes, inter-page reload times and resource requirements. Single-page apps that use hidden divs to represent multiple pages tend to work better in this environment, especially if you are new to writing such apps.
5-Apply UI design, and handle multiple resolutions for each platform
Again, this is completely under your control, how well you can master things like media queries and such. The App Designer tool can help you tremendously in this regard, but it is NOT required. If you have your own layout tools you can use them and utilize the HTML/CSS they generate in your project. Or, you can write your layout by hand. For example, if you like to use Zurb Foundation as a responsive web design tool you can use it here.
6-Download file from server to device
Again, what you can do with that file when you get to the device is platform dependent.
7-Use maps for a given longitude and latitude
Not XDK dependent, use whatever network mapping service you prefer. You can get Lat and Long numbers by using the geo APIs that are extensions to the normal webview.
8-Swipe images by fingers
XDK does not dictate how you handle touch events, this is up to you to design how such events and actions are handled.
9-Package the app for Android & iOS
We provide packaging services for Android, iOS and several other mobile targets.
10-Push notification configuration
There is a push notification service built-in from AppMobi. However, we are moving to a 100% compatible Cordova contain that will allow you to (in the near future) include any push notification service that has the appropriate Cordova plugin.
11-Capture image from camera, save it, and upload it to server
There are APIs present for such actions.
12-Share text to social networks(Facebook,Twitter) using their apis
These can all be done using standard HTML5 programming techniques and do not require special services from the XDK.
13-Share text to social networks using intent
Intents depend on the specific platform.
14-Call XML webservice, and parse response
Use your favorite JS library to parse XML data, the XDK does not restrict this.
15-Call SOAP webservice, and parse response
Again, if you have a favorite JS library to parse SOAP data, the XDK does not restrict your use of such a library.
16-Handle device rotation(landscape)
Events are present in the standard webviews (precise behavior varies by platform) to help you deal with rotation.
Related
I am evaluating a project that was originally targeted to be just a PWA using React and Redux.
The application needs offline support though, and needs a sizable amount of media assets (images and videos) to be available offline.
Since the service worker storage limit is just 50MB, this is not feasible for iOS.
I have toyed with the idea of using a native app wrapper that handles the storage of the media files, with most of the app remaining a Redux/React implementation.
Is there a good way to expose such assets from to the UIWebView from the native app? Or are there other common approaches for this situation?
First off all you should try to cache only that assets which are necessary for your PWA.However still if you want to store large files I would suggest you can go with IndexDB API.
IndexedDB is a low-level API for client-side storage of significant amounts of structured data, including files/blobs. This API uses indexes to enable high-performance searches of this data. While Web Storage is useful for storing smaller amounts of data, it is less useful for storing larger amounts of structured data. IndexedDB provides a solution.
Why IndexDB?
When quota exceeds on IndexedDB API, the error calls the transaction's onabort() function with Event as an argument.
When a browser requests user a permission for extending storage size, all browsers call this function only when the user doesn't allow it, otherwise, continue the transaction.
If you want know about other possible DB I would suggest you to go through this link
https://www.html5rocks.com/en/tutorials/offline/quota-research/
This is for a visualisation project on what data gets recorded about us from our phones.
The idea would be to log as much detail as is reasonable to an internal location (probably) on the phone for later analysis, e.g. HTTP requests. It doesn’t need to be secret at all – the subject will be aware they are participating – and it doesn’t have to be 100% automatic; if the phone owner needs to perform some action regularly that’s okay too, although they need to be able to use their phone approximately normally throughout the day.
I can’t find any Apple APIs that look suitable, but that’s hardly surprising. I can find some approaches that would potentially work on OSX (tcpdump, netstat), so perhaps a jailbroken iOS device would support one of those?
Alternatively, running a custom proxy server would open up a bunch more options, but is there any way to get a mobile device to reliably route through a proxy server?
It appears this question provides a viable proxy-server-based approach:
https://apple.stackexchange.com/questions/81102/proxy-settings-for-iphone-3g-connection
Basically, it seems it is possible to route all requests through a proxy server, even over cellular.
I need to create an iPad application. I was considering building an HTML 5 application based on Phone Gap. This application will be a file-synchronization application and will download pdf files and images from a central database.
Would an HTML 5 application makes sense here ? ... or do I need to go native because of storage requirements? I would need at least 1 GB of storage. From my research it seems that when you create an HTML 5 application, you have limited facilities for saving files.
Did some tests on this: My conclusion is that in such case, you need to go for the native option.
This is because of a number of reasons:
The HTML 5 storage/file api has limited functionality and it is not yet fully standardized.
Furthermore, devices have different approaches for handling files especially with regards to shared storage.
Also, in some cases it is not possible to load some file types into the browser. For example, on IE (on WP) it is not possible to launch a pdf from the local file system. Sharing the data with a pdf program is not trivial because the html files are coupled with the specific application.
I know that Apple's terms for apps disallows downloading and executing code, but there seems to be an exception for JavaScript running in a UIWebView:
3.3.2 An Application may not download or install executable code. Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and not downloaded. The only exception to the foregoing is scripts and code downloaded and run by Apple's built-in WebKit framework.
Does this mean that I can download and execute interpreted code, as long as it runs in a UIWebView?
I am developing an MMO, for which I would like to allow mods. It would have clients for iOS, Android, browsers, and eventually native desktop clients. I would do it entirely in the browser, but iOS doesn't support WebGL.
Is there a way to do this without violating the license agreement? I would really like to see a full-featured version on iPad, and I would be willing to put these mods in the app store so they can be reviewed, if that's possible.
These mods would be pretty simple, but more complicated than a data file could offer.
Yes. You simply download the Javascript and put it inside script tags using a UIWebView's loadHTMLString:baseURL: method, and then getting the result of various function calls using stringByEvaulatingJavaScriptFromString: method. You'd have to define an API where your game would query specific functions in your addon, but that should be pretty easy.
In fact, you may not even need to put the UIWebView in a view anywhere - you could simply instantiate a UIWebView*, load the javascript, and make the calls.
You are correct that downloading and interpreting Javascript is acceptable.
The Facebook and Gmail apps, as well as countless others, do this.
hallo,
I have a common question, I hope it is ok to ask it here.
I have a project, where I should develop a small appliation for BlackBerry. I know Java ME is the platform to do that (Browser and Widget are other opstion).
What I need to do is a samll application which pops-up after every call and asks the user if he wants to save(assign) this conversation (only the duration in minutes of the phone call is important) in his time-tracking database. He can click NO, but after it, he can start my application and see all unassigned phone calls and still he can assign them in the time-tracking db. This should happen offline and than be synchronized with the server via online connection.
My question now:
What APIs are to be used, for handling with the phone-calls?
Are there some downsides in this kind of application, which I newby can not see at first?
What about the different devices?
Thanks for any information you share with me, to help me avoid common newby mistakes!
Thnaks a lot.
That should definitely be doable, look at the PhoneListener interface to check when the phone call disconnects. What I would do is write the application as a system module, that will run in the background on startup. You can use an alternate entry point so that when the user clicks on your icon the application will create a GUI.
Edit: By the way BlackBerry uses an extended version of J2ME. You can ignore all the RIM specific extensions if you want and develop an app that will (theoretically) work on any J2ME device but you won't be able to use a lot of nice features including the PhoneListener interface. I doubt you'll be able to create this specific application with J2ME alone.