Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-21 Thread Fabien R
On 07/06/12 21:21, Lars wrote:
> Hello
> I am new at this site and new at developing.
>   
Don't be in hurry.
Spend time on tutorials on android (there are lots of good ones) and
read the doc on android dev site
http://developer.android.com/resources/index.html

Good luck :-)
Fabien

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-17 Thread amj27
Did you mention the next activity that you wanted to see after the button 
click in the androidmanifest.xml file ,if not then it should fix your 
issue..  :)



On Thursday, June 14, 2012 11:42:41 PM UTC+5:30, MagouyaWare wrote:
>
> It seems i implemented the OnClickListener correctly, my phone makes a 
>> sound when i click the button
>>
> Just because you get a sound when you press the button doesn't mean that 
> you implemented your OnClickListener correctly.
>  
>
>> Intent i = new Intent(this, dagensbilde.class); *there is an error 
>> here: The constructor Intent(new View.OnClickListener(){}, 
>> Class) is undefined
>>
>
> Your intent declaration should be as follows:
> Intent i = new Intent(BrowserActivity.this, dagensbilde.class);
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Thu, Jun 14, 2012 at 12:07 PM, Lars  wrote:
>
>> It seems i implemented the OnClickListener correctly, my phone makes a 
>> sound when i click the button, but does'nt open the next activity. My code 
>> is below, but i don't know what the error means.
>>
>> btw i bought a book a couple a months ago; Hello android, third edition. 
>> It got me started but it seems to be no good at debugging. Especially 
>> becuase i wrote exactly what it told me(with the exeptions of the buttons 
>> names etc.).
>>
>> Thank you very much :)
>>
>> public class BrowserActivity extends Activity {
>> protected void onCreate(Bundle icicle) {
>> super.onCreate(icicle);
>>
>> setContentView(R.layout.main);
>>
>> final Button dagens_button = (Button) 
>> findViewById(R.id.dagens_button);
>> dagens_button.setOnClickListener(new View.OnClickListener() {
>> public void onClick(View v) {
>> switch (v.getId()){
>> case R.id.dagens_button:
>> Intent i = new Intent(this, dagensbilde.class); *there is an 
>> error here: The constructor Intent(new View.OnClickListener(){}, 
>> Class) is undefined
>> startActivity(i);
>> break;
>> }
>> // Perform action on click
>> }
>> });
>> }{;
>> }}
>>
>> Den onsdag den 13. juni 2012 20.45.49 UTC+2 skrev Chris Ruskai:
>>
>>> If that's your entire Activity, I don't see an onCreate function or 
>>> anything that calls setContentView to tell the app which xml file to use 
>>> for the activity's layout.
>>>
>>> For example: 
>>>
>>> @Override
>>>  public void onCreate(Bundle savedInstanceState) {
>>> super.onCreate(**savedInstanceState);
>>> setContentView(R.layout.main);
>>> }
>>>
>>> On Wed, Jun 13, 2012 at 11:22 AM, Lars  wrote:
>>>
 Here's my activity.java:

 package lars.browser;

 import lars.browser.dagensbilde;
 import android.app.Activity;
 import android.os.Bundle;
 import android.content.Intent;
 import android.view.View;
 import android.view.View.**OnClickListener;


 public class BrowserActivity extends Activity {
 /** Called when the activity is first created. */
 public void onClick(View v) {
 if (v.getId() == R.id.dagens_button) {
 View dagens_button = findViewById(R.id.dagens_**button);
  dagens_button.**setOnClickListener((**OnClickListener) this);
  Intent i = new Intent(this, dagensbilde.class);
 startActivity(i);

 And here's my main.xml

 
 http://schemas.**
 android.com/apk/res/android
 "
 android:layout_width="match_**parent"
 android:layout_height="fill_**parent"
 android:background="@color/**background"
 android:orientation="**horizontal"
 android:padding="30dip" >

 >>> android:orientation="vertical"
 android:layout_height="wrap_**content"
 android:layout_width="fill_**parent"
 android:layout_gravity="**center">
 >>> android:text="@string/main_**title"
 android:layout_height="wrap_**content"
 android:layout_width="wrap_**content"
 android:layout_gravity="**center"
 android:layout_marginBottom="**25dip"
 android:textSize="24.5sp"/>


 >>> android:id="@+id/nyeste_**button"
 android:layout_width="265dp"
 android:layout_height="wrap_**content"
 android:layout_gravity="**center"
 android:text="@string/nyeste_**text"
 android:textSize="20sp" />


 >>> android:id="@+id/dagens_**button"
 android:layout_width="265dp"
 android:layout_height="wrap_**content"
 android:layout_gravity="**center"
 android:text="@string/dagens_**text"
 android:textSize="20sp" />

 >>> android:id="@+id/måneds_**button"
 android:layout_width="265dp"
 android:layout_height="wrap_**content"
 android:text="@string/måneds_**text" 

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-17 Thread Lars
It worked what you wrote :).

But when I enter the webpage it tells me to enable javascript and cookies. 
I have enabled javascript but I am not sure i enabled cookies right(but 
sometimes it opens anyway?). plus i can't zoom and scroll horizontal within 
the application, even though i implemented it.

Heres the code:
public class dagensbilde extends Activity {

WebView webView1;
@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.dagensbilde);
CookieSyncManager.getInstance().startSync();
webView1 = (WebView) findViewById(R.id.webView1);
webView1.setWebViewClient(new ourViewClient());
try{
 webView1.loadUrl("http://www.artige.no/dagens/0";);
}catch (Exception e){
e.printStackTrace();
webView1.getSettings().setJavaScriptEnabled(true);
webView1.getSettings().setBuiltInZoomControls(true);
webView1.getSettings().setLoadWithOverviewMode(true);
webView1.getSettings().setUseWideViewPort(true);
webView1.getSettings().setLoadsImagesAutomatically(true);
webView1.getScrollX();
webView1.getSettings().setSupportZoom(true);
webView1.getSettings().getBuiltInZoomControls()

Den fredag den 15. juni 2012 20.55.41 UTC+2 skrev Raghav Sood:
>
> You've put an  tag inside another activity tag. You aren't 
> supposed to do that. Try using:
>
> http://schemas.android.com/apk/res/android";
> package="lars.browser"
> android:versionCode="1"
> android:versionName="1.0" xmlns:tools="
> http://schemas.android.com/tools"; tools:ignore="HardcodedDebugMode">
>
> 
>
>  android:icon="@drawable/ic_launcher"
> android:label="@string/app_name" 
> android:debuggable="true">  
>  android:name=".BrowserActivity"
> android:label="@string/app_name" >
> 
> 
>
>  />
> 
> 
>  android:name=".dagensbilde"
> android:label="@string/dagens_label"
> android:launchMode="standard"
> >
> 
> 
>
> 
>
> On Sat, Jun 16, 2012 at 12:12 AM, Lars  wrote:
>
>> Were you able to see that from the error log?
>>
>>  I can't find any errors, when i look in my book it seems i wrote the 
>> same(with the modifications of the names). But i am probably not writing 
>> the same =)
>>
>> Here's my entire androidManifest.xml:
>>
>> 
>> http://schemas.android.com/apk/res/android";
>> package="lars.browser"
>> android:versionCode="1"
>> android:versionName="1.0" xmlns:tools="
>> http://schemas.android.com/tools"; tools:ignore="HardcodedDebugMode">
>>
>> 
>>
>> > android:icon="@drawable/ic_launcher"
>> android:label="@string/app_name" 
>> android:debuggable="true">  
>> > android:name=".BrowserActivity"
>> android:label="@string/app_name" >
>> > android:name=".dagensbilde"
>> android:label="@string/dagens_label"
>> android:launchMode="standard"
>> >
>> 
>> 
>> 
>>
>> > />
>> 
>> 
>> 
>>
>> 
>>
>> Den fredag den 15. juni 2012 19.35.11 UTC+2 skrev Raghav Sood:
>>
>>> You haven't declared one of your Activities in your manifest, or it has 
>>> been declared incorrectly. So yeah, we would need to see your manifest.
>>>
>>> On Fri, Jun 15, 2012 at 10:58 PM, Lars  wrote:
>>>
 I tried that. The logcat output shows me 14 red error lines.
 I don't understand very little of what it tell.

 Here is the errors: (do you need to see my androidManifest.xml?)

 06-15 19:21:53.139: E/AndroidRuntime(28730): FATAL EXCEPTION: main
 06-15 19:21:53.139: E/AndroidRuntime(28730): 
 android.content.**ActivityNotFoundException: 
 Unable to find explicit activity class 
 {lars.browser/lars.browser.**dagensbilde}; 
 have you declared this activity in your AndroidManifest.xml?
 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
 android.app.Instrumentation.**checkStartActivityResult(**
 Instrumentation.java:1508)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
 android.app.Instrumentation.**execStartActivity(**
 Instrumentation.java:1384)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.app.Activity.**
 startActivityForResult(**Activity.java:3190)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.app.Activity.**
 startActivity(Activity.java:**3297)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
 lars.browser.BrowserActivity$**1.onClick(BrowserActivity.**java:24)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.view.View.**
 performClick(View.java:3511)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.view.View$**
 PerformClick.run(View.java:**14105)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.os.Handler.**
 han

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-17 Thread Lars
I worked what you wrote :).

But when I enter the webpage it tells me to enable javascript and cookies. 
I have enabled javascript but I am not sure i enabled cookies right(but 
sometimes it opens anyway?). plus i can't zoom and scroll within the 
application, even though i implemented it.

Heres the code:
public class dagensbilde extends Activity {

WebView webView1;
@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.dagensbilde);
CookieSyncManager.getInstance().startSync();
webView1 = (WebView) findViewById(R.id.webView1);
webView1.setWebViewClient(new ourViewClient());
try{
 webView1.loadUrl("http://www.artige.no/dagens/0";);
}catch (Exception e){
e.printStackTrace();
webView1.getSettings().setJavaScriptEnabled(true);
webView1.getSettings().setBuiltInZoomControls(true);
webView1.getSettings().setLoadWithOverviewMode(true);
webView1.getSettings().setUseWideViewPort(true);
webView1.getSettings().setLoadsImagesAutomatically(true);
webView1.getScrollX();
webView1.getSettings().setSupportZoom(true);
webView1.getSettings().getBuiltInZoomControls();

Den fredag den 15. juni 2012 20.55.41 UTC+2 skrev Raghav Sood:
>
> You've put an  tag inside another activity tag. You aren't 
> supposed to do that. Try using:
>
> http://schemas.android.com/apk/res/android";
> package="lars.browser"
> android:versionCode="1"
> android:versionName="1.0" xmlns:tools="
> http://schemas.android.com/tools"; tools:ignore="HardcodedDebugMode">
>
> 
>
>  android:icon="@drawable/ic_launcher"
> android:label="@string/app_name" 
> android:debuggable="true">  
>  android:name=".BrowserActivity"
> android:label="@string/app_name" >
> 
> 
>
>  />
> 
> 
>  android:name=".dagensbilde"
> android:label="@string/dagens_label"
> android:launchMode="standard"
> >
> 
> 
>
> 
>
> On Sat, Jun 16, 2012 at 12:12 AM, Lars  wrote:
>
>> Were you able to see that from the error log?
>>
>>  I can't find any errors, when i look in my book it seems i wrote the 
>> same(with the modifications of the names). But i am probably not writing 
>> the same =)
>>
>> Here's my entire androidManifest.xml:
>>
>> 
>> http://schemas.android.com/apk/res/android";
>> package="lars.browser"
>> android:versionCode="1"
>> android:versionName="1.0" xmlns:tools="
>> http://schemas.android.com/tools"; tools:ignore="HardcodedDebugMode">
>>
>> 
>>
>> > android:icon="@drawable/ic_launcher"
>> android:label="@string/app_name" 
>> android:debuggable="true">  
>> > android:name=".BrowserActivity"
>> android:label="@string/app_name" >
>> > android:name=".dagensbilde"
>> android:label="@string/dagens_label"
>> android:launchMode="standard"
>> >
>> 
>> 
>> 
>>
>> > />
>> 
>> 
>> 
>>
>> 
>>
>> Den fredag den 15. juni 2012 19.35.11 UTC+2 skrev Raghav Sood:
>>
>>> You haven't declared one of your Activities in your manifest, or it has 
>>> been declared incorrectly. So yeah, we would need to see your manifest.
>>>
>>> On Fri, Jun 15, 2012 at 10:58 PM, Lars  wrote:
>>>
 I tried that. The logcat output shows me 14 red error lines.
 I don't understand very little of what it tell.

 Here is the errors: (do you need to see my androidManifest.xml?)

 06-15 19:21:53.139: E/AndroidRuntime(28730): FATAL EXCEPTION: main
 06-15 19:21:53.139: E/AndroidRuntime(28730): 
 android.content.**ActivityNotFoundException: 
 Unable to find explicit activity class 
 {lars.browser/lars.browser.**dagensbilde}; 
 have you declared this activity in your AndroidManifest.xml?
 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
 android.app.Instrumentation.**checkStartActivityResult(**
 Instrumentation.java:1508)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
 android.app.Instrumentation.**execStartActivity(**
 Instrumentation.java:1384)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.app.Activity.**
 startActivityForResult(**Activity.java:3190)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.app.Activity.**
 startActivity(Activity.java:**3297)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
 lars.browser.BrowserActivity$**1.onClick(BrowserActivity.**java:24)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.view.View.**
 performClick(View.java:3511)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.view.View$**
 PerformClick.run(View.java:**14105)
 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.os.Handler.**
 handleCallback

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-15 Thread asheesh arya
your activity declaration is missing !!! try to include activity in your
manifest file

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-15 Thread Raghav Sood
You've put an  tag inside another activity tag. You aren't
supposed to do that. Try using:

http://schemas.android.com/apk/res/android";
package="lars.browser"
android:versionCode="1"
android:versionName="1.0" xmlns:tools="http://schemas.android.com/tools";
tools:ignore="HardcodedDebugMode">

















On Sat, Jun 16, 2012 at 12:12 AM, Lars  wrote:

> Were you able to see that from the error log?
>
>  I can't find any errors, when i look in my book it seems i wrote the
> same(with the modifications of the names). But i am probably not writing
> the same =)
>
> Here's my entire androidManifest.xml:
>
> 
> http://schemas.android.com/apk/res/android";
> package="lars.browser"
> android:versionCode="1"
> android:versionName="1.0" xmlns:tools="
> http://schemas.android.com/tools"; tools:ignore="HardcodedDebugMode">
>
> 
>
>  android:icon="@drawable/ic_launcher"
> android:label="@string/app_name"
> android:debuggable="true">
>  android:name=".BrowserActivity"
> android:label="@string/app_name" >
>  android:name=".dagensbilde"
> android:label="@string/dagens_label"
> android:launchMode="standard"
> >
> 
> 
> 
>
>  />
> 
> 
> 
>
> 
>
> Den fredag den 15. juni 2012 19.35.11 UTC+2 skrev Raghav Sood:
>
>> You haven't declared one of your Activities in your manifest, or it has
>> been declared incorrectly. So yeah, we would need to see your manifest.
>>
>> On Fri, Jun 15, 2012 at 10:58 PM, Lars  wrote:
>>
>>> I tried that. The logcat output shows me 14 red error lines.
>>> I don't understand very little of what it tell.
>>>
>>> Here is the errors: (do you need to see my androidManifest.xml?)
>>>
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): FATAL EXCEPTION: main
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): 
>>> android.content.**ActivityNotFoundException:
>>> Unable to find explicit activity class 
>>> {lars.browser/lars.browser.**dagensbilde};
>>> have you declared this activity in your AndroidManifest.xml?
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
>>> android.app.Instrumentation.**checkStartActivityResult(**
>>> Instrumentation.java:1508)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
>>> android.app.Instrumentation.**execStartActivity(**
>>> Instrumentation.java:1384)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.app.Activity.**
>>> startActivityForResult(**Activity.java:3190)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.app.Activity.**
>>> startActivity(Activity.java:**3297)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
>>> lars.browser.BrowserActivity$**1.onClick(BrowserActivity.**java:24)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.view.View.**
>>> performClick(View.java:3511)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.view.View$**
>>> PerformClick.run(View.java:**14105)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.os.Handler.**
>>> handleCallback(Handler.java:**605)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at android.os.Handler.**
>>> dispatchMessage(Handler.java:**92)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
>>> android.os.Looper.loop(Looper.**java:137)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
>>> android.app.ActivityThread.**main(ActivityThread.java:4575)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
>>> java.lang.reflect.Method.**invokeNative(Native Method)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
>>> java.lang.reflect.Method.**invoke(Method.java:511)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at com.android.internal.os.
>>> **ZygoteInit$**MethodAndArgsCaller.run(**ZygoteInit.java:789)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at com.android.internal.os.
>>> **ZygoteInit.main(ZygoteInit.**java:556)
>>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
>>> dalvik.system.NativeStart.**main(Native Method)
>>>
>>>
>>> Den fredag den 15. juni 2012 17.49.15 UTC+2 skrev MagouyaWare:
>>>
 When the app closes "unexpectedly" the best thing to do to figure out
 the cause of the problem is to look at the logcat output... It will usually
 tell you the file and the line where the crash happened, along with what
 the problem is (e.g. NullPointerException, etc...)

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/**m**agouyaware


 On Fri, Jun 15, 2012 at 7:33 AM, Lars  wrote:

> I did as you wrote, and it seems to work.
> But, when I press the button, the app closes "unexpectedly". I have
> declared the next activity in the android manifest. I can't show you the
> code till 

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-15 Thread Lars
Were you able to see that from the error log?

 I can't find any errors, when i look in my book it seems i wrote the 
same(with the modifications of the names). But i am probably not writing 
the same =)

Here's my entire androidManifest.xml:


http://schemas.android.com/apk/res/android";
package="lars.browser"
android:versionCode="1"
android:versionName="1.0" 
xmlns:tools="http://schemas.android.com/tools"; 
tools:ignore="HardcodedDebugMode">



  













Den fredag den 15. juni 2012 19.35.11 UTC+2 skrev Raghav Sood:
>
> You haven't declared one of your Activities in your manifest, or it has 
> been declared incorrectly. So yeah, we would need to see your manifest.
>
> On Fri, Jun 15, 2012 at 10:58 PM, Lars  wrote:
>
>> I tried that. The logcat output shows me 14 red error lines.
>> I don't understand very little of what it tell.
>>
>> Here is the errors: (do you need to see my androidManifest.xml?)
>>
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): FATAL EXCEPTION: main
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): 
>> android.content.ActivityNotFoundException: Unable to find explicit activity 
>> class {lars.browser/lars.browser.dagensbilde}; have you declared this 
>> activity in your AndroidManifest.xml?
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1508)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> android.app.Activity.startActivityForResult(Activity.java:3190)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> android.app.Activity.startActivity(Activity.java:3297)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> lars.browser.BrowserActivity$1.onClick(BrowserActivity.java:24)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> android.view.View.performClick(View.java:3511)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> android.view.View$PerformClick.run(View.java:14105)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> android.os.Handler.handleCallback(Handler.java:605)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> android.os.Handler.dispatchMessage(Handler.java:92)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> android.os.Looper.loop(Looper.java:137)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> android.app.ActivityThread.main(ActivityThread.java:4575)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> java.lang.reflect.Method.invokeNative(Native Method)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> java.lang.reflect.Method.invoke(Method.java:511)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
>> 06-15 19:21:53.139: E/AndroidRuntime(28730): at 
>> dalvik.system.NativeStart.main(Native Method)
>>
>>
>> Den fredag den 15. juni 2012 17.49.15 UTC+2 skrev MagouyaWare:
>>
>>> When the app closes "unexpectedly" the best thing to do to figure out 
>>> the cause of the problem is to look at the logcat output... It will usually 
>>> tell you the file and the line where the crash happened, along with what 
>>> the problem is (e.g. NullPointerException, etc...)
>>>
>>> Thanks,
>>> Justin Anderson
>>> MagouyaWare Developer
>>> http://sites.google.com/site/**magouyaware
>>>
>>>
>>> On Fri, Jun 15, 2012 at 7:33 AM, Lars  wrote:
>>>
 I did as you wrote, and it seems to work.
 But, when I press the button, the app closes "unexpectedly". I have 
 declared the next activity in the android manifest. I can't show you the 
 code till I get home.

 Thanks for the help:-)

 --
 You received this message because you are subscribed to the Google
 Groups "Android Developers" group.
 To post to this group, send email to android-developers@**
 googlegroups.com 
 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=en

>>>
>>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> -- 
> Raghav Sood
> Please do not email private questions to me as I do not have time to 
> answe

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-15 Thread Raghav Sood
You haven't declared one of your Activities in your manifest, or it has
been declared incorrectly. So yeah, we would need to see your manifest.

On Fri, Jun 15, 2012 at 10:58 PM, Lars  wrote:

> I tried that. The logcat output shows me 14 red error lines.
> I don't understand very little of what it tell.
>
> Here is the errors: (do you need to see my androidManifest.xml?)
>
> 06-15 19:21:53.139: E/AndroidRuntime(28730): FATAL EXCEPTION: main
> 06-15 19:21:53.139: E/AndroidRuntime(28730):
> android.content.ActivityNotFoundException: Unable to find explicit activity
> class {lars.browser/lars.browser.dagensbilde}; have you declared this
> activity in your AndroidManifest.xml?
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1508)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> android.app.Activity.startActivityForResult(Activity.java:3190)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> android.app.Activity.startActivity(Activity.java:3297)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> lars.browser.BrowserActivity$1.onClick(BrowserActivity.java:24)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> android.view.View.performClick(View.java:3511)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> android.view.View$PerformClick.run(View.java:14105)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> android.os.Handler.handleCallback(Handler.java:605)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> android.os.Handler.dispatchMessage(Handler.java:92)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> android.os.Looper.loop(Looper.java:137)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> android.app.ActivityThread.main(ActivityThread.java:4575)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> java.lang.reflect.Method.invoke(Method.java:511)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
> 06-15 19:21:53.139: E/AndroidRuntime(28730): at
> dalvik.system.NativeStart.main(Native Method)
>
>
> Den fredag den 15. juni 2012 17.49.15 UTC+2 skrev MagouyaWare:
>
>> When the app closes "unexpectedly" the best thing to do to figure out the
>> cause of the problem is to look at the logcat output... It will usually
>> tell you the file and the line where the crash happened, along with what
>> the problem is (e.g. NullPointerException, etc...)
>>
>> Thanks,
>> Justin Anderson
>> MagouyaWare Developer
>> http://sites.google.com/site/**magouyaware
>>
>>
>> On Fri, Jun 15, 2012 at 7:33 AM, Lars  wrote:
>>
>>> I did as you wrote, and it seems to work.
>>> But, when I press the button, the app closes "unexpectedly". I have
>>> declared the next activity in the android manifest. I can't show you the
>>> code till I get home.
>>>
>>> Thanks for the help:-)
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@**
>>> googlegroups.com 
>>> To unsubscribe from this group, send email to
>>> android-developers+**unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en
>>>
>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Raghav Sood
Please do not email private questions to me as I do not have time to answer
them. Instead, post them to public forums where others and I can answer and
benefit from them.
http://www.appaholics.in/ - Founder
http://www.apress.com/9781430239451 - Author
+91 81 303 77248

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-15 Thread Lars
I tried that. The logcat output shows me 14 red error lines.
I don't understand very little of what it tell.

Here is the errors: (do you need to see my androidManifest.xml?)

06-15 19:21:53.139: E/AndroidRuntime(28730): FATAL EXCEPTION: main
06-15 19:21:53.139: E/AndroidRuntime(28730): 
android.content.ActivityNotFoundException: Unable to find explicit activity 
class {lars.browser/lars.browser.dagensbilde}; have you declared this 
activity in your AndroidManifest.xml?
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1508)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
android.app.Activity.startActivityForResult(Activity.java:3190)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
android.app.Activity.startActivity(Activity.java:3297)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
lars.browser.BrowserActivity$1.onClick(BrowserActivity.java:24)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
android.view.View.performClick(View.java:3511)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
android.view.View$PerformClick.run(View.java:14105)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
android.os.Handler.handleCallback(Handler.java:605)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
android.os.Handler.dispatchMessage(Handler.java:92)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
android.os.Looper.loop(Looper.java:137)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
android.app.ActivityThread.main(ActivityThread.java:4575)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
java.lang.reflect.Method.invokeNative(Native Method)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
java.lang.reflect.Method.invoke(Method.java:511)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
06-15 19:21:53.139: E/AndroidRuntime(28730): at 
dalvik.system.NativeStart.main(Native Method)


Den fredag den 15. juni 2012 17.49.15 UTC+2 skrev MagouyaWare:
>
> When the app closes "unexpectedly" the best thing to do to figure out the 
> cause of the problem is to look at the logcat output... It will usually 
> tell you the file and the line where the crash happened, along with what 
> the problem is (e.g. NullPointerException, etc...)
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Fri, Jun 15, 2012 at 7:33 AM, Lars  wrote:
>
>> I did as you wrote, and it seems to work.
>> But, when I press the button, the app closes "unexpectedly". I have 
>> declared the next activity in the android manifest. I can't show you the 
>> code till I get home.
>>
>> Thanks for the help:-)
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-15 Thread Justin Anderson
When the app closes "unexpectedly" the best thing to do to figure out the
cause of the problem is to look at the logcat output... It will usually
tell you the file and the line where the crash happened, along with what
the problem is (e.g. NullPointerException, etc...)

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Fri, Jun 15, 2012 at 7:33 AM, Lars  wrote:

> I did as you wrote, and it seems to work.
> But, when I press the button, the app closes "unexpectedly". I have
> declared the next activity in the android manifest. I can't show you the
> code till I get home.
>
> Thanks for the help:-)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-15 Thread Lars
I did as you wrote, and it seems to work. 
But, when I press the button, the app closes "unexpectedly". I have declared 
the next activity in the android manifest. I can't show you the code till I get 
home.

Thanks for the help:-)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-14 Thread Justin Anderson
>
> It seems i implemented the OnClickListener correctly, my phone makes a
> sound when i click the button
>
Just because you get a sound when you press the button doesn't mean that
you implemented your OnClickListener correctly.


> Intent i = new Intent(this, dagensbilde.class); *there is an error
> here: The constructor Intent(new View.OnClickListener(){},
> Class) is undefined
>

Your intent declaration should be as follows:
Intent i = new Intent(BrowserActivity.this, dagensbilde.class);

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Jun 14, 2012 at 12:07 PM, Lars  wrote:

> It seems i implemented the OnClickListener correctly, my phone makes a
> sound when i click the button, but does'nt open the next activity. My code
> is below, but i don't know what the error means.
>
> btw i bought a book a couple a months ago; Hello android, third edition.
> It got me started but it seems to be no good at debugging. Especially
> becuase i wrote exactly what it told me(with the exeptions of the buttons
> names etc.).
>
> Thank you very much :)
>
> public class BrowserActivity extends Activity {
> protected void onCreate(Bundle icicle) {
> super.onCreate(icicle);
>
> setContentView(R.layout.main);
>
> final Button dagens_button = (Button)
> findViewById(R.id.dagens_button);
> dagens_button.setOnClickListener(new View.OnClickListener() {
> public void onClick(View v) {
> switch (v.getId()){
> case R.id.dagens_button:
> Intent i = new Intent(this, dagensbilde.class); *there is an
> error here: The constructor Intent(new View.OnClickListener(){},
> Class) is undefined
> startActivity(i);
> break;
> }
> // Perform action on click
> }
> });
> }{;
> }}
>
> Den onsdag den 13. juni 2012 20.45.49 UTC+2 skrev Chris Ruskai:
>
>> If that's your entire Activity, I don't see an onCreate function or
>> anything that calls setContentView to tell the app which xml file to use
>> for the activity's layout.
>>
>> For example:
>>
>> @Override
>>  public void onCreate(Bundle savedInstanceState) {
>> super.onCreate(**savedInstanceState);
>> setContentView(R.layout.main);
>> }
>>
>> On Wed, Jun 13, 2012 at 11:22 AM, Lars  wrote:
>>
>>> Here's my activity.java:
>>>
>>> package lars.browser;
>>>
>>> import lars.browser.dagensbilde;
>>> import android.app.Activity;
>>> import android.os.Bundle;
>>> import android.content.Intent;
>>> import android.view.View;
>>> import android.view.View.**OnClickListener;
>>>
>>>
>>> public class BrowserActivity extends Activity {
>>> /** Called when the activity is first created. */
>>> public void onClick(View v) {
>>> if (v.getId() == R.id.dagens_button) {
>>> View dagens_button = findViewById(R.id.dagens_**button);
>>>  dagens_button.**setOnClickListener((**OnClickListener) this);
>>>  Intent i = new Intent(this, dagensbilde.class);
>>> startActivity(i);
>>>
>>> And here's my main.xml
>>>
>>> 
>>> http://schemas.**
>>> android.com/apk/res/android 
>>> "
>>> android:layout_width="match_**parent"
>>> android:layout_height="fill_**parent"
>>> android:background="@color/**background"
>>> android:orientation="**horizontal"
>>> android:padding="30dip" >
>>>
>>> >> android:orientation="vertical"
>>> android:layout_height="wrap_**content"
>>> android:layout_width="fill_**parent"
>>> android:layout_gravity="**center">
>>> >> android:text="@string/main_**title"
>>> android:layout_height="wrap_**content"
>>> android:layout_width="wrap_**content"
>>> android:layout_gravity="**center"
>>> android:layout_marginBottom="**25dip"
>>> android:textSize="24.5sp"/>
>>>
>>>
>>> >> android:id="@+id/nyeste_**button"
>>> android:layout_width="265dp"
>>> android:layout_height="wrap_**content"
>>> android:layout_gravity="**center"
>>> android:text="@string/nyeste_**text"
>>> android:textSize="20sp" />
>>>
>>>
>>> >> android:id="@+id/dagens_**button"
>>> android:layout_width="265dp"
>>> android:layout_height="wrap_**content"
>>> android:layout_gravity="**center"
>>> android:text="@string/dagens_**text"
>>> android:textSize="20sp" />
>>>
>>> >> android:id="@+id/måneds_**button"
>>> android:layout_width="265dp"
>>> android:layout_height="wrap_**content"
>>> android:text="@string/måneds_**text"
>>> android:layout_gravity="**center"
>>> android:textSize="20sp"/>
>>> >> android:id="@+id/alltid_**button"
>>> android:layout_width="265dp"
>>> android:layout_height="wrap_**content"
>>> android:text="@string/alltid_**text"
>>> android:layout_gravity="**center"
>>> android:textSize="20sp"/>
>>> >> android:id="@+id/aboutd

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-14 Thread Lars
It seems i implemented the OnClickListener correctly, my phone makes a 
sound when i click the button, but does'nt open the next activity. My code 
is below, but i don't know what the error means.

btw i bought a book a couple a months ago; Hello android, third edition. It 
got me started but it seems to be no good at debugging. Especially becuase 
i wrote exactly what it told me(with the exeptions of the buttons names 
etc.).

Thank you very much :)

public class BrowserActivity extends Activity {
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);

setContentView(R.layout.main);

final Button dagens_button = (Button) 
findViewById(R.id.dagens_button);
dagens_button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
switch (v.getId()){
case R.id.dagens_button:
Intent i = new Intent(this, dagensbilde.class); *there is an 
error here: The constructor Intent(new View.OnClickListener(){}, 
Class) is undefined
startActivity(i);
break;
}
// Perform action on click
}
});
}{;
}}

