Can an iOS / Android Phonegap app do nothing but link to a website?

I developed a mobile site that is optimized for android / iOS. I was asked to place it in mobile app stores, however the website is programmed mainly on the server side.

I want to avoid reprogramming the entire mobile website using ajax for phoneGap, as this is just a different version for support, and I want to make sure that any changes that I make on the mobile website are immediately in the application versions, -submit or risk hacking the ajax API that I will need to create.

I know that phoneGap just uses a web view to create an application. Is it possible to have an application for connecting to the telephone network only a link to a website, through a frame, redirection, etc.? (and avoid a website that displays browser controls / chrome); What would be the best way to do this? Also, is there a company that just does this and introduces applications?

Thanks.

+4
source share
2 answers

You can, but as for Apple approving it, this is a different matter, and they most likely will not. Generally, if you are not connected to the Internet, you should at least download the user interface (your submissions) without the corresponding data and put an error message in this regard. Therefore, your application should include these views. For guidance, set your iPhone to flight mode in the settings, then download the Maps, Weather, Youtube, iTunes or Facebook apps and see what they do (have a “shell”). Apple is probably worried that they endorse your application based on your description and the functionality of your application, as promised to you, and then you turn around and completely change it after approval to something undesirable.

phonegap

+3
source

Thomas came to the ios point of view, so I have to make Android to complete the image. From my point of view, using phonegap seems redundant.

If all you need is a "branded browser" that only loads your mobile site, then it would be faster to have one action that loads one WebView . It is essentially a browser without user interface controls (there is support for JavaScript, but no Flash).

You can do the basics:

1) Layout creation

<?xml version="1.0" encoding="utf-8"?> <WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="fill_parent" /> 

2) Specify the URL to download

 public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.loadUrl("http://www.google.com"); } 

With tiny reading, you can cope with the lack of an Internet connection by doing what you would like to do. For reference, use the Google Tutorial at http://developer.android.com/resources/tutorials/views/hello-webview.html

We have some code, but to answer the question “why is this so? I want to use Phonegap” - a simple answer: it’s much “easier” because I didn’t have to turn on Phonegap, but I achieved the same result, the application will load faster and execute the same job.

I told our Ios dev that a similar web view exists for Ios and offers similar functionality. However, this is not my area.

You did not need to learn much about programming on Android to do this, and the same process will still go through to send the application to the market.

+4
source

Source: https://habr.com/ru/post/1393826/


All Articles