Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 10    Views: 109

EjazAli
Android Fan
Profile
Posts: 2
Reg: Jul 08, 2014
Chandrapur
3,770
07/21/14 05:08 PM (9 years ago)

html txt plugin

hii.. how can i store my txt in d html/txt plugin for offline use.. it loads frm internet at d first tym and den stores it as a cache.. cant i store it in d app itself so dat i do not have to use internet to download txt..
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
07/21/14 06:01 PM (9 years ago)
Hi @EjazAli, Welcome to Buzztouch! If you are using the Custom HTML/Txt plugin, then you can't store it locally. The plugin is designed to have the content reside online, but cache it after the first download. To be clear, this is the plugin that gives you the WYSIWYG editor in the control panel. You can use the HTML plugin to store HTML files locally in the app. Just specify the filename in the control panel, and then put the file in assets > BT_Docs (assuming you're using Android). Hope this helps! Mark
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/21/14 07:55 PM (9 years ago)
Mark (as usual) is right on the money. Custom HTML doesn't work that way; it's 'online only'. But the HTMLDoc plugin 'does' work that way; you can save your HTML Documents within the app bundle (in BT_Docs) for use offline. I do that almost exclusively. Cheers! -- Smug And welcome to Buzztouch! Hope you find what you're looking for! If not, yell! Someone is always willing to help!
 
EjazAli
Android Fan
Profile
Posts: 2
Reg: Jul 08, 2014
Chandrapur
3,770
like
07/22/14 05:11 AM (9 years ago)
thanx for the reply. i tried using html doc plugin and store the file in bt_docs folder. But now what is happening is when i click on d tab to open d file, its showing dis screen, check d screenshot. http://tinypic.com/r/5lp5bd/8 lets say its a txt file, anything.txt which i have uploaded in bt_docs, if i click on open document in d screenshot, it asks me to select an app to open it, like i have 2 text editors.. etc den it opens it in dat editor. Is it not possible to avoid d open document screen and directly open d txt in my app itself ?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/22/14 05:42 AM (9 years ago)
This is 'normal behavior' of the HTMLDoc plugin for Android. At the risk of promoting myself, I have created a 'commercial' plugin, "Smugs Android HTML" that allows you to open the document within your app without the need for a 'helper' application. https://www.buzztouch.com/plugins/plugin.php?pid=BB9E7E5EE65303F35F29CE0 However modestly I think it is priced, it's still 'priced', and for a non-member it's still not expensive, but hey, Ten bucks is Ten bucks. Make sure "that" is what you want, before you consider buying it. If your coding skills are up to snuff, it's not that difficult to create your own plugin, once you get through the BT plugin learning curve. But 'out of the box', what you see is 'normal'. Cheers! -- Smug
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
07/22/14 07:36 AM (9 years ago)
I'll toot Smug's horn and say that his plugin rocks! If you're wanting to eliminate the need for a helper application, then you absolutely should buy his plugin. As a clarification, this type of behavior...using a "helper application" to open different types of documents...is actually a design feature of Android. I'm taking a class on Android development, and in the class the guys from Google say they do it so that a user can choose to use their favorite app for different file types. So, this isn't a limitation of Buzztouch, but rather a design of Android. And, for the record, this doesn't occur on iOS...they can natively handle most document types. Mark
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
07/23/14 09:15 PM (9 years ago)
Actually ... Custom html text plugin does work with local files. Android and iOS and opens in app. the html doc plugin gives me issues and opens in a new browser and is prompted. Just finished an android 3.0 app with local files and no internet.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
07/23/14 09:16 PM (9 years ago)
I must note.. I hardly ever use the control panel so perhaps the json is different but it works for me. Im on the ipad now but I will post my json and screenshot of my settings and the app working. Sorry Smug..
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
07/24/14 08:28 AM (9 years ago)
So here is my config: { "itemId": "Myhappydays", "itemType": "BT_screen_customHTML", "itemNickname": "Happy Days", "localFileName": "happydays.html", "navBarTitleText": "Happy Days", "forceRefresh": "1", } Works with Android and iOS 3.0 local html pages This plugin: Custom HTML / Text http://www.buzztouch.com/plugins/plugin.php?pid=25345CE1537CB2872B9050B
 
Kael716
Aspiring developer
Profile
Posts: 10
Reg: Nov 08, 2016
Dallas
600
like
12/28/16 11:50 AM (7 years ago)
Reviving this because I'm facing a somewhat similar issue... I am creating an app with a menu that shows HTML docs (text only) when the user is offline. To do so I'm using the HTML Docs plugin. It works fine in the iOS Xcode simulator. In Android Studio, however, I'm receiving the same "show document" screen as the user above--whether I use the simulator or a test phone. http://tinypic.com/view.php?pic=5lp5bd&s=8#.WGQGAXeZOwQ And when I click on "Show document" I receive an error. Essentially, the app isn't able to find or display the document at all. All docs are loaded in the appropriate folder on Android Studio: apps>assets>BT_Docs Does anyone have a solution for this? How can I get these HTML files to appear on Android like they do on iOS? Do I need to start over and use Smug's plugin for an Android-only app? Thanks in advance!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/01/17 08:23 PM (7 years ago)
These days, even I use Chris1's Advanced HTML Plugin. He wrote it for both Android and iOS, so one config can work with two platform apps. Cheers! -- Smug
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.