Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App shows loading... #3

Open
NiftyServices opened this issue Jul 1, 2016 · 18 comments
Open

App shows loading... #3

NiftyServices opened this issue Jul 1, 2016 · 18 comments
Labels

Comments

@NiftyServices
Copy link

When i build and run the application on android, its says loading...

@NiftyServices
Copy link
Author

NiftyServices commented Jul 2, 2016

Do you know where the problem is?
What can i do to the help?

NDE KONG A.
CEO, NIFTY SERVICES INC.
+237 675 894 972
"WATER SO SOFT YET HARD, SO ARE CODES."

@meisyal
Copy link
Owner

meisyal commented Jul 4, 2016

Sorry, I just built and run the application on Android device. It worked well. I have no issue with "Loading...". The application showed the main activity. But, the problem occurs when you try to add data. The data can't be submitted. I think this application has a problem with SQLite.
Could you give a detail about your device?

@NiftyServices
Copy link
Author

I emulated on firefox and chrome using ionic serve.
I also tested on android 4.0

@meisyal
Copy link
Owner

meisyal commented Jul 4, 2016

Please, don't emulate this application on the web browser! The application will show "Loading..." because this application uses SQLite rather than WebSQL. So, you can't go to the main activity. Use real device instead!

@meisyal
Copy link
Owner

meisyal commented Jul 5, 2016

Do you still have a problem when running this application on Android device?

@NiftyServices
Copy link
Author

Yes Please.
I it still shows loading...

NDE KONG A.
CEO, NIFTY SERVICES INC.
+237 675 894 972
"WATER SO SOFT YET HARD, SO ARE CODES."

@udha19
Copy link

udha19 commented Sep 14, 2016

can i develop this for MySQL?

@meisyal
Copy link
Owner

meisyal commented Sep 15, 2016

Hi @yudhaDitya, could you send me an e-mail instead regarding to your question?

@udha19
Copy link

udha19 commented Sep 15, 2016

Of course
This is my email : [email protected]
*FYI: im from Indonesia

@NiftyServices
Copy link
Author

I have tested the app again on Android 5.1 and it still shows "Loading..."

@NiftyServices
Copy link
Author

I figured it out. I commented lines 17 through 19 on the controllers.js file and then the app works just fine now.

@meisyal
Copy link
Owner

meisyal commented Dec 7, 2016

I am glad that you have figured out the problem.

By the way, can you add a new data into MIM? Add a new product, for example. I am afraid, it will lead to another problem.

@NiftyServices
Copy link
Author

I Have been trying to add data for weeks now, but to no avail. I am still working on it. Any ideas?

@meisyal
Copy link
Owner

meisyal commented Dec 16, 2016

It happened because you commented the line that loads database file (from line 17 to 19). All data are stored in there. But, if you uncomment those lines, the application will stuck on "Loading..." screen. I still have no idea why this happens. Currently, I don't have time to fix that problem.

Thank you for reporting this issue.
Let me know if you figure out this problem! Pull requests are welcome.

@meisyal meisyal added the bug label Dec 16, 2016
@NiftyServices
Copy link
Author

Even after i uncomment the code on the controllers.js on line 17, i then add kill the loading by adding " duration: 3000". the app still does not accept data.

@NiftyServices
Copy link
Author

NiftyServices commented Dec 20, 2016

The issue has been fixed. The app now accepts data. The problem was bootstrapping. If you manually bootstrapp the app by removing the ng-app from the body tag of the index.html file, give the body an id=thestart and then adding the code below into the body tag, the app works fine.
<script> document.addEventListener("deviceready", function() { // retrieve the DOM element that had the ng-app attribute var domElement = document.getElementById("thestart"); angular.bootstrap(domElement, ["starter"]); }, false); </script>

@meisyal
Copy link
Owner

meisyal commented Dec 21, 2016

I have to review this solution first. If you want to send a pull request using this patch, it's OK.

Thank you.

@z3dman
Copy link

z3dman commented Jan 9, 2017

Faced this problem when i initially downloaded the project, the solution is to replace line 22 and line 27 with: db = window.sqlitePlugin.openDatabase({name: 'MIM.db', iosDatabaseLocation:'default'}); on controller.js. This is because Database location or ios Database Location setting is now mandatory in openDatabase call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants