I Want to create a notepad application in ionic what storage should i use? - angularjs

I thought of using localStorage as it will support pc browsers as well as mobile applications
but i am not sure whether it will serve my purpose or not.

LocalStorage is the way to go. It persists information without expiration date, presumably forever, or until the user unistalls the app or erases the application data. Check out w3schools documentation for some good examples to get started.

Related

What should we use for offline-first with Flutter and Yii2?

We wanna create an app that is offline-fist. We're trying to use or create an auto sync database that allows work offline with app. Our client is Flutter and our back-end is Yii2. What is the best solution?
I have developed multiple offline sync applications. I can not tell you about the backend much but I can tell you about the Flutter.
For storing data on your device there are multiple plugins you can use.
sqflite-: It works well in android and ios.
shared_preferences-: If you want to support all the platforms then you use shared preferences but there might be some security issues here.
For Auto-sync
You can use the internet checker and sync your database with live.
connectivity_plus-: Works well but sometimes it does not trigger the callback for connectivity. (work well for all the platforms.)
Note-: This plugin does not give you if the internet is working or not.
internet_connection_checker-: work well in all cases and also provides if the internet is actually working or not.
If you want to sync when the app is in the background then you may need to use
background_fetch
Happy Coding ;)

How to automatically log user in ionic 1 hybrid app?

I want to move my angularJS web app to ionic hybrid app. I have done a lot of work all ready however I am confused on "autologin" topic. There are a lot of different information on internet, also the official docs are a bit unclear to me.
The scenario I am looking for is standart - on first lunch user creates account, logs in and next time he open app he is already logged in.
A lot of resources suggests to use localstorage. However there a some threath that it is not safe because IOs can clean localstorages.
So if that is not a good option, what is? Cookies?
I have spent hour reading and testing different approaches but well even more confused than ever. It seems to me as such important feature of hybrid app that there should be a good implementation... Would appreciate any help/suggestions/examples/links...
My ultimate goal would be that once authorized user can access and manipulate his profile data even if in offline mode. That means that opening app allready logs him in an his profile info is stored as well.
My minimum viable goal would be that when app is opened app recognizes user, checks as logged in, redirects to logged in state and makes http to get all user details. While user is waiting for that response there are loading spinners but he can start to use logged in app experience
I am working in Cordova ionic app, where I have stored token in localstorage. But it's not a good process. Have a look at Google FIREBASE. They have a good solution for you.

Apache Session data/ cookies on Ionic/Cordova App

there.
I have my app's authentication running over an IFrame (it reuses an already functional structure shared by other systems based on web browser and it's MUST BE done this way). The iframe works just fine on all the enviroments (Android and iOS, emulators and devices), so we are good with it running that way.
My problem is: on the web systems, the auth process sends back an apache's session/cookie which tells the browser that a user is already authenticated and all other systems that shares the same auth protocol just knows the users are good to go without another 'sign in' process. When the user closes the browser, those session/cookies are cleared and when another window tries to access our system again, a new sign in form is presented to use make a new login. I need to reproduce this "cleaning" on my app but I don't know what, exactly, to clean.
I've already try the cache clearing methods available but nothing seems to do the trick I need.
Any clues?
PS: If I go to the device's seetings and clear all the app's data from there, I can make it work but is not a good way from the UX's perspective.
Thanks in advance!

is it possible to use data from a website that i don't really have access to for my cordova/phonegap app

I'm in the process of making an app for my assessment at uni using cordova/phonegap and was just wondering if its possible for me to use data from a my unis ecom website for my app without having any back-end access to it, so like images/prices/descriptions...synced to my app?
yes it is certainly possible, because Cordova means working via Javascript and a HTML5 Rendering Engine. It is with some reservations entirely possible to load data from an webserver and use it in an App.
The only thing is to ask, whether it is also a smart-choice. If you want your app not to break when the data from the website gets changed (see https://en.wikipedia.org/wiki/Link_rot )
Also the server can somewhat prevent access of data from contextes outside of the webpage, especially if TSL/HTTPS connection is offered and content is only available after authentication.
Yet anyway its the magic of Javascript to be very good in doing things with web/online resources and displaying HTML5. Cordova and PHonegap is hence imo much better than the very challenging JAVA-Dalvik and IOs native programming that one would have to use else
Likely not,
Google and Apple frowns on using apps as wrappers for websites.
Quote Google Developer Program Policies - Spam and Placement in the Store
Do not post an app where the primary functionality is to:
Drive affiliate traffic to a website or
Provide a webview of a website not owned or administered by you (unless you have permission from the website owner/administrator to do so)
And
Quote Apple iTunes Guidelines - 2.12
Apps that are not very useful, unique, are simply web sites bundled as Apps, or do not provide any lasting entertainment value may be rejected

Deleting and changing google appengine endpoints

I have created a small project in Google apengine and like it apart from one thing: It seems virtually impossible to delete or change an endpoint, once it has been made. The API often stays the same, regardless of code changes in the java endpoint classes. I tried to delete the complete API, but that is not possible either. Is there any way to do this?
RE: Deletion
it's not currently supported, but we're working on it.
RE: API Changes
The Google APIs Explorer web app aggressively caches, so you'll need to clear your cache or force a refresh when you update your API server side to see the changes in the client.

Resources