[Q] How to open a URL from an app? - Android Software Development

Just wondering how I open a URL from within an app?
I'm just getting started with Android development, and was going to modify the Hello, Android app to just display a button that I press to open a URL. Here's the thing though, the URL might not be HTTP. It could be ftp, rtsp, or any other protocol. I was just going to hard code the URL into the app.
I assume when I try to open one of these, if a program that handles them is installed and registered, it will just pass that URL to the appropriate place.
Any ideas what the code section would look like to display a button and then open a URL when pressed?

Is there another Android development forum where it would be better to ask this question?

http://developer.android.com/reference/android/content/Intent.html Perhaps?

Related

API to URLy the URL shortener

Hello
I just released v0.9.2 of URLy and it now comes with a simple API that can be used by other app developers to shorten a long URL via URLy.
So, if you are a developer and want to shorten a URL in your own app, but don’t want to go through all the hassle of writing the necessary code yourself, you can just pass the URL to URLy via an intent. URLy will shorten it with the service that you passed along and your app will receive a boolean to indicate whether the shortening process was successful or not, the short URL and, if any errors occurred, a detailed error message about what went wrong.
Why would anyone integrate URLy in his own app? Well, there are several situations in which this makes sense. For example, imagine you write a Twitter app and want to allow your users to shorten URLs. You could write the code to shorten the URL by yourself, or you could just pass the long URL to URLy. You can pass along the service you want to use (you can use about 20 services via URLy, like bit.ly, goo.gl or TinyURL), so you could even give your users the choice to use any service they prefer or provide a custom URL and / or user credentials so that they can keep track of their shortened URLs. And: The integration into your app is pretty much seamless. After calling the intent, a nice and small progress window is shown which disappears automatically after shortening. So, no annoying new window that the users will have to close – they never leave your app.
Take the following screenshot as example. The app in the background is supposed to be your app, the progress window is what URLy shows while shortening:
(sorry, I'm not allowed to post any images, yet, will update as soon as I can)
More information and a detailed code example of how to start the intent and receive the shortened URL are available on my blog in the API section. It's really simple and integrated in a few minutes.
General information about URLy is available in this forum or on my blog. Unfortunately, I still can't post any outside links, so please write me a personal message and I send you the links.
If you have any questions, don't hesitate to ask.

App Developer Bidding

Is there a website where you post what you want and developers bid to do the work? I've used similar services before for html / php / java and was wondering if it was available for android apps???
sites like guru.com and rentacoder.com you may be able to find people.
Do you mind explaining the project"s" your looking at having done. Might find some people here who will be able to help and assist
I thought i saw something similar on www.anddev.org
Sluzpuppet said:
sites like guru.com and rentacoder.com you may be able to find people.
Do you mind explaining the project"s" your looking at having done. Might find some people here who will be able to help and assist
Click to expand...
Click to collapse
Here is my thought (remember, I'm not a developer):
A super basic app: a single icon (like wifi tether) that opens a predefined url that has users info appended to the end as arguments, see example below:
Code:
mydomain,com/page.php?name=mike&id=1234&color=blue
Users info are just text fields with no validation and are setup from the menu button.
This would be a customizable app. A person could modify the app by adding (changing) three files
icon image
url.xml - contains the base url and perhaps the app name
user.xml - contains the users data fields
above example users.xml would add 3 setup fields for name, id, color
by changing the url xml file, you could setup app to piont to any domain
by changing the users.xml, you could setup any number of arguments
by changing icon, app image would match users preference
Ideally it would be best if it could have multiple occurances of the app (maybe just app name being different would work) because I may want it for mydomain.com any you may want to use it for yourdomain.com
Hope this makes sense.

programatically accessing LBSTestMode params

Maybe this is too technical for these forums, sorry if it is...but I hit a brick wall so here goes....
I'm trying to extract the configuration settings displayed by the LBSTestMode app (accessed by entering *#*#1472365#*#*) from within a home-made android app.
It's quite possible that they cannot be directly accessed via the Android API at all, but maybe somebody here knows another way to get them? I've looked through the variables accessible via the obvious places like LocationManager etc. and came up with nothing.
Or maybe somebody knows where the source for this app exists...I'm looking through Samsung's source for the i897 (http://opensource.samsung.com/) as we speak but nothing so far. The app seemed like something the vendor would add into their image but perhaps its part of the basline android source afterall.
Thanks,
Nick

[Q] designing a new app question...

Can i get your opinion of this?
Let's say I'm building a new app and I'd like the business to take ownership of updating certain information.
One button will take the user to "Current Events" which may be updated quarterly. Could I have the business owner just modify an text file and load it to one of their web servers. When the user clicks Current Events, the latest text file would be downloaded and displayed?
Also, there would be a button for "Media Room" - would the smart thing to do be to embed a link to the videos that they are already hosting online?
thanks a lot for your input,
robert.

Store Item Finder / Item Locator

I'm trying to build an app for a school project that will locate items in a grocery store. For example, if I type in "orange juice" into the app, it will create a marker on a floorplan of the store. In this way I want to be able to populate a map with markers that correspond to items in a grocery list. Users can then walk around the store and swipe off markers as they pick up the items.
Does anyone know how I could do this? Are there any open source Android apps currently out there I could look at?
I feel like this would be a fairly simple project involving just uploading a .jpeg into an app and assigning coordinates to classes of items, like "juice" to {20,30} or something like that, but I have very little programming experience and am lost as to how to start.
bump
Well, people normally do not get an answer if they ask how to do the whole app.
So try to find the solution yourself and ask the community if you've got more specific questions/problems.
nikwen said:
Well, people normally do not get an answer if they ask how to do the whole app.
So try to find the solution yourself and ask the community if you've got more specific questions/problems.
Click to expand...
Click to collapse
Yeah I realize that I'm not going to get a step by step process... but I was just asking for general advice. Somebody suggested I use a .shp file and use an overlay with all the markers corresponding to the items, then create a pop up marker event for every time the user selects an item, which was helpful.
I'm looking for general ideas on implementation, that's all.
justinyeh said:
Yeah I realize that I'm not going to get a step by step process... but I was just asking for general advice. Somebody suggested I use a .shp file and use an overlay with all the markers corresponding to the items, then create a pop up marker event for every time the user selects an item, which was helpful.
I'm looking for general ideas on implementation, that's all.
Click to expand...
Click to collapse
You could save the name and the coordinates to files using JSON which can easily be written manually.
Have a look at Google's gson library.

Categories

Resources