Closed shantanookirtane closed 10 years ago
Hi ! Have you tried the given sample to check that it was working ? It seems that you've removed the fragment. I don't think that it is necessary. But since you didn't use the sample as it is, it is more difficult for me to find what is not working for you... Maybe you are missing a permission or something else.
You have tried the sample on your computer ? It was designed to be used on Android and not on a laptop's navigator which has already a working localStorage.
Hi
Thanks for the attention, I will try your project today on Samsung Note (OS 4.1.2), once I do that I will update with my objservation
By mistake I closed the issue so reponed again
I tried importing your project into my local workspace so that I can transfer the same to my Samsung Note 4.1.2 But there are lot of issues with your code. The code is not even compiling.
Adding screen shots for your reference.
Following is my Android SDK in my workspace.
It is quite easy, it doesn't compile since you don't have the 17 API level installed on your computer. You have two solutions : either you download it through the Android SDK Manager, or you check another version (for example the 16) in the project's preferences. It should make everything work ;)
Also, add an empty "gen" folder on your project root, so that Eclipse can build the projet.
Le me check this out today
Sorry if i have made any silly mistakes.... On 28 Jan 2014 05:39, "Guillaume Gendre" notifications@github.com wrote:
Also, add an empty "gen" folder on your project root, so that Eclipse can build the projet.
— Reply to this email directly or view it on GitHubhttps://github.com/didimoo/AndroidLocalStorage/issues/1#issuecomment-33467355 .
Hi
Thanks for your guidance, I checked today with your code and it works fine for me.
But when I added same in my code it is not working for me. I am clueless.
Can you and May you help me in resolving this issue? or am I asking too much
Hi !
Ok, I'm relieved. I can first take a quick look at your code to see if any detail appears to me.
Me too :)
I am attaching here the latest .java files and few xml's for you to take a look at.
And in my custom.js I am doing following to set and get Item from localStorage.
-- first statement in my .js
try{ //we replace default localStorage with our Android Database one window.localStorage = LocalStorage; }catch(e){ //LocalStorage class was not found. be sure to add it to the webview alert("LocalStorage ERROR : can't find android class LocalStorage. switching to raw localStorage") }
Mostly I am setting up objects like map or array into localstorage.
-- setting into localstorage localStorage.setItem('videoListService', setObj(videoListMap));
-- getting from locaStorage
getObj(localStorage.getItem('videoListService'));
where
setObj is js function
function setObj(obj) { return JSON.stringify(obj); }
function getObj(obj) { return JSON.parse(obj); }
Your help is highly appreciated!!!
On 29 January 2014 04:24, Diane notifications@github.com wrote:
Hi !
Ok, I'm relieved. I can first take a quick look at your code to see if any detail appears to me.
— Reply to this email directly or view it on GitHubhttps://github.com/didimoo/AndroidLocalStorage/issues/1#issuecomment-33568126 .
Thanks & Regards, Shantanoo Kirtane
#
#
Hey
Sorry if I am annoying you but Did you get a chance to look at my code, do you see any obivous thing?
Thanks in advance!!!
Your code seems clean. Have you just changed the JavaScript code ?
yeah But not around localstorage.....
So u r saying everything is correct from the code prespective.? On 31 Jan 2014 05:23, "Diane" notifications@github.com wrote:
Your code seems clean. Have you just changed the JavaScript code ?
— Reply to this email directly or view it on GitHubhttps://github.com/didimoo/AndroidLocalStorage/issues/1#issuecomment-33775103 .
It seems so. But for example, if you set the webview not the way it should be, it may not work the way you want !
What did you change in you java code ?
Related to webview.....
I m not loading webview by find(R.id.Webview) but instead Webview = new Webview(this)
And setContent(webview)
Also i have not changed anything in progaurd.xml..... is that required for app to work On 31 Jan 2014 07:04, "Diane" notifications@github.com wrote:
It seems so. But for example, if you set the webview not the way it should be, it may not work the way you want !
What did you change in you java code ?
— Reply to this email directly or view it on GitHubhttps://github.com/didimoo/AndroidLocalStorage/issues/1#issuecomment-33788910 .
you use setContent (i don't know this method) or setContentView ? Do you have the init(); call ? Is it not possible for you to initialize your view with XML ?
Sorry setContentView
I can use view through xml that should not be an issue...
But do u know why my code is not working
Am i exploiting u r code in any way..... On 31 Jan 2014 07:29, "Diane" notifications@github.com wrote:
you use setContent (i don't know this method) or setContentView ? Do you have the init(); call ? Is it not possible for you to initialize your view with XML ?
— Reply to this email directly or view it on GitHubhttps://github.com/didimoo/AndroidLocalStorage/issues/1#issuecomment-33790249 .
Hey Just checking...... Did you notice anything which should not be coded the way it should be? Any clue why my code is not working but yours :) :(
I am really perplexed now.
The code is working for me :+1:
The issue was with the targetSdkVersion value, I was using 18 and should have used 19 as I am not setting a DB path in my app
Closing the issue
Please refer to the following stackoverflow page where I have posted details about the issue I am facing.
http://stackoverflow.com/questions/21298664/javascript-interface-not-working-in-my-android-application
Issue: The LocalStorage is NOT working for me. I tried adding some items in LocalStorage but when I am closing the application and opening again those items from Localstorage are getting wiped out.