Newbie regarding android back button on mobile website - android

I understand that android has this few functions such as onBackPressed() which utilizes the back button on the android phones for native android applications,
I was wondering if it was possible to utilize this backbutton on a mobile website, are there any function or codes for them. Could anyone point me to any reference on these on how to go about coding it if possible.
The other question that I would like to ask as well is that is this also possible for IOS. Considering that the IOS back button is usually built into the application itself.
Added for clarity,
I'm designing my application using mainly jquery stuff.

If you are planning to use twitter bootstrap for you mobile website, may be this what you are looking for here
If you plan to use phone gap, you may want to have a look at
here
If you are using only jquery, then there is no way to disable the hardware back button as explained here

Related

How to embed a website into an Android App?

I have a mobile website, users user smart phone browser to access my site.
Now some users would like to have an Android App.
So is there any easy and fast way to create an Android App which will access the existing mobile website so that I can have an Android App without developing Android app?
You would have to create a "wrapper" Android App. That is a native Android App with a Main Activity that contains a WebView with JavaScript enabled and some sort of navigation controls either on the mobile website or the native app (buttons or menu) but you could bump into problems such as:
Users being stuck in a particular page with no way to navigating back or forward.
Google is now more picky with the apps and they have policies to reject or ban apps that are only wrappers or point to external websites (kind of what Apple did for iOS)
Any case, you would have to create a mobile layout for your website or a make it responsive (special CSS and JS UI/UX that fits better on mobile devices).
Another alternative is to make your website compatible with PROGRESSIVE WEB APPS (https://developers.google.com/web/progressive-web-apps/) which is basically a Web app with some special elements that allow it to receive push notifications, put a shortcut or app icon on the device's home screen, etc.
Good luck! Hope this helped!
You can use android WebView. For more details you go through the link Android Webview
the only way to do that, using WebView on your apps or you need to create manually
You can put your code into Cordova and convert it into other IDE like android studio or eclipse .
reference:
Import Cordova project in Android Studio

android/ios opening external browser while maintaining controle

Good morning everyone,
I am facing an issue with both my Android and iOS apps. While they use webviews, we just had a requirement coming in to open the external browsers in order to reach our payment portal. For iOS especially, as part of the iOS guidelines this is preventing my app from getting accepted unfortunately.
I know how to open the browser externally, however I cannot close it as easily. It seems to boil down to it being a different application all together opened from either my android or iOS code. In this aspect window.close() or something similar does not work.
My question is, is there a trick to it using custom url schemes, all I am trying to achieve is to press a button in my external browser and close said browser which would bring my app back to front.
Or is there some kind of custom intent library for android which could help me achieve the same result.
Any hint would be appreciated, as my research so far as not been very fruitful.. Thank you in advance.

How to create google play app with my website?

I want my website should act as Google play store app.
For example, go to-> hytoz
and hytoz app
Both source are same. But when I open this app, website will shown as app and after click back or close, it's asking confirm like application.
How I can make this? I'm not android person. I'm in PHP.
First of all, making Android app isn't a one click process. To make a simple Android app, you can make use of Android WebView. Since you're new to Android, I'd suggest you to take courses on basics of Android.
You've mentioned you're familiar with PHP. You can better try PhoneGap, with basics of HTML5, CSS3 and JS, you can build an app. Also, your needs like back, close can also be done with it, and moreover, it's cross platform, you can ship to other operating systems too.
Good Luck.

Navigation from HTML5 page to android app

Is it possible to navigate from html5 app in web browser to android app installed on phone.
Question referred to by user247245 in his comment provides one way of doing. Another way is to use a Java class together with your HTML5 application to handle the launching of the application activity.
Have a look at this post: http://satishbellapu.blogspot.co.uk/2011/09/launching-android-native-application.html - while the author's English is not great, it does explain (more-or-less) how to do this.

Cross-platform app to play sounds on button press

I am working on a project where I need to make an Android and iOS app. The App is very simple and only contains buttons with labels on them. When you push a button, the App is going to play a sound. That is the easy part now comes my question and what I need help with. The User wants to be able to have a kind of control admin panel were he can change the sounds and the labels on the buttons. How can I do this easily?
I thought it would be best to make a web page with a kind of form were the user chooses the sounds and labels. What is the best way to connect the web page and the apps?
If the application is that simple use the web technology - the Sencha Touch is very popular web (HTML(5)/JavaScript/CSS3) framework for that. The advantage of the Sencha Touch is the application optimization for mobile phone browsers (screen sizes, rotation, touch events, UI elements).
When you will be done with the Sencha Touch you can use the PhoneGap - this is a wrapper for web content written in native language (Java on Android, Objective-C on iPhone, etc.).
PhoneGap is using the embedded web view component to render the web content you prepare with use of the Sencha Touch. It creates the impression that your application is native one., so you can launch it outside of web browser.
This is of course not the perfect solution and has many (really many) drawbacks, but for your case it might be sufficient and is worth to check.
I would use Phonegap http://phonegap.com/ you can create a web app and run it on a number of different devices.

Categories

Resources