loading an html file from local res directory

by Saied » Thu, 30 Sep 2010 11:46:51 GMT


Sponsored Links
 This should be very simple, but I can't find the answer anywhere.

How do I load an html file (which I assume I keep in res/raw folder)
into a webview?

neither
 mWebView.loadUrl("file:///raw/about");

or  mWebView.loadUrl("file:///raw/about.htmal");

works.

What's the correct syntax or arrangement.

Thank you.

--



loading an html file from local res directory

by Saied » Thu, 30 Sep 2010 12:18:56 GMT


 I found the answer!

I should put the .html file in the assets folder and then use
mWebView.loadUrl("file:///assets/about.html");

Thanks!




--


Sponsored Links


loading an html file from local res directory

by poonam sinha » Thu, 30 Sep 2010 15:29:51 GMT


 Hi I wanna to know
difference  application layer and middle layer in android


what is these layer and use
examplain in details

--



Other Threads

1. ddms problem ping emulator standalone? unable to set gps geo fix

Hello,

I have a simple class like the Hello MapView example on android dev
guide. I have added a location listener to it and when this app runs
on my emulator, i telnet to the emulator and send a geo fix such as
geo fix 1 1. This is causing the emulator to crash with a thread dump
and a list of services that died... what could be wrong? The other
thing that happens before the emulator starts is that my IDE starts
ddms with arguments "ping emulator standalone". This results in an
error at         at
com.android.sdkstats.SdkStatsService.normalizeVersion(SdkStatsService.java:
467). At this line, it is clear that that class is expecting a 4 digit
number with dots in it and my IDE is sending in the word "standalone".
I dont know if these two are related, but I need the ability to set
geo fixes and that is not working!!! Has anyone seen this? What am I
missing?

12-11 23:02:52.378: INFO/DEBUG(31): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
12-11 23:02:52.378: INFO/DEBUG(31): Build fingerprint: 'generic/
google_sdk/generic:2.3/GRH55/79397:eng/test-keys'
12-11 23:02:52.378: INFO/DEBUG(31): pid: 61, tid: 138  >>>
system_server <<<
12-11 23:02:52.387: INFO/DEBUG(31): signal 11 (SIGSEGV), code 1
(SEGV_MAPERR), fault addr 00000000
12-11 23:02:52.397: INFO/DEBUG(31): r0 00000000  r1 406506a0  r2
4128fab4  r3 458f3c74
12-11 23:02:52.397: INFO/DEBUG(31): r4 0000012c  r5 00000000  r6
406506a0  r7 4128fab4
12-11 23:02:52.407: INFO/DEBUG(31): r8 84301321  r9 84302240  10
00100000  fp 00000001
12-11 23:02:52.417: INFO/DEBUG(31): ip 82f0e7d4  sp 458f3c60  lr
82f0ab37  pc 82f07d0e  cpsr 00000030
12-11 23:02:52.768: INFO/DEBUG(31): #00  pc 00007d0e  /system/lib/
libandroid_servers.so
12-11 23:02:52.768: INFO/DEBUG(31): #01  pc 0000ab32  /system/lib/
libandroid_servers.so
12-11 23:02:52.768: INFO/DEBUG(31): #02  pc 000012ca  /system/lib/hw/
gps.goldfish.so
12-11 23:02:52.778: INFO/DEBUG(31): #03  pc 000014ae  /system/lib/hw/
gps.goldfish.so
12-11 23:02:52.778: INFO/DEBUG(31): #04  pc 00011a7c  /system/lib/
libc.so
12-11 23:02:52.778: INFO/DEBUG(31): #05  pc 00011640  /system/lib/
libc.so
12-11 23:02:52.788: INFO/DEBUG(31): code around pc:
12-11 23:02:52.788: INFO/DEBUG(31): 82f07cec ab04b082 9301cb04
6f646804 b00247a0
12-11 23:02:52.788: INFO/DEBUG(31): 82f07cfc bc08bc10 4718b002
b510b40c ab04b082
12-11 23:02:52.788: INFO/DEBUG(31): 82f07d0c 6804cb04 34f89301
47a06824 bc10b002
12-11 23:02:52.788: INFO/DEBUG(31): 82f07d1c b002bc08 46c04718
b510b40c ab04b082
12-11 23:02:52.797: INFO/DEBUG(31): 82f07d2c 9301cb04 34986804
47a06824 bc10b002
12-11 23:02:52.797: INFO/DEBUG(31): code around lr:
12-11 23:02:52.797: INFO/DEBUG(31): 82f0ab14 91099008 f7fb6aa0
900aeb14 1c3a910b
12-11 23:02:52.797: INFO/DEBUG(31): 82f0ab24 6b646b23 930c1c28
1c31940d f7fd9b0f
12-11 23:02:52.797: INFO/DEBUG(31): 82f0ab34 4906f8e7 44791c28
f7ff3150 b011fe1d
12-11 23:02:52.807: INFO/DEBUG(31): 82f0ab44 46c0bdf0 0000454c
000042c8 00000786
12-11 23:02:52.807: INFO/DEBUG(31): 82f0ab54 f7fbb510 bd10ec7c
4802b510 f7fb4478
12-11 23:02:52.807: INFO/DEBUG(31): stack:
12-11 23:02:52.807: INFO/DEBUG(31): 458f3c20  00000000
12-11 23:02:52.807: INFO/DEBUG(31): 458f3c24  40590000  /dev/ashmem/
dalvik-heap (deleted)
12-11 23:02:52.817: INFO/DEBUG(31): 458f3c28  00000009
12-11 23:02:52.817: INFO/DEBUG(31): 458f3c2c  00000000
12-11 23:02:52.817: INFO/DEBUG(31): 458f3c30  0000ab90  [heap]
12-11 23:02:52.817: INFO/DEBUG(31): 458f3c34  81d48bd3  /system/lib/
libdvm.so
12-11 23:02:52.817: INFO/DEBUG(31): 458f3c38  0000ab90  [heap]
12-11 23:02:52.817: INFO/DEBUG(31): 458f3c3c  458f3c6c
12-11 23:02:52.827: INFO/DEBUG(31): 458f3c40  00010004  [heap]
12-11 23:02:52.827: INFO/DEBUG(31): 458f3c44  81d3761b  /system/lib/
libdvm.so
12-11 23:02:52.827: INFO/DEBUG(31): 458f3c48  3ff00000
12-11 23:02:52.827: INFO/DEBUG(31): 458f3c4c  84300daf  /system/lib/hw/
gps.goldfish.so
12-11 23:02:52.827: INFO/DEBUG(31): 458f3c50  0000000c
12-11 23:02:52.827: INFO/DEBUG(31): 458f3c54  458f3e00
12-11 23:02:52.836: INFO/DEBUG(31): 458f3c58  df002777
12-11 23:02:52.836: INFO/DEBUG(31): 458f3c5c  e3a070ad
12-11 23:02:52.836: INFO/DEBUG(31): #00 458f3c60  00000045
12-11 23:02:52.836: INFO/DEBUG(31): 458f3c64  8053bf25  /system/lib/
libandroid_runtime.so
12-11 23:02:52.836: INFO/DEBUG(31): 458f3c68  0000012c
12-11 23:02:52.836: INFO/DEBUG(31): 458f3c6c  82f0ab37  /system/lib/
libandroid_servers.so
12-11 23:02:52.846: INFO/DEBUG(31): 458f3c70  4128fab4  /dev/ashmem/
dalvik-LinearAlloc (deleted)
12-11 23:02:52.846: INFO/DEBUG(31): 458f3c74  00000001
12-11 23:02:52.846: INFO/DEBUG(31): #01 458f3c78  00000000
12-11 23:02:52.846: INFO/DEBUG(31): 458f3c7c  3ff00000
12-11 23:02:52.846: INFO/DEBUG(31): 458f3c80  00000000
12-11 23:02:52.846: INFO/DEBUG(31): 458f3c84  3ff00000
12-11 23:02:52.858: INFO/DEBUG(31): 458f3c88  00000000
12-11 23:02:52.858: INFO/DEBUG(31): 458f3c8c  00000000
12-11 23:02:52.858: INFO/DEBUG(31): 458f3c90  00000000
12-11 23:02:52.858: INFO/DEBUG(31): 458f3c94  00000000
12-11 23:02:52.858: INFO/DEBUG(31): 458f3c98  00000000
12-11 23:02:52.858: INFO/DEBUG(31): 458f3c9c  00000000
12-11 23:02:52.858: INFO/DEBUG(31): 458f3ca0  00000000
12-11 23:02:52.868: INFO/DEBUG(31): 458f3ca4  00000000
12-11 23:02:52.868: INFO/DEBUG(31): 458f3ca8  da73a200
12-11 23:02:52.877: INFO/DEBUG(31): 458f3cac  0000012c
12-11 23:02:52.877: INFO/DEBUG(31): 458f3cb0  458f3e56
12-11 23:02:52.877: INFO/DEBUG(31): 458f3cb4  00000001
12-11 23:02:52.877: INFO/DEBUG(31): 458f3cb8  0000000a
12-11 23:02:52.877: INFO/DEBUG(31): 458f3cbc  458f3de8
12-11 23:02:52.886: INFO/DEBUG(31): 458f3cc0  00000000
12-11 23:02:52.886: INFO/DEBUG(31): 458f3cc4  843018d5  /system/lib/hw/
gps.goldfish.so
12-11 23:02:52.886: INFO/DEBUG(31): 458f3cc8  00000045
12-11 23:02:52.886: INFO/DEBUG(31): 458f3ccc  843012cd  /system/lib/hw/
gps.goldfish.so
12-11 23:03:04.858: DEBUG/Zygote(33): Process 61 terminated by signal
(11)
12-11 23:03:04.858: INFO/Zygote(33): Exit zygote because system server
(61) has terminated
12-11 23:03:04.948: INFO/ServiceManager(28): service 'isms' died
12-11 23:03:04.948: INFO/ServiceManager(28): service 'simphonebook'
died
12-11 23:03:04.948: INFO/ServiceManager(28): service 'iphonesubinfo'
died

-- 

2. High resolution icon require to make my app not "Mature" - What the heck?

So I get a message from google saying that I need to update the
content rating on my apps because otherwise they will default to
mature.  So fine, pull up the developer console, check "All", hit
save.  "High resolution icon required".  Really now?  Is it?  Haven't
touched my icons in like a year - and I certainly don't have the time
to fart around creating a 512x512 (!) version of them just to be able
to make sure my app isn't rated XXX.

Who made the decision to make the high res icon required, and how do I
work around it?

-- 

3. Droid X OTA Update.. apakah akan ngelepas inject kan?

4. hello map view problem

5. Adapter fetches & parses RSS feed to get data - Best Practice?

6. dex in ant with external libs in SDK tools R8

7. Master/King/Uninterruptible App