Ok but i have problem with the startActivity method.
I created a class ScreenGet witch extends Actity and override
onCreated.
I write a function main to launch it :
------------------ Begin Code ----------------
public class Main
{
public static void main(String[] args)
{
Intent i = new Intent();
i.putExtra("title", "titre");
i.putExtra("label", "label");
i.putExtra("size", 12);
ScreenGet sg = new ScreenGet();
sg.startActivity(i);
}
}
-------------- End Code ---------------------
I supposed when I run it, it launch my activity , but i have got the
following error :
---------------------------------------------------------------------------
#
# An unexpected error has been detected by Java Runtime Environment:
#
# Internal Error (classFileParser.cpp:2923), pid=4668, tid=5032
# Error: ShouldNotReachHere()
#
# Java VM: Java HotSpot(TM) Client VM (11.0-b15 mixed mode windows-
x86)
# An error report file with more information is saved as:
# C:\Users\MXP\workspace\JythonroidFunctions\hs_err_pid4668.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
--------------------------------------------------------------------------
On May 6, 12:19 am, Mark Murphy <[email protected]> wrote:
> [email protected] wrote:
> > Hi,
>
> > I try to launch an Activity created with :
>
> > public class MyActivity extends Activity { ... }
>
> > from a java method.
>
> > Somebody can help me please
>
> startActivity(new Intent(this, MyActivity.class));
>
> --
> Mark Murphy (a Commons
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---