Den onsdag den 13. juni 2012 20.45.49 UTC+2 skrev Chris Ruskai:
>
> If that's your entire Activity, I don't see an onCreate function or 
> anything that calls setContentView to tell the app which xml file to use 
> for the activity's layout.
>
> For example: 
>
> @Override
>  public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
> }
>
> On Wed, Jun 13, 2012 at 11:22 AM, Lars  wrote:
>
>> Here's my activity.java:
>>
>> package lars.browser;
>>
>> import lars.browser.dagensbilde;
>> import android.app.Activity;
>> import android.os.Bundle;
>> import android.content.Intent;
>> import android.view.View;
>> import android.view.View.OnClickListener;
>>
>>
>> public class BrowserActivity extends Activity {
>> /** Called when the activity is first created. */
>> public void onClick(View v) {
>> if (v.getId() == R.id.dagens_button) {
>> View dagens_button = findViewById(R.id.dagens_button);
>> dagens_button.setOnClickListener((OnClickListener) this);
>>  Intent i = new Intent(this, dagensbilde.class);
>> startActivity(i);
>>
>> And here's my main.xml
>>
>> 
>> http://schemas.android.com/apk/res/android";
>> android:layout_width="match_parent"
>> android:layout_height="fill_parent"
>> android:background="@color/background"
>> android:orientation="horizontal"
>> android:padding="30dip" >
>>
>> > android:orientation="vertical"
>> android:layout_height="wrap_content"
>> android:layout_width="fill_parent"
>> android:layout_gravity="center">
>> > android:text="@string/main_title"
>> android:layout_height="wrap_content"
>> android:layout_width="wrap_content"
>> android:layout_gravity="center"
>> android:layout_marginBottom="25dip"
>> android:textSize="24.5sp"/>
>>
>>
>> > android:id="@+id/nyeste_button"
>> android:layout_width="265dp"
>> android:layout_height="wrap_content"
>> android:layout_gravity="center"
>> android:text="@string/nyeste_text"
>> android:textSize="20sp" />
>>
>>
>> > android:id="@+id/dagens_button"
>> android:layout_width="265dp"
>> android:layout_height="wrap_content"
>> android:layout_gravity="center"
>> android:text="@string/dagens_text"
>> android:textSize="20sp" />
>>
>> > android:id="@+id/måneds_button"
>> android:layout_width="265dp"
>> android:layout_height="wrap_content"
>> android:text="@string/måneds_text" 
>> android:layout_gravity="center"
>> android:textSize="20sp"/>
>> > android:id="@+id/alltid_button"
>> android:layout_width="265dp"
>> android:layout_height="wrap_content"
>> android:text="@string/alltid_text" 
>> android:layout_gravity="center"
>> android:textSize="20sp"/>
>> > android:id="@+id/aboutdev_button"
>> android:layout_width="265dp"
>> android:layout_height="wrap_content"
>> android:text="@string/aboutdev_button"
>> android:layout_gravity="center"
>> android:textSize="20sp"/>
>>   
>> 
>>
>>
>> Please tell me if i need anything.
>>
>> Den onsdag den 13. juni 2012 01.52.28 UTC+2 skrev cellurl:
>>
>>> Get Jetboy working first.
>>> http://www.udemy.com/write-**and-publish-an-app-for-your-**
>>> android-smartphone/
>>> It will teach you a lot and only take 1hour.
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Jun 12, 2012 at 5:50 PM, Justin Anderson 
>>> wrote:
>>>
 Without seeing your code there is no way of knowing...

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/**magouyaware


 On Thu, J

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-14 Thread KracyAndrodian Developer
Explain more about your problem

On Wed, Jun 13, 2012 at 1:12 PM, Lars  wrote:

> Okay, I will post the code when I get home.
>
> What do you need to see, Java or xml?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-13 Thread Justin Anderson
According to your code, you are not setting the click listener on your
button until you click on the button... Adding the click listener should
also go in your onCreate() method...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Jun 13, 2012 at 1:19 PM, Lars  wrote:

> Thank you very much =). It worked=)
>
> But of some reason when i press the dagens_button on my phone it does'nt
> open the attached(dagensbilde.java) activity(which is a webview activity).
> Did i do something wrong in the code i already posted.
>
> Thank you in advance.
>
> Lars.
>
>
>
>
> Den onsdag den 13. juni 2012 20.45.49 UTC+2 skrev Chris Ruskai:
>
>> If that's your entire Activity, I don't see an onCreate function or
>> anything that calls setContentView to tell the app which xml file to use
>> for the activity's layout.
>>
>> For example:
>>
>> @Override
>>  public void onCreate(Bundle savedInstanceState) {
>> super.onCreate(**savedInstanceState);
>> setContentView(R.layout.main);
>> }
>>
>> On Wed, Jun 13, 2012 at 11:22 AM, Lars  wrote:
>>
>>> Here's my activity.java:
>>>
>>> package lars.browser;
>>>
>>> import lars.browser.dagensbilde;
>>> import android.app.Activity;
>>> import android.os.Bundle;
>>> import android.content.Intent;
>>> import android.view.View;
>>> import android.view.View.**OnClickListener;
>>>
>>>
>>> public class BrowserActivity extends Activity {
>>> /** Called when the activity is first created. */
>>> public void onClick(View v) {
>>> if (v.getId() == R.id.dagens_button) {
>>> View dagens_button = findViewById(R.id.dagens_**button);
>>>  dagens_button.**setOnClickListener((**OnClickListener) this);
>>>  Intent i = new Intent(this, dagensbilde.class);
>>> startActivity(i);
>>>
>>> And here's my main.xml
>>>
>>> 
>>> http://schemas.**
>>> android.com/apk/res/android 
>>> "
>>> android:layout_width="match_**parent"
>>> android:layout_height="fill_**parent"
>>> android:background="@color/**background"
>>> android:orientation="**horizontal"
>>> android:padding="30dip" >
>>>
>>> >> android:orientation="vertical"
>>> android:layout_height="wrap_**content"
>>> android:layout_width="fill_**parent"
>>> android:layout_gravity="**center">
>>> >> android:text="@string/main_**title"
>>> android:layout_height="wrap_**content"
>>> android:layout_width="wrap_**content"
>>> android:layout_gravity="**center"
>>> android:layout_marginBottom="**25dip"
>>> android:textSize="24.5sp"/>
>>>
>>>
>>> >> android:id="@+id/nyeste_**button"
>>> android:layout_width="265dp"
>>> android:layout_height="wrap_**content"
>>> android:layout_gravity="**center"
>>> android:text="@string/nyeste_**text"
>>> android:textSize="20sp" />
>>>
>>>
>>> >> android:id="@+id/dagens_**button"
>>> android:layout_width="265dp"
>>> android:layout_height="wrap_**content"
>>> android:layout_gravity="**center"
>>> android:text="@string/dagens_**text"
>>> android:textSize="20sp" />
>>>
>>> >> android:id="@+id/måneds_**button"
>>> android:layout_width="265dp"
>>> android:layout_height="wrap_**content"
>>> android:text="@string/måneds_**text"
>>> android:layout_gravity="**center"
>>> android:textSize="20sp"/>
>>> >> android:id="@+id/alltid_**button"
>>> android:layout_width="265dp"
>>> android:layout_height="wrap_**content"
>>> android:text="@string/alltid_**text"
>>> android:layout_gravity="**center"
>>> android:textSize="20sp"/>
>>> >> android:id="@+id/aboutdev_**button"
>>> android:layout_width="265dp"
>>> android:layout_height="wrap_**content"
>>> android:text="@string/**aboutdev_button"
>>> android:layout_gravity="**center"
>>> android:textSize="20sp"/>
>>>  
>>> 
>>>
>>>
>>> Please tell me if i need anything.
>>>
>>> Den onsdag den 13. juni 2012 01.52.28 UTC+2 skrev cellurl:
>>>
 Get Jetboy working first.
 http://www.udemy.com/write-**and**-publish-an-app-for-your-**andro**
 id-smartphone/
 It will teach you a lot and only take 1hour.





 On Tue, Jun 12, 2012 at 5:50 PM, Justin Anderson >>> > wrote:

> Without seeing your code there is no way of knowing...
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/**m**agouyaware
>
>
> On Thu, Jun 7, 2012 at 1:21 PM, Lars  wrote:
>
>> Hello
>> I am new at this site and new at developing.
>> The first activity in my application has 5 buttons, every one of them
>> should(at som point when I get it done) lead to a web page using the
>> "webview" wigdet. Eclipse does'nt show any errors o

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-13 Thread Lars
Thank you very much =). It worked=)

But of some reason when i press the dagens_button on my phone it does'nt 
open the attached(dagensbilde.java) activity(which is a webview activity). 
Did i do something wrong in the code i already posted.

Thank you in advance.

Lars.




Den onsdag den 13. juni 2012 20.45.49 UTC+2 skrev Chris Ruskai:
>
> If that's your entire Activity, I don't see an onCreate function or 
> anything that calls setContentView to tell the app which xml file to use 
> for the activity's layout.
>
> For example: 
>
> @Override
>  public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
> }
>
> On Wed, Jun 13, 2012 at 11:22 AM, Lars  wrote:
>
>> Here's my activity.java:
>>
>> package lars.browser;
>>
>> import lars.browser.dagensbilde;
>> import android.app.Activity;
>> import android.os.Bundle;
>> import android.content.Intent;
>> import android.view.View;
>> import android.view.View.OnClickListener;
>>
>>
>> public class BrowserActivity extends Activity {
>> /** Called when the activity is first created. */
>> public void onClick(View v) {
>> if (v.getId() == R.id.dagens_button) {
>> View dagens_button = findViewById(R.id.dagens_button);
>> dagens_button.setOnClickListener((OnClickListener) this);
>>  Intent i = new Intent(this, dagensbilde.class);
>> startActivity(i);
>>
>> And here's my main.xml
>>
>> 
>> http://schemas.android.com/apk/res/android";
>> android:layout_width="match_parent"
>> android:layout_height="fill_parent"
>> android:background="@color/background"
>> android:orientation="horizontal"
>> android:padding="30dip" >
>>
>> > android:orientation="vertical"
>> android:layout_height="wrap_content"
>> android:layout_width="fill_parent"
>> android:layout_gravity="center">
>> > android:text="@string/main_title"
>> android:layout_height="wrap_content"
>> android:layout_width="wrap_content"
>> android:layout_gravity="center"
>> android:layout_marginBottom="25dip"
>> android:textSize="24.5sp"/>
>>
>>
>> > android:id="@+id/nyeste_button"
>> android:layout_width="265dp"
>> android:layout_height="wrap_content"
>> android:layout_gravity="center"
>> android:text="@string/nyeste_text"
>> android:textSize="20sp" />
>>
>>
>> > android:id="@+id/dagens_button"
>> android:layout_width="265dp"
>> android:layout_height="wrap_content"
>> android:layout_gravity="center"
>> android:text="@string/dagens_text"
>> android:textSize="20sp" />
>>
>> > android:id="@+id/måneds_button"
>> android:layout_width="265dp"
>> android:layout_height="wrap_content"
>> android:text="@string/måneds_text" 
>> android:layout_gravity="center"
>> android:textSize="20sp"/>
>> > android:id="@+id/alltid_button"
>> android:layout_width="265dp"
>> android:layout_height="wrap_content"
>> android:text="@string/alltid_text" 
>> android:layout_gravity="center"
>> android:textSize="20sp"/>
>> > android:id="@+id/aboutdev_button"
>> android:layout_width="265dp"
>> android:layout_height="wrap_content"
>> android:text="@string/aboutdev_button"
>> android:layout_gravity="center"
>> android:textSize="20sp"/>
>>   
>> 
>>
>>
>> Please tell me if i need anything.
>>
>> Den onsdag den 13. juni 2012 01.52.28 UTC+2 skrev cellurl:
>>
>>> Get Jetboy working first.
>>> http://www.udemy.com/write-**and-publish-an-app-for-your-**
>>> android-smartphone/
>>> It will teach you a lot and only take 1hour.
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Jun 12, 2012 at 5:50 PM, Justin Anderson 
>>> wrote:
>>>
 Without seeing your code there is no way of knowing...

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/**magouyaware


 On Thu, Jun 7, 2012 at 1:21 PM, Lars  wrote:

> Hello
> I am new at this site and new at developing.
> The first activity in my application has 5 buttons, every one of them 
> should(at som point when I get it done) lead to a web page using the 
> "webview" wigdet. Eclipse does'nt show any errors or mistakes in the code 
> ANYWHERE.
>
> BUT, when I try to run the app on my phone it only shows my background 
> color and the applications name.
>
> This is what Eclipse shows (picture is taken with my phone) in main.xml
>
> 
> This is what my phone shows: as you can see theres something wrong. 
> but what? please help me. Thanks, Lars.
>
> 

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-13 Thread Chris Ruskai
If that's your entire Activity, I don't see an onCreate function or
anything that calls setContentView to tell the app which xml file to use
for the activity's layout.

For example:

@Override
 public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}

On Wed, Jun 13, 2012 at 11:22 AM, Lars  wrote:

> Here's my activity.java:
>
> package lars.browser;
>
> import lars.browser.dagensbilde;
> import android.app.Activity;
> import android.os.Bundle;
> import android.content.Intent;
> import android.view.View;
> import android.view.View.OnClickListener;
>
>
> public class BrowserActivity extends Activity {
> /** Called when the activity is first created. */
> public void onClick(View v) {
> if (v.getId() == R.id.dagens_button) {
> View dagens_button = findViewById(R.id.dagens_button);
> dagens_button.setOnClickListener((OnClickListener) this);
> Intent i = new Intent(this, dagensbilde.class);
> startActivity(i);
>
> And here's my main.xml
>
> 
> http://schemas.android.com/apk/res/android";
> android:layout_width="match_parent"
> android:layout_height="fill_parent"
> android:background="@color/background"
> android:orientation="horizontal"
> android:padding="30dip" >
>
>  android:orientation="vertical"
> android:layout_height="wrap_content"
> android:layout_width="fill_parent"
> android:layout_gravity="center">
>  android:text="@string/main_title"
> android:layout_height="wrap_content"
> android:layout_width="wrap_content"
> android:layout_gravity="center"
> android:layout_marginBottom="25dip"
> android:textSize="24.5sp"/>
>
>
>  android:id="@+id/nyeste_button"
> android:layout_width="265dp"
> android:layout_height="wrap_content"
> android:layout_gravity="center"
> android:text="@string/nyeste_text"
> android:textSize="20sp" />
>
>
>  android:id="@+id/dagens_button"
> android:layout_width="265dp"
> android:layout_height="wrap_content"
> android:layout_gravity="center"
> android:text="@string/dagens_text"
> android:textSize="20sp" />
>
>  android:id="@+id/måneds_button"
> android:layout_width="265dp"
> android:layout_height="wrap_content"
> android:text="@string/måneds_text"
> android:layout_gravity="center"
> android:textSize="20sp"/>
>  android:id="@+id/alltid_button"
> android:layout_width="265dp"
> android:layout_height="wrap_content"
> android:text="@string/alltid_text"
> android:layout_gravity="center"
> android:textSize="20sp"/>
>  android:id="@+id/aboutdev_button"
> android:layout_width="265dp"
> android:layout_height="wrap_content"
> android:text="@string/aboutdev_button"
> android:layout_gravity="center"
> android:textSize="20sp"/>
>  
> 
>
>
> Please tell me if i need anything.
>
> Den onsdag den 13. juni 2012 01.52.28 UTC+2 skrev cellurl:
>
>> Get Jetboy working first.
>> http://www.udemy.com/write-**and-publish-an-app-for-your-**
>> android-smartphone/
>> It will teach you a lot and only take 1hour.
>>
>>
>>
>>
>>
>> On Tue, Jun 12, 2012 at 5:50 PM, Justin Anderson 
>> wrote:
>>
>>> Without seeing your code there is no way of knowing...
>>>
>>> Thanks,
>>> Justin Anderson
>>> MagouyaWare Developer
>>> http://sites.google.com/site/**magouyaware
>>>
>>>
>>> On Thu, Jun 7, 2012 at 1:21 PM, Lars  wrote:
>>>
 Hello
 I am new at this site and new at developing.
 The first activity in my application has 5 buttons, every one of them
 should(at som point when I get it done) lead to a web page using the
 "webview" wigdet. Eclipse does'nt show any errors or mistakes in the code
 ANYWHERE.

 BUT, when I try to run the app on my phone it only shows my background
 color and the applications name.

 This is what Eclipse shows (picture is taken with my phone) in main.xml

 
 This is what my phone shows: as you can see theres something wrong. but
 what? please help me. Thanks, Lars.

 

 --
 You received this message because you are subscribed to the Google
 Groups "Android Developers" group.
 To post to this group, send email to android-developers@**
 googlegroups.com 
 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=en

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-13 Thread Lars
Here's my activity.java:

package lars.browser;

import lars.browser.dagensbilde;
import android.app.Activity;
import android.os.Bundle;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;


public class BrowserActivity extends Activity {
/** Called when the activity is first created. */
public void onClick(View v) {
if (v.getId() == R.id.dagens_button) {
View dagens_button = findViewById(R.id.dagens_button);
dagens_button.setOnClickListener((OnClickListener) this);
Intent i = new Intent(this, dagensbilde.class);
startActivity(i);

And here's my main.xml


http://schemas.android.com/apk/res/android";
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@color/background"
android:orientation="horizontal"
android:padding="30dip" >













  



Please tell me if i need anything.

Den onsdag den 13. juni 2012 01.52.28 UTC+2 skrev cellurl:
>
> Get Jetboy working first.
> http://www.udemy.com/write-and-publish-an-app-for-your-android-smartphone/
> It will teach you a lot and only take 1hour.
>
>
>
>
>
> On Tue, Jun 12, 2012 at 5:50 PM, Justin Anderson wrote:
>
>> Without seeing your code there is no way of knowing...
>>
>> Thanks,
>> Justin Anderson
>> MagouyaWare Developer
>> http://sites.google.com/site/magouyaware
>>
>>
>> On Thu, Jun 7, 2012 at 1:21 PM, Lars  wrote:
>>
>>> Hello
>>> I am new at this site and new at developing.
>>> The first activity in my application has 5 buttons, every one of them 
>>> should(at som point when I get it done) lead to a web page using the 
>>> "webview" wigdet. Eclipse does'nt show any errors or mistakes in the code 
>>> ANYWHERE.
>>>
>>> BUT, when I try to run the app on my phone it only shows my background 
>>> color and the applications name.
>>>
>>> This is what Eclipse shows (picture is taken with my phone) in main.xml
>>>
>>> 
>>> This is what my phone shows: as you can see theres something wrong. but 
>>> what? please help me. Thanks, Lars.
>>>
>>> 
>>>  
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-13 Thread Lars
Okay, I will post the code when I get home.

What do you need to see, Java or xml?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-12 Thread james pruett
Get Jetboy working first.
http://www.udemy.com/write-and-publish-an-app-for-your-android-smartphone/
It will teach you a lot and only take 1hour.





On Tue, Jun 12, 2012 at 5:50 PM, Justin Anderson wrote:

> Without seeing your code there is no way of knowing...
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Thu, Jun 7, 2012 at 1:21 PM, Lars  wrote:
>
>> Hello
>> I am new at this site and new at developing.
>> The first activity in my application has 5 buttons, every one of them
>> should(at som point when I get it done) lead to a web page using the
>> "webview" wigdet. Eclipse does'nt show any errors or mistakes in the code
>> ANYWHERE.
>>
>> BUT, when I try to run the app on my phone it only shows my background
>> color and the applications name.
>>
>> This is what Eclipse shows (picture is taken with my phone) in main.xml
>>
>> 
>> This is what my phone shows: as you can see theres something wrong. but
>> what? please help me. Thanks, Lars.
>>
>> 
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Help, eclipse does'nt show any errors, but app does'nt work on phone.

2012-06-12 Thread Justin Anderson
Without seeing your code there is no way of knowing...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Jun 7, 2012 at 1:21 PM, Lars  wrote:

> Hello
> I am new at this site and new at developing.
> The first activity in my application has 5 buttons, every one of them
> should(at som point when I get it done) lead to a web page using the
> "webview" wigdet. Eclipse does'nt show any errors or mistakes in the code
> ANYWHERE.
>
> BUT, when I try to run the app on my phone it only shows my background
> color and the applications name.
>
> This is what Eclipse shows (picture is taken with my phone) in main.xml
>
> 
> This is what my phone shows: as you can see theres something wrong. but
> what? please help me. Thanks, Lars.
>
> 
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en