Browser... Game

try{ getFittingBoard(new Topic()); }
catch (Exception e) { postHere() };

Browser... Game

Postby B33T » Thu May 06, 2010 12:29 pm

Hello All,
First of im B33T.
I got my first android device about 2 weeks ago now and WOW... superb ;) so thanks to the rest of you coders for bringing some awesome apps.
now here is my question.
I am a php coder and im currently creating a Browser Based online game and would like to have an app for android devices,
I figure the easiest way (I have no idea about android coding so this is just my brain thinking its easiest..) is to have a app that is just a browser that links to the site, so i wonder is it possible to add the browser component to an app and preferably remove the address bar?
if this is the kind of thing somebody is able to make in about 3 minutes that would be fantastic or if somebody can point me to some real basic stuff to do it, ive installed eclipse and the and addon but ive been struggling to understand it, its a very different language to what i am used to.

EDIT:
Also it would be nice to disable the ZOOM function as ive made the site fit the android screen therefore zoom is not needed and looks horrid when typing the login details
Thanks in advance,
B33T
B33T
Freshman
Freshman
 
Posts: 2
Joined: Thu May 06, 2010 12:22 pm

Top

Postby nioupy » Mon May 10, 2010 9:00 pm

I am not one 100% sure about that (still learning the hard way coding on android) but my guess is that you could create a new project in eclipse and have it more or less this way :
- your Manifest file :
- android:theme="@android:style/Theme.NoTitleBar" to remove the title bar
- <uses-permission android:name="android.permission.INTERNET" /> : to allow internet

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  4.  
  5.      package="com.url.loader"
  6.  
  7.      android:versionCode="1"
  8.  
  9.      android:versionName="1.0">
  10.  
  11.           <uses-permission android:name="android.permission.INTERNET" />  
  12.  
  13.      
  14.  
  15.     <application android:icon="@drawable/icon" android:theme="@android:style/Theme.NoTitleBar" android:label="@string/app_name">
  16.  
  17.         <activity android:name=".main"
  18.  
  19.                  android:label="@string/app_name">
  20.  
  21.             <intent-filter>
  22.  
  23.                 <action android:name="android.intent.action.MAIN" />
  24.  
  25.                 <category android:name="android.intent.category.LAUNCHER" />
  26.  
  27.             </intent-filter>
  28.  
  29.         </activity>
  30.  
  31.  
  32.  
  33.     </application>
  34.  
  35.     <uses-sdk android:minSdkVersion="2" />
  36.  
  37.  
  38.  
  39. </manifest>
Parsed in 0.003 seconds, using GeSHi 1.0.8.4


your Layout file :
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  4.  
  5.    android:orientation="vertical"
  6.  
  7.    android:layout_width="fill_parent"
  8.  
  9.    android:layout_height="fill_parent"
  10.  
  11.    ><WebView
  12.  
  13.                         android:layout_height="fill_parent" android:layout_width="fill_parent" android:id="@+id/web"></WebView>
  14.  
  15.  
  16.  
  17. </LinearLayout>
  18.  
  19.  
Parsed in 0.002 seconds, using GeSHi 1.0.8.4


your java class :
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. package com.url.loader;
  2.  
  3.  
  4.  
  5. import android.app.Activity;
  6.  
  7. import android.os.Bundle;
  8.  
  9. import android.webkit.WebView;
  10.  
  11.  
  12.  
  13.  
  14.  
  15. public class main extends Activity {
  16.  
  17.     /** Called when the activity is first created. */
  18.  
  19.     @Override
  20.  
  21.     public void onCreate(Bundle savedInstanceState) {
  22.  
  23.         super.onCreate(savedInstanceState);
  24.  
  25.         setContentView(R.layout.main);
  26.  
  27.                  WebView web = (WebView)findViewById(R.id.web);
  28.  
  29.                  web.loadUrl("http://www.google.fr/");
  30.  
  31.  
  32.  
  33.     }
  34.  
  35. }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


this should do the trick for you,
nioupy
Developer
Developer
 
Posts: 36
Joined: Sat Apr 03, 2010 1:34 pm

Top

Return to OFF-Topic

Who is online

Users browsing this forum: No registered users and 6 guests