Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

native.setActivityIndicator
Started by puneetpositive Aug 28 2014 11:36 PM

- - - - -
18 replies to this topic
error occured on device

Best Answer Rob Miracle , 06 September 2014 - 03:20 PM

So lets talk fonts.  First not all font files are of equal quality.  I'm sure fonts from Foundries like Adobe, Bitstream and Apple are well tested and follow standards.  However, J-Random Free font you get off the Internet may not be up to snuff.  They may be tested on Windows and OS-X, but who knows how well tested they are on mobile devices. 

 

Why does this matter?  Corona SDK uses the operating system's font facilities to render an image texture that can be used in OpenGL.  OS-X, Windows, iOS and Android all render fonts a little bit differently.  When we see the screen shots you posted, it's symptomatic of font rendering issues.  You can do a couple of things.  One is to use "Multi-line" text and just have a blank line afterwards.  This will make the text box taller and it won't matter if the blank line gets cut off.   The other is to find a different but similar font.

 

Rob

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

puneetpositive

[GLOBAL: userInfoPane.html]
puneetpositive
  • Enthusiast

  • 34 posts
  • Corona SDK

On changing scene from home.lua to the level1.lua, there is some lag occur due to which i used native.setactivity indicator to hide that lag and everything is working fine but when i run the apk on device then sometimes some functions are not working properly on changing scene. This is all happening after i started using  native.setActivityIndicator. So, please tell me the what are the reasons for this bug?



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,613 posts
  • Enterprise

Are you getting any messages in your device's console log?

 

Need to know how to look at those message?  Please read: http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

 

Thanks

Rob



[TOPIC: post.html]
#3

puneetpositive

[GLOBAL: userInfoPane.html]
puneetpositive
  • Enthusiast

  • 34 posts
  • Corona SDK

thanks..that problem is solved.

 

i have one more problem, on changing scene, i am getting some lag, so what might be the reasons for this problem?

 

 



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,613 posts
  • Enterprise

How much stuff are you creating in the scene:create() function?  If your scene is heavy, you can always preload it using the composer.loadScene() API call at some point before you know you're going to go to it.  Perhaps if this is your game scene and your on a menu scene, you might want to preload the game scene while the user is busy looking at your menu, since thats likely where they will go to.

 

Keep in mind that you should not be starting anything in scene:create() like timers, physics, audio, etc.  Those should be delayed until the scene is on the screen and started in the scene:show()'s "did" phase.  Of course you have to call physics.start() before you can add bodies, so when using a scene manager like this, call physics.start() and immediately call physics.pause() so the simulation isn't running but you can still add bodies.  Then when the scene is on screen call physics.start() again to start everything in motion..... assuming you're using physics.

 

Rob



[TOPIC: post.html]
#5

puneetpositive

[GLOBAL: userInfoPane.html]
puneetpositive
  • Enthusiast

  • 34 posts
  • Corona SDK

Composer.loadscene is working well  but after using this command,some functions are not working properly.



[TOPIC: post.html]
#6

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,613 posts
  • Enterprise

Can you provide more details please?



[TOPIC: post.html]
#7

puneetpositive

[GLOBAL: userInfoPane.html]
puneetpositive
  • Enthusiast

  • 34 posts
  • Corona SDK

when i am using command composer.gotoScene, it will take some time to load that page and lag is around 800 milliseconds. and this is occured bcz my create scene is heavy, so then used composer.loadScene which is working fine but after using this, some function in the recently loaded scene is not working properly for example hardware back key is not working properly after using this and some rotating function also not proper working well.

 

So, what could be the possible reasons for this problem?



[TOPIC: post.html]
#8

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,613 posts
  • Enterprise

If you take the native.setActivityIndicator out, things work fine?



[TOPIC: post.html]
#9

puneetpositive

[GLOBAL: userInfoPane.html]
puneetpositive
  • Enthusiast

  • 34 posts
  • Corona SDK

