Business Sample App Discussion

There isn’t a tutorial on the whole thing.  There are tutorials on various pieces like tableViews and tabBars and such.

hey is there any video/tutorial related to this business sample app? I dont see it anywhere. i can’t learn by just looking at codes in this business sample app. lots of stuffs there I still don’t quite understand. for example, how to show RSS feed in the “blogs” section? i’m only getting more confused when I look at the lua files there lol

There isn’t a tutorial on the whole thing.  There are tutorials on various pieces like tableViews and tabBars and such.

Hi,

I am working on a app and i am new to corona. Can any one share or explain me the code to make the text field user input to get saved in the particular row in sqlite database?

Looking forward for help.

Thanks in advance.

There are sample apps in our SampleCode/Interface/NativeKeyboard folder that will show you how to collect input from the user and get access to the entered data.  Then in SampleCode/Storage/SQLite is code that shows you how to create and write data to the database.

Rob

Hi,

I am working on a app and i am new to corona. Can any one share or explain me the code to make the text field user input to get saved in the particular row in sqlite database?

Looking forward for help.

Thanks in advance.

There are sample apps in our SampleCode/Interface/NativeKeyboard folder that will show you how to collect input from the user and get access to the entered data.  Then in SampleCode/Storage/SQLite is code that shows you how to create and write data to the database.

Rob

Thank you guys for the Sample App. It covers lot of things which are common in a business app.

One thing missing is Native text field. It would be nice to show a scene with native text field.  Just want to see the proper code how to hide/show textfield properly when you change scenes.

I’ve built two app still feel they are not smooth as app build by C-objective.

Thanks for the suggestion.  I’ll see what I can do.

A new developer question: how can I load the thumbnails automatically for each feed?

I need to load the automatically generated thumbnails from YouTube link, Example:

http://img.youtube.com/vi/VIDEOIDHERE/1.jpg

I want my thumbnails to appear. How can I change the local filename = string.format to read the url and display the thumbnails?

I can’t figure out the right way to get the thumbnail for each feed. Any help appreciated, thanks!

local filename = string.format(“http://img.youtube.com/vi/” … videoID … “/1.jpg”,id, string.sub(e.type, string.find(e.type,"/") + 1))

 &nbsp;local found = false &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local j = 0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while j \< #story.enclosures and not found do &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; j = j + 1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local e = story.enclosures[j] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if e.type == "image/jpeg" or e.type == "image/jpg" or e.type == "image/png" then &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Ah Ha! we have a potentially displayable image &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- create a local filename.&nbsp; I suppose I could parse it out of the URL, but it really doesn't matter &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- so make up one, but I do need to parse the extension off of the type. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local filename = string.format("image\_%3d.%s",id, string.sub(e.type, string.find(e.type,"/") + 1)) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Now make Corona SDK do all the heavy lifting for me.&nbsp; This little gem will fetch the URL, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- store it in the Caches directory (to make Apple happy) and when complete it will call a function that &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- will shove it into our row for us.&nbsp; If the image is bad, or doesn't exist, then it won't display anything &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- though it should drop a message into the console log. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; display.loadRemoteImage( e.url, "GET", thumbListener, filename, system.CachesDirectory, 0, 0 ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end

Hi there, I was wondering how I might go about having the tab bar vertically on the left side of the screen as apposed to horizontally on the bottom? Nothing I’ve tried seems to work :confused: Any help would be much appreciated!

Corona SDK widgets are built to emulate the design patterns of their native OS equivalents.  In the case of the tabBar, Android really doesn’t use one and in iOS, it’s a navigation bar at the bottom of the screen.  We do not support a vertical tabBar with this widget.

Many people request features that are limited to their specific use or that a few people would find useful, such as this.  With the limited engineering time, we simply cannot honor every feature request that comes along.  Because of this, for widgets, we made them open source.  They are written in Lua (no native code) so any Corona SDK developer can download the widget library from our github repository and build in whatever features they like.  You can have a local copy of the widget library for your app to use.  You can find the library here:

https://github.com/coronalabs/framework-widget

Feel free to download and modify them as you see fit.

Rob

Ok, thanks for getting back to me Rob. I have another question. Is it possible to modify the videoViewer to use native.newVideo()?

No, those are not open source.

Rob

Hi, I get this warning in the terminal. I think this has to do with spinner.

 WARNING: timer.resume( timerId ) ignored b/c timerId was not paused.

Is this causing an issue?

Rob

No, it’s not causing issue and not sure if anything will do on iOS.

Thank you guys for the Sample App. It covers lot of things which are common in a business app.

One thing missing is Native text field. It would be nice to show a scene with native text field.  Just want to see the proper code how to hide/show textfield properly when you change scenes.

I’ve built two app still feel they are not smooth as app build by C-objective.

Thanks for the suggestion.  I’ll see what I can do.

Hi,

I’ve tried Atom feed but there are some problems with parser. Cannot retrieve the effective entries…

Atom feed passed check well from remote validator:

http://validator.w3.org/feed

The rss version works well…

Of course I’ve replaced the correct “require” in the feed.lua file…

Is there any problem?

Thanks in advance

-j