I am creating an informative application for school students I am having all the contents in word file which is formatted. It contains tables and various styles of fonts,spacing and new lines in it. Can some one tell me how can i display this content in an android application. Or is there any way to display the word file as it is. Thanks in advance
Asked
Active
Viewed 1,735 times
2
-
Why not use open office to read word files on your phone, it's a free application from Google? Do you want code to access MS Word files on Android? There may be an API out there somewhere. Read this: http://stackoverflow.com/questions/14049531/is-there-any-api-in-android-for-ms-office-word-doc-docx-to-image-html-xml-pd What have you tried, have you written any code at all, what issues did you run into? Also here: http://stackoverflow.com/questions/4854947/android-microsoft-office-library-doc-docx-xls-ppt-etc – RossC Jan 29 '14 at 11:59
-
Heyy you can use WebView for this and run your html script in android as your need. – Chirag Ghori Jan 29 '14 at 12:02
-
Actually i had tried converting the word file in to HTML file and then displaying it i converted the file but I was unable to display it can you tell me if it is possible – Sanket Naik Jan 29 '14 at 12:20
2 Answers
0
you may upload all your files on server and view directly using webview you need to approach like this
WebView urlWebView = (WebView)findViewById(R.id.containWebView);
urlWebView.setWebViewClient(new AppWebViewClients());
urlWebView.getSettings().setJavaScriptEnabled(true);
urlWebView.getSettings().setUseWideViewPort(true);
urlWebView.loadUrl("http://docs.google.com/gview?embedded=true&url="
+ "YOUR_DOC_URL_HERE");
public class AppWebViewClients extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
// TODO Auto-generated method stub
view.loadUrl(url);
return true;
}
@Override
public void onPageFinished(WebView view, String url) {
// TODO Auto-generated method stub
super.onPageFinished(view, url);
}
}

Maulik.J
- 636
- 1
- 6
- 14
0
I have got one solution I have converted my word file into HTML File online and then displayed it using webview container thanks all for help

Sanket Naik
- 173
- 2
- 16