Is there a library like RPX for Android? - android

Does someone know of a library that is fairly "drop in" and allows you to easily put together multiple authentication options in an Android app to services like Facebook, OpenID, Twitter, etc. much like RPX does?

Make a little HTML page with RPX embedded inside it (like a real site) inside your res folder and render it using WebView. You would need WebView anyways since as a requirement of OpenID and OpenAuth and everything needs you to go to their site. So in the end, you would need to load up a WebView to show the user that screen anyways.

Related

How to change Wordpress content when accessing using a specific URL

I have a Wordpress webpage working great, now I've been asked to develop an Android application with a simple web view that would load the webpage but when using the app it have to change some web behaviors.
Usually you go to the Home, and you have categories like: Services, last deals, projects...
The idea when using the app is going direct to the login page and change the menĂº categories, so some pages would be hidden and another ones would appear.
I've seen the #media way to do it, but I don't want to apply all these changes by resolution, but for type of device.
I checked this out: https://wordpress.org/plugins/simple-mobile-url-redirect/ but then when I redirect to the custom URL and I do the changes, I don't know how to preserve them, while navigating to other pages.
Is there any way of preserving that "mobile session"? or would it be a good choice to create a sub domine and replicate the webpage for mobile? (www.mobile.webpage.com)
I understand your situation and the best idea would be to generate screens using your own code. IN order to get the data from WordPress, you can call WP-Rest handles to get the data.
Alternatively if you only want to load webview, your web team will need to do custom code in order to facilitate your request. The idea is to send query variables to the website when calling from mobile app. Once the url is called, the WP code needs to set up transient/session/cookie and display custom result if transient/session/cookie is set.
I am sorry, I can't find the exact code that I used for somewhat similar work but if your web team has ever dealt with transient or custom session, they should be able to do this without any issue.

How to get the content of website in phonegap?

I have to design a android,ios application for my website.I searched and find out that phonegap can be good one for that.Please provide me info that how to get the content of website in phonegap?On the first page i have buttons like home,contact etc.On click of home button,the home page from website should be shown.
PhoneGap is set of libraries like jQuery.
You normally write html pages and include javascript files from phonegap.
Check out phonegap example project.
Look, what you are talking about is .html,.css,.js files that you can easily get after saving any web page from your web-browser.
Rest you can use in the www folder of your phonegap project. And I
would rather suggest you to go for webview present in the native
android that is nothing but actually would provide you the same
functionality that you have been looking for.
---Edit---
Now as you have said that you want the home page buttons like about us etc. that would be copied via web browser and would be there for you as far as the html code is concerned but if you want it to look well on a small mobile device that you should create a responsive designed html and you should read some good articles about responsive web design. That would actually change your way of thinking about creating applications via html within mobile devices.

displaying user info from website inside Android application

Hey I'm building an app that will allow a user to log into a site (mygranturismo.net) and then will display their personal info, (cars owned, trophies earned, level status, etc) in a layout on the screen. i need to be able to get this info and place certain bits right where i want, also some may be clickable links to other info inside the site. I don't want to simply link to the site, i want to access certain parts and display then in my custom app. an example would be the difference between twitter on Android vs twitter on a pc browser. Any help would be much appreciated.
It sounds like what you're describing is a native mobile application to work with an existing website that's not optimized for mobile. If you own the website, you can create private pages for simplified data retrieval. If it's a website that you don't own, you will need to read the raw HTML and extract the useful info from it. How you do it is up to you, but it will involve string searches and cut/paste of info from the HTML text. The danger in doing this is that if the website owner changes the layout of his pages it will probably break your application.

Easiest way to launch webpage in android with an icon