Right now i am not using native.setactivityindicator in my code after you told me to use composer.loadscene to overcome with lag problem, but after that some functions not working properly.



[TOPIC: post.html]
#10

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,613 posts
  • Enterprise

Are you doing anything in your scene:create() function that could be trying to run while the scene is off screen that should be delayed until the scene:show() event?  Do you have any thing in the scene you are leaving that you're not cleaning up properly?

 

Thanks

Rob



[TOPIC: post.html]
#11

puneetpositive

[GLOBAL: userInfoPane.html]
puneetpositive
  • Enthusiast

  • 34 posts
  • Corona SDK

Whenever i am running the apk of my app in devices, then its working fine but in some devices it is representing only half height of the displayed text.For example i am showing some text "THE" then only half of its height is visible and half is hide. what might be the reason for this problem??



[TOPIC: post.html]
#12

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,613 posts
  • Enterprise

Can you post a screen shot?



[TOPIC: post.html]
#13

puneetpositive

[GLOBAL: userInfoPane.html]
puneetpositive
  • Enthusiast

  • 34 posts
  • Corona SDK

See attached files.

One image is on simulator

and other is on device.

Attached Thumbnails

  • Untitled.png
  • device.png


[TOPIC: post.html]
#14

daniel.strmecki

[GLOBAL: userInfoPane.html]
daniel.strmecki
  • Enthusiast

  • 71 posts
  • Corona SDK

I had a similar issue with text rendering on some devices on this app: https://itunes.apple.com/hr/app/tvprofil/id817401981?mt=8.

I've solved it by using device detection and manually changing height, font size etc...

 

 

 

Daniel



[TOPIC: post.html]
#15

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,613 posts
  • Enterprise

  Best Answer

So lets talk fonts.  First not all font files are of equal quality.  I'm sure fonts from Foundries like Adobe, Bitstream and Apple are well tested and follow standards.  However, J-Random Free font you get off the Internet may not be up to snuff.  They may be tested on Windows and OS-X, but who knows how well tested they are on mobile devices. 

 

Why does this matter?  Corona SDK uses the operating system's font facilities to render an image texture that can be used in OpenGL.  OS-X, Windows, iOS and Android all render fonts a little bit differently.  When we see the screen shots you posted, it's symptomatic of font rendering issues.  You can do a couple of things.  One is to use "Multi-line" text and just have a blank line afterwards.  This will make the text box taller and it won't matter if the blank line gets cut off.   The other is to find a different but similar font.

 

Rob



[TOPIC: post.html]
#16

puneetpositive

[GLOBAL: userInfoPane.html]
puneetpositive
  • Enthusiast

  • 34 posts
  • Corona SDK

What might be the reasons for the following audio related problems?

 

See the attached file.

 

 

Attached Thumbnails

  • error.png


[TOPIC: post.html]
#17

puneetpositive

[GLOBAL: userInfoPane.html]
puneetpositive
  • Enthusiast

  • 34 posts
  • Corona SDK

I am using one audio file for all the explosions and using audio.play when collision occurs but when two or more collision occurs together  then only one audio.play is  calling? 

How to solve this problem to make all audio.play work together at a single time if case occur?



[TOPIC: post.html]
#18

puneetpositive

[GLOBAL: userInfoPane.html]
puneetpositive
  • Enthusiast

  • 34 posts
  • Corona SDK

What might be the reason for the following problem?

 

Problem is occur in imagesheet  {width=4000,height=4800,no. of frames=29} 

 

See attached file for the problem occur.

Attached Thumbnails

  • graphicimagesheet.png


[TOPIC: post.html]
#19

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,613 posts
  • Enterprise

@puneetpositove.  I'm not sure what your post has to do with native.setActivityIndicator.  Please start a new thread as to not hijack this one any further.

 

Thanks

Rob




[topic_controls]
[/topic_controls]