E endomorph New Member Dec 13, 2012 #1 Hi all, new to the site and to Basic4Android. I have been writing apps using the online providers such as Apps geyser but want to get into programming myself. The main type of app I write is one which opens a specific website when the app is opened. Could someone give me an example of code for this and is it possible to test on the trial version. I want to try things out before I purchase it. I have had a couple of attempts using snippets I found but when I compile it errors out saying about missing libraries. Thanks Last edited: Dec 13, 2012
Hi all, new to the site and to Basic4Android. I have been writing apps using the online providers such as Apps geyser but want to get into programming myself. The main type of app I write is one which opens a specific website when the app is opened. Could someone give me an example of code for this and is it possible to test on the trial version. I want to try things out before I purchase it. I have had a couple of attempts using snippets I found but when I compile it errors out saying about missing libraries. Thanks
Ohanian Active Member Licensed User Longtime User Dec 13, 2012 #2 Hi, Here's a sample code : Code: Copy Dim intent1 As Intent intent1.Initialize(intent1.ACTION_VIEW, "http://www.google.com") StartActivity(intent1) or within your app : Code: Copy Dim wvBrowser As WebView wvBrowser.Initialize("") Activity.AddView(wvBrowser, 0, 0, 100%x, 100%y) wvBrowser.LoadUrl("http://www.google.com") Upvote 0
Hi, Here's a sample code : Code: Copy Dim intent1 As Intent intent1.Initialize(intent1.ACTION_VIEW, "http://www.google.com") StartActivity(intent1) or within your app : Code: Copy Dim wvBrowser As WebView wvBrowser.Initialize("") Activity.AddView(wvBrowser, 0, 0, 100%x, 100%y) wvBrowser.LoadUrl("http://www.google.com")
E endomorph New Member Dec 13, 2012 #3 Thanks for that. The first piece worked for what I want but it opens the browser with a titled window. I have edited the manifest to - AddManifestText( <uses-sdk android:minSdkVersion="4" /> <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:anyDensity="true"/>) SetApplicationAttribute(android:icon, "@drawable/icon") SetApplicationAttribute(android:label, "$LABEL$") SetApplicationAttribute(android:theme, "@android:style/Theme.NoTitleBar.Fullscreen") But it's still showing. Any ideas ? Upvote 0
Thanks for that. The first piece worked for what I want but it opens the browser with a titled window. I have edited the manifest to - AddManifestText( <uses-sdk android:minSdkVersion="4" /> <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:anyDensity="true"/>) SetApplicationAttribute(android:icon, "@drawable/icon") SetApplicationAttribute(android:label, "$LABEL$") SetApplicationAttribute(android:theme, "@android:style/Theme.NoTitleBar.Fullscreen") But it's still showing. Any ideas ?
E endomorph New Member Dec 13, 2012 #4 Actually I correct this. The app opens full screen then swaps to the browser with the address bar Upvote 0
margret Well-Known Member Licensed User Longtime User Dec 13, 2012 #5 Use the second option that was shown and you can set the title off in the IDE. Last edited: Dec 13, 2012 Upvote 0