We have a website that offers an e-mail service. We would like to create a fully fledged app for this but cannot afford this right now. In the mean time it would be great if we could give users an icon on their phones that will take them to a page formatted for mobile on the internet. So what I'd like to know is how can we get an icon on an android users phone that will simply launch a web link in a browser- does this have to be an app, is there an easier way, or am I over estimating how complicated it would be to make this as an app anyway?
Thanks in advance
Create a new Android project (after following the SDK installation steps provided at http://developer.android.com)
on the directory /res/drawable-*dpi you have the laucher icons. Modify all of them.
In the main activity, delete all inside the onCreate method an put this:
String url = "http://www.YOUR-URL.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
This will open the android browser with the URL provided.
I have done projects like this in the past, it is very simple. You need to create a website formatted for a smaller screen. Once you do this, building an android app that displays your website inside it is simple. You can even remove all of the android browser toolbars so it appears as if your website is a real android application. Google android webviews, this will point you in the right direction.
See here for what's probably the best instruction page on how to do exactly that:
http://intelnav.50webs.com/app_project.html
It's based on a Webview, that is it opens the page and does all the navigation in the app window, not in the default browser. So if you want to open it in the browser, you have to use Intent, as said in previous answers.
My 2 pennies worth, I think it's better in the app window unless you really want complex navigation with the possibility of opening additional tabs, windows and so on. The drawback with the external browser is that, as far as I could see, there's no way to tell if the page is already open in the browser so you'll launch a different copy (in a new tab) every time. If the user doesn't close the tab at the end, they usually don't, it can become quite annoying. Besides, within an app you'll probably have somewhat better possibilities for ads should you ever want them.
Versus a simple home-screen bookmark, as others pointed out, it's simpler and more convenient for end users to just download an app from an online store (usually Google Play). It's what they're used to do. And they do have a lot of additional info available, like what it does, what others say about it, screen shots (if you provide some for them but you should). Plus a way to comment / complain themselves. It's a different thing. Technically it may not make a lot of sense but from a simple user's perspective it's clearly better IMO.
One way is to bookmark the site and then add it to your home screen. Source
It seems to me like you need a mobile version of your web page. Do you have that already? Once you have your mobile website (ie. website optimized for mobile devices), you could create a simple application with only one WebView. All content would be fetched from your site and displayed inside a webview. This is trivial to make, however, making an entire mobile website will take some time.
Note that you do not HAVE TO have a mobile website, you could pack you existing website into a WebView, but this would lower user experience.
you would build an app that launches a browser intent linking to your website, or a custom WebView to launch your website in full screen without any navigation bar etc..
The only easier way is to put instructions on your site (directly, or as a contextual pop-up) on how to add the bookmark as an icon on your home screen. This can be slightly more complicated on Android, and depends on the browser. A simpler option for your potential users is to provide a wrapper app via the Marketplace.
It is not overly complicated to create a simple wrapper Android app in Java that launches the browser, using Intents. The essential browser launch code is basically this:
Uri uriUrl = Uri.parse("http://www.yourwebpage.com");
Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(launchBrowser);
A more detailed tutorial for creating this is available here:
http://mobile.tutsplus.com/tutorials/android/launch-android-browser/
Try this kick-start mobile device app for showing websites. Written with cordova for platforms like android, ios, browser and so on: https://github.com/jetedonner/ch.kimhauser.cordova.kickstartwebsite (GooglePlay: https://play.google.com/store/apps/details?id=ch.kimhauser.cordova.kickstartwebsite, Website: http://kimhauser.ch/index.php/projects/cordova-phonegap/kick-start-website)

How can I limit how much is shown in WebView?

I am working on an application that uses WebView to display multiple documents that are hosted online. Preferably, I'd like to have it set so that no scrolling is required. Instead, a "Next" button could be used to bring up a "new page" that would be a continuation of the text.
For example, one of the documents this application would read can be found at
http://www.missionstclare.com/english/May/whole/morning/24m.html
Is there a way to easily break the document up so that it only shows what would fit in the viewport?
Note: This is for an android app using eclipse.
There is no easy, out-of-the-box way to do it.
If you are running the server, then you can check for the user agent and serve a smaller page to the device.
If you are not, you will need to use an URLConnection, retrieve the text, parse it, and display chunks of it in the WebView.

Categories

Resources