Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Jul 2010
    Posts
    1
    Vote Rating
    0
    erneso.laval is on a distinguished road

      0  

    Default Conflict wit sencha / phonegap & html5 database

    Conflict wit sencha / phonegap & html5 database


    I am building an App with sencha touch & phonegap. But when I tried to open a client side Database (great stuff in html5) my sencha user interface disappears. This just happens when I try it on the iphone (on Safari/Chrome the code works Ok at my computer).

    This is a minimal code that replicates the problem:
    Code:
    <html>
      <head>
    	<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
    	<script type="text/javascript" src="sencha/js/ext-touch-debug.js"> </script>
        <script type="text/javascript" charset="utf-8">
    	Ext.setup({
    		  onReady: function() {	
    		  		panel = new Ext.Panel({
    							   fullscreen: true,
    							   html:'Test',
    							   });
    
    				var db = openDatabase('testDB', '1,0', 'Test DB', 65536);   // (1) Problem
    			}
    		  });
      
        </script>
      </head>
      <body> </body>
    </html>
    If I don't open the database (1) The html "Test" displays correctly. When I open it, it appears briefly and then disappears. If I delete the call to phonegap.js it works OK. From time to time the problem does not occur (Memory issues?).

    So ... it seems that there is a conflict between sencha/phonegap/openDataBase

    Any help or direction is greatly appreciated!!

    ==========
    Update: the problem just takes place when I install the application as a native app (vía PhoneGap & Xcode) to an iphone/app (either simulator or actual device). It is does not happen when I access the app via Internet.

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2009
    Posts
    35
    Vote Rating
    5
    Aldri is on a distinguished road

      0  

    Default


    I don't know about phonegaps & sencha touch bugs, I've never tried the offline feature of phonegap for the moment, but maybe that you could try this: http://www.nils-dehl.de/2010/06/how-...ache-manifest/
    I'm not sure if this will work, but let me know because I will probably have to use it soon

  3. #3
    Ext User
    Join Date
    Jul 2010
    Posts
    2
    Vote Rating
    0
    felipe.alvarado is on a distinguished road

      0  

    Default


    Hello, i'm already solve it with a little trick and maybe some guy can make this better


    Inside my onReady function on my apps.js (main file for sencha) i put a timer that allow avoid memory conflicts between sencha and phonegap.

    Code:
    Ext.setup({
    		  icon: 'icon.png',
    		  tabletStartupScreen: 'phone_startup.png',
    		  phoneStartupScreen: 'phone_startup.png',
    		  glossOnIcon: false,
    		  onReady: function() {	
    
    			var online = navigator.onLine;
    			
    			if(navigator.onLine){
    				
    				setTimeout("Main.init()",2000);
    					  
    		  
    			}else {
    			
    				navigator.notification.alert(
    									   "Solo funcionamos si tiene conexión a internet, lo sentimos :(",
      									   "Sin conexión a internet");
    		  
    
    			}
    
    		  }
    	});
    BTW great job with sencha it's a great framework

  4. #4
    Ext User
    Join Date
    Jul 2010
    Posts
    2
    Vote Rating
    0
    felipe.alvarado is on a distinguished road

      0  

    Default


    the problem is caused because the two framework has a memory collapse at the start on an iphone (in the simulator the memory isn't a problem )

    i've already solved with a trick in the "onReady" method.

    put a timer with a 1000 ms

    Code:
    Ext.setup({
    		  icon: 'icon.png',
    		  tabletStartupScreen: 'phone_startup.png',
    		  phoneStartupScreen: 'phone_startup.png',
    		  glossOnIcon: false,
    		  onReady: function() {	
    
    			var online = navigator.onLine;
    			
    			if(navigator.onLine){
    				navigator.notification.loadingStart();
    				setTimeout("Main.init()",500);
    					  
    		  
    			}else {
    			
    				navigator.notification.alert(
    									   "Solo funcionamos si tiene conexión a internet, lo sentimos :(",
      									   "Sin conexión a internet");
    		  			}
    		  }
    	});

  5. #5
    Sencha User
    Join Date
    Jul 2011
    Posts
    5
    Vote Rating
    0
    hartti is on a distinguished road

      0  

    Default


    I am a beginner both in Sencha and PhoneGap but this tutorial gives another workaround for this issue
    http://www.sencha.com/learn/Tutorial...he_Application

    Yes, I know you asked this last year, but I thought this could help someone else fighting this same issue :-)

    Hartti

Similar Threads

  1. [SOLVED] How make a sencha touch app offline usable with html5 cache manifest?
    By mrsunshine in forum Sencha Touch 1.x: Discussion
    Replies: 9
    Last Post: 21 Nov 2013, 2:19 PM
  2. Sencha Touch Releases & Notes (1.0RC)
    By TommyMaintz in forum Sencha Touch 1.x: Discussion
    Replies: 7
    Last Post: 9 Nov 2010, 9:01 AM
  3. Replies: 0
    Last Post: 29 Jun 2010, 9:41 AM
  4. Looking for a Server & Database Solution
    By philmaker in forum Community Discussion
    Replies: 7
    Last Post: 13 Nov 2009, 4:43 PM

Thread Participants: 3

Tags for this Thread