Discussion Forums  >  iOS / Android Beta Testers

Replies: 24    Views: 314

Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
04/10/12 10:04 AM (13 years ago)

eBook Plugin for BTv2.0 - Android only!

Ok, nervous. First plugin so please be gentle :) http://dl.dropbox.com/u/56760890/bt_screen_ebook.zip Install as normal. The eBook plugin takes html, images and plain text, converts to screen sized chunks and allows left/right swiping. It doesn't support hyperlinks or videos. If you're having problems with the html editor, you will have the same problems with this. There are some steps outlined on the 'plugin details' screen that may help. If the editor still doesn't work, there are some alternative ebook methods outlined, using the customURL or HTML Doc plugins. There is also a method for using .epub files. This is the first basic release, I'll be working on bookmarking and night/day view when I know this is working ok. Please take a look, find all the problems and post your feedback!
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/10/12 10:21 AM (13 years ago)
That looks pretty sweet! I installed the plugin, and that completed with no problems. Looked at the documentation briefly, and that looks good as well. Can't wait to play around with the actual plugin! Are you intending to release this for iOS at some point as well? Mark
 
hacerapps
buzztouch Evangelist
Profile
Posts: 542
Reg: Jan 30, 2011
usa
11,170
like
04/10/12 10:23 AM (13 years ago)
subscribing to this one
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
04/10/12 10:28 AM (13 years ago)
Nice one buddy, good work.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/10/12 10:43 AM (13 years ago)
YES!!!!! I'll get a look later too. Super stoked.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/10/12 10:47 AM (13 years ago)
Before testing...quick note. @raveyd: Go ahead and remove the files in the source-ios directory (they are not used if it's Android only) so they don't conflict with other files. BT_screen_customHTML.m (REMOVE THIS FILE from the plugin's source-ios folder) BT_screen_customHTML.h (REMOVE THIS FILE the plugin's source-ios folder) If Android / iOS are not implemented, their source directories should be blank. I haven't tested it yet but it looks like you've pulled it off ;-)
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
04/10/12 11:46 AM (13 years ago)
Great work, im mobile right now but once i get next to my computer i'll give it a whirl also! sweet
 
tiger
Aspiring developer
Profile
Posts: 121
Reg: Dec 26, 2010
USA
1,210
like
04/10/12 12:01 PM (13 years ago)
Thanks for your creativity. I'm going to test it my new app.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/10/12 03:38 PM (13 years ago)
Thanks guys! Hope it's working ok! @Mark - No plans to release for iOS, I've yet to even look at an xcode file. Good news it's installed ok :), thanks. @David - I originally removed the xcode directory, but put it back in, in case anyone wanted to work on implementing it. So the standard is to delete an unused platform, right? Will it cause problems if they're not deleted, apart from not working of course? Another question David, sorry... If I build a plugin and want to add other files to different directories - for example an xml file into the res > drawable directory or a jar file into a libs folder, can this be done by creating the folder/file structure in the plugin's source-android folder? Also, can .php files be added to a plugin, ie, if I wanted to extend the advanced properties section? If so, what would be the best approach for doing that?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/10/12 06:54 PM (13 years ago)
@raveyd: iOS / Android: Leave both directories but empty the one you don't use. It's best to leave them but it's OK to have nothing in them. .PHP: Yes, include as many .php scripts as needed. You could do this a few different ways. The index.php page is the landing page for a plugin. It's usually best to use this page as the place to add additional form fields to manipulate any advanced settings the plugin requires. Example 1: index.php is a simple "explanation page" with no settings other than the screens nickname. You'll always want to give users a way to update the screens nickname in their control panel. Example 2: index.php allows user to manipulate navigation bar and other advanced settings. This is how plugins I've created work because most of them have lots of advanced properties. Example 3: index.php uses some advanced properties (like navigation bar settings) and some other custom properties. In this case you would need to modify the HTML to allow the user to make any needed changes. You would probably do this by copy/pasting some form fields in the existing plugin then adding your own form field names to be saved along with the JSON. In all cases, you're additional properties will be saved with the JSON for the screen. This means you'll just add the form field on the index.php page then modify the save_AJAX.php page that accepts the inputs and saves to the database. save_AJAX.php is one way, you could do this tons of ways, depending on your skill and the sophistication of the plugin. Other resources: Have look at BT-server/bt_app/bt_appDownload_AJAX.php This is the file that processes the plugins installed on the users machine. Scroll down to about line 579, this is where the Android process begins. It does this-n-that then reaches line 687 and begins looking at the plugins installed on the persons machine. When looking at each plugin, it says "hmmm, what files are included in this plugin" and figures out where to include them in the Android Project's file structure. Look at line 698, you'll see where it lists all the directories in the Android Project. Next, on about 719 is tries to determine the file extension of the file to then put it in the proper directory. You'll see all sorts of file extensions here. If it's an HTML file, put it in the BT_Docs directory, an Image, put it in the Drawable directory, etc. If it can't determine what to do with your included file(s) it won't include them in the project. Like a .JAR file for example. In this case, you'll need to inform the user (probably in the README.txt or the index.php page) that they need to add this file after packaging their project. "After downloading your project, add this .JAR file to your Android Environment" or something along those lines.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/10/12 07:12 PM (13 years ago)
Subscribing. Well done. Fred
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
04/11/12 01:02 AM (13 years ago)
Hi Raveyd, I just want to congratulate you on your first plugin. I know how hard it is to get things done so respect..... Too bad I can't try it (no android yet). Good luck and Best Regards, Danny
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/11/12 03:27 AM (13 years ago)
Thanks David, much clearer in how the process works now. Thanks Danny! I started simple, it's my 'hello world' plugin! Hopefully I can get a bit more advanced thanks to David's post above. Thanks Fred, your search engine was a great help in finding the posts about the wysiwyg editor issues so I could get the plugin working on my server.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/12/12 01:29 PM (13 years ago)
Any feedback?
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/14/12 05:13 PM (13 years ago)
Ok, I just uploaded the plugin. Was quite amused, since you've the method to create this plugin that I'm working on. Either great minds think alike or it's just the most natural method for quick and easy Plugins (compared to other methods). for some reason I'm having a problem in the BT_item.java file and BT_screen_map.java file. Your plugin shouldn't have anything to do with those files but the previous apps didn't have these problems. Fred I tried to comment out line 54 BT_item.java line 55 //GeoPoint point; private boolean isDeviceLocation = false; but I got lots of errors. Fred
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/14/12 06:42 PM (13 years ago)
Great minds figure out it's the quickest and easiest way to make plugins? :) Those errors are absolutely nothing to do with the plugin! I get that all the time, when I don't use a map plugin. From memory, remove the geo-point import in the BT_item java file and the line you commented out. That opens a whole bunch of errors further down the file. Comment or strip out all that code to the closing } or }} (can't remember which, probably the last curly brace.) and completely delete the BT_screen_map java file.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/14/12 09:33 PM (13 years ago)
OK, it been a bit of a strange journey. First, the Source Code didn't download, then it had unexpected errors, then new errors in second download (but different ) then no errors, followed by suddenly appearing error then success almost. Plugin installed without a problem. Couldn't save inserted html. Was able to use code to create HTML doc. Works very nicely. Should work in iOS. Will try again tomorrow with different HTML. Fred
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/15/12 04:40 AM (13 years ago)
@Fred, are you having problems with the standard customhtml/text plugin too? Not saving the html isn't an ebook plugin issue, it's more likely a ckeditor/server set up issue.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/15/12 07:21 AM (13 years ago)
Yes, you're probably correct. Any solution? BTW, your code works well in DropBox Is there any way to allow clicking on links? Fred
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/15/12 07:40 AM (13 years ago)
@Fred, there are a few things you could try that are outlined in the readme.txt file (easier to read via the 'plugin details' link). The problems I had were all to do with the php.ini settings on my host server. Allowing clickable links isn't so easy, as the code converts the html to base64 .png images. I've got a working version, but due to the div structure the wrong div gets added to the wysiwyg editor. Content has to be added to the source, which isn't so easy for many people. Haven't figured out a workaround yet.
 
Jarcher
Aspiring developer
Profile
Posts: 21
Reg: Jul 08, 2011
London
510
like
05/11/12 11:56 AM (13 years ago)
Am I correct in thinking that in order to use this plugin you need to host BuzzTouch on your own server? As I noticed the following caption on my control panel "Uploading Additional Plugins is disabled on control panels hosted at Buzztouch.com"
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/11/12 12:29 PM (13 years ago)
Yes
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/11/12 12:40 PM (13 years ago)
Yes, but the HTML doc can be used with out the plugin and you can add the plugin files directly to the source code. Fred
 
Jarcher
Aspiring developer
Profile
Posts: 21
Reg: Jul 08, 2011
London
510
like
05/11/12 01:37 PM (13 years ago)
OK... I'm all very new to a lot of this. I've never published any Apps to Android or Apple before. The most I've done is create several websites in Wordpress. I have web hosting with a company in the USA and I've just managed to install BuzzTouch on to the server and also managed to install the Plugin, but I'm kinda confused as to how I proceed next. Basically what I want to do is test the waters on Android Only to begin with and try selling about 5 different books which each have about 1000 to 2000 words each in them. Each book is in roughly 8 to 10 sections and so far they are all Text only Books. I plan to initially sell the books at around $1 to $2 each and just see how that goes, after that plan to reduce the price and eventually I'd like to make the books free with some kind of advertising. But right now I'm at the first stage where I would like to try selling the books for $1 to $2 each. The main reason for only wanting to do this initially on Android is because of how quick it is to actually get the books out there compared to Apple's much longer process of approvals. So right now, I've created a blank application, but not sure how to add my pages in a way that makes them work with this plugin. One of the reasons I want to use this Plugin rather then do it as a straight forward BuzzTouch App is that I want it to look a bit more engaging and visually appealing to the reader. So far I've got a .TXT file with a short book I've written .. the first book is in 10 sections. Any suggestions on how to proceed?
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/11/12 01:44 PM (13 years ago)
Have you opened up the plugin to look around?
 

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.