Monday, December 1, 2014
On 10:47 PM by Unknown in Android,
Android Development,
android help,
How to develop android application,
phonegap,
Phonegap problem
5 comments
Like the article?
Hello mobile apps developers! if you are developing Mobile application in Phonegap platform. You might face a problem in sometime ' Connection to the server was unsuccessful. (file ///android_asset/www/index.html) '
Well, I have couple of simple solution for you guys on this note.
Solution 1:
This might happen for extended loading time. You can add some time for loading. The problem will be solved. Process of doing that is :
Here, I'm giving 7 seconds to the system for loading the files. You can increase the time. But, users will face some kind of problem here. They will have to wait this amount of time after opening the application. For that I've another solution. I experimented this solution, and this worked nicely. You can give a try too.
Solution 2:
Call a simple HTML file from MainActivity.java and call your ' index.html ' file from that simple HTML file. For that:
Firstly, create a new html file naming rubel.html and paste below codes into that file:
Now, clean, refresh and build! Hope, this helps you!
Comment if you face any problem!
Subscribe for you!
Share for others!
Phonegap problem |
Well, I have couple of simple solution for you guys on this note.
Solution 1:
This might happen for extended loading time. You can add some time for loading. The problem will be solved. Process of doing that is :
Just after super.loadUrl("file:///android_asset/www/index.html");Add below line:
super.setIntegerProperty("loadUrlTimeoutValue", 7000);
Here, I'm giving 7 seconds to the system for loading the files. You can increase the time. But, users will face some kind of problem here. They will have to wait this amount of time after opening the application. For that I've another solution. I experimented this solution, and this worked nicely. You can give a try too.
Solution 2:
Call a simple HTML file from MainActivity.java and call your ' index.html ' file from that simple HTML file. For that:
Firstly, create a new html file naming rubel.html and paste below codes into that file:
Secondly, Rename the code line super.loadUrl("file:///android_asset/www/index.html"); to super.loadUrl("file:///android_asset/www/rubel.html"); from your MainActivity.java File. And keep the rest same!<!doctype html>
<html>
<head>
<script>
window.location='./index.html';
</script>
</head>
<body>
</body>
</html>
Now, clean, refresh and build! Hope, this helps you!
Comment if you face any problem!
Subscribe for you!
Share for others!
RELATED POSTS
Subscribe to:
Post Comments (Atom)
Search
Powered by Blogger.
Contact with Rubel
Popular Articles
-
Hello mobile apps developers! if you are developing Mobile application in Phonegap platform. You might face a problem in sometime ' C...
-
Hello Google Play Android Developers! Recently, Google is forcing its developers to use Android Studio rather than using Android Developmen...
-
Hello developers! Hope you are doing well. Many people are coming to application developing, specially in the Android arena. Now, What! Th...
-
Polymorphism We are going to create four Java class in our Polymorphism class. Those are: 1. human.java class 2. women.java class...
-
Even if you are not from Computer Engineering background, still you can have Career in Mobile Application Development. Honestly speaking, b...
-
People related to programming and coding often make mistakes or misuse the words Coders and Programmers by not knowing properly. So, questi...
-
Today we are going to learn Inheritance in JAVA. I've created four java class file. Those are: 1. fatherswealth.java ( Superclass ) ...
Tags
- About Me
- admob
- advice
- Android
- Android Development
- android help
- Android SDK set Up
- Android Studio
- Apps development
- Artcell
- bluehost
- body building
- Can't you make your body building at home?
- Career
- career opportunities
- Coding
- coding problem
- computer science and engineering
- cse
- CSS
- css tricks
- Differences Between Programmers and Coders
- Do you really need to go at Gym?
- Do you really need to go to Gym for having a good shaped body?
- Education
- engineering
- Error
- experience sharing
- fitness center
- Free templates
- good life advice
- google adsense
- google adsense success
- google play
- google play account open
- gym
- hostgator
- How can I get a Google Adsense account
- How to be a freelance
- How to develop android application
- how to develop mobile application
- how to earn money online
- how to make money online
- how to monetize mobile application
- HTML
- HTML/CSS
- Java Tutorial
- Lifestyle
- Linux
- Linux Os
- making money online
- Mobile Application Development
- mosharrof rubel
- noakhali zilla school
- online earning tips
- online earning ways
- phonegap
- Phonegap problem
- Programming
- r cannot be resolved to a variable type
- rubel
- software engineering
- southeast university
- Templates
- Ubuntu
- Ubuntu Help
- web hosting buy
- web hosting reseller
- why computer science?
- wordpress theme
Techonlogy
Subscribe Here
Label
- About Me
- admob
- advice
- Android
- Android Development
- android help
- Android SDK set Up
- Android Studio
- Apps development
- Artcell
- bluehost
- body building
- Can't you make your body building at home?
- Career
- career opportunities
- Coding
- coding problem
- computer science and engineering
- cse
- CSS
- css tricks
- Differences Between Programmers and Coders
- Do you really need to go at Gym?
- Do you really need to go to Gym for having a good shaped body?
- Education
- engineering
- Error
- experience sharing
- fitness center
- Free templates
- good life advice
- google adsense
- google adsense success
- google play
- google play account open
- gym
- hostgator
- How can I get a Google Adsense account
- How to be a freelance
- How to develop android application
- how to develop mobile application
- how to earn money online
- how to make money online
- how to monetize mobile application
- HTML
- HTML/CSS
- Java Tutorial
- Lifestyle
- Linux
- Linux Os
- making money online
- Mobile Application Development
- mosharrof rubel
- noakhali zilla school
- online earning tips
- online earning ways
- phonegap
- Phonegap problem
- Programming
- r cannot be resolved to a variable type
- rubel
- software engineering
- southeast university
- Templates
- Ubuntu
- Ubuntu Help
- web hosting buy
- web hosting reseller
- why computer science?
- wordpress theme
Sponsor
Categories
- About Me
- admob
- advice
- Android
- Android Development
- android help
- Android SDK set Up
- Android Studio
- Apps development
- Artcell
- bluehost
- body building
- Can't you make your body building at home?
- Career
- career opportunities
- Coding
- coding problem
- computer science and engineering
- cse
- CSS
- css tricks
- Differences Between Programmers and Coders
- Do you really need to go at Gym?
- Do you really need to go to Gym for having a good shaped body?
- Education
- engineering
- Error
- experience sharing
- fitness center
- Free templates
- good life advice
- google adsense
- google adsense success
- google play
- google play account open
- gym
- hostgator
- How can I get a Google Adsense account
- How to be a freelance
- How to develop android application
- how to develop mobile application
- how to earn money online
- how to make money online
- how to monetize mobile application
- HTML
- HTML/CSS
- Java Tutorial
- Lifestyle
- Linux
- Linux Os
- making money online
- Mobile Application Development
- mosharrof rubel
- noakhali zilla school
- online earning tips
- online earning ways
- phonegap
- Phonegap problem
- Programming
- r cannot be resolved to a variable type
- rubel
- software engineering
- southeast university
- Templates
- Ubuntu
- Ubuntu Help
- web hosting buy
- web hosting reseller
- why computer science?
- wordpress theme
About
Social Share
Recent
Business
Video
Gallery
videos
Popular Posts
-
Hello mobile apps developers! if you are developing Mobile application in Phonegap platform. You might face a problem in sometime ' C...
-
Hello Google Play Android Developers! Recently, Google is forcing its developers to use Android Studio rather than using Android Developmen...
-
Even if you are not from Computer Engineering background, still you can have Career in Mobile Application Development. Honestly speaking, b...
-
You could find this topic little bit interesting and may not be hoping from me! Well, I was at gym for almost one year and I think I'm ...
-
Today, we are going to learn about Thread in JAVA. simpleThread.java Class public class simpleThread implements Runnable { /* ...
-
Polymorphism We are going to create four Java class in our Polymorphism class. Those are: 1. human.java class 2. women.java class...
-
Array: An array is something more or less like a container of data. Array container contains same type of data. Read More from Orac...
-
People related to programming and coding often make mistakes or misuse the words Coders and Programmers by not knowing properly. So, questi...
-
Today we are going to learn Inheritance in JAVA. I've created four java class file. Those are: 1. fatherswealth.java ( Superclass ) ...
-
Hello developers! Hope you are doing well. Many people are coming to application developing, specially in the Android arena. Now, What! Th...
Thanks, the second helped for Cordova app. Need to redirect from a simple page to the page you intend to load.
ReplyDeleteKalau buwat file tnpa mengunakan pc bagai mana?? Tolong bantu kami. Terimakasih.
ReplyDeleteJust run app over old emulator like Android 4.4..... or use real android handset !!!
ReplyDeleteHello AM unable to Find out how i can write those files and where do i paste in Android/src/com/myapp/mainActivity.java
ReplyDeletesuper.loadUrl("file:///android_asset/www/rubel.html");
KONFRIM
ReplyDelete