dbankier / TiShadow

Quick Titanium previews across devices
http://tishadow.yydigital.com
Other
385 stars 122 forks source link

Android webview for local html, local images #30

Open ewindso opened 11 years ago

ewindso commented 11 years ago

If I create a webview using a local html file (say "page.html") and within page.html I reference images locally (), it won't display / find the image. However, if I run on device (outside of TiShadow) it finds it OK.

Btw -- are you going to the CODESTRONG? Be great to say "hi" and talk about where you're going with TiShadow. I feel next to Titanium it's the best thing for mobile dev.

enminc commented 11 years ago

Great to hear you are going, look forward to meeting you and seeing you there as well.

dbankier commented 11 years ago

@ewindso html files are currently not rewritten for TiShadow. If you can put together a quick sample app for me I will try an make it work. I am speaking at codestrong so I might look at it on the flight. Looking forward to seeing you there.

ewindso commented 11 years ago

Thanks man -- no worries, I'll just wait 'til I see you speak man. Have a good flight!

dbankier commented 11 years ago

I found a little bit of time to look at this. Here are the steps to make it work (sort of), if you are referencing local files (images, pictures, etc):

I've only tested against and iOS Simulator (which works) and Android device (which doesn't).

jbeuckm commented 11 years ago

Thanks - the .jsf extension solved the problem I was having loading local JS files into an HTML page within a WebView.

segamail commented 11 years ago

excuse me.. I tried .jsf extension solution, but can't solve the problem on android TiShadow.. my PC's OS is windows 7( so now android only) device install works right on .js and .jsf extention. please tell me specific advice.

for example my test source directory. testapp

index.html >>> testapp2

map.jsf >>> testapp3

do I have a misunderstanding??

dbankier commented 11 years ago

@segamail you would need to change the script tag to point to the file, but I don't think it works on Android anyway. I think there is an issue with relative paths (to ApplicationDataDirectory) in the Ti SDK. I will need to look into (eventually).

segamail commented 11 years ago

thanks reply. humm.. i also will try other ways.

yomybaby commented 10 years ago

Is there any new about this issue?

dbankier commented 10 years ago

sorry @yomybaby, haven't looked at it any further (yet). See my comment above for iOS.

foolprooflabs commented 10 years ago

thanks for your work @dbankier ; is there any update on the Android issue?