ANE Android override Activity onNewIntent()

Hi,
I'm trying to create an NFC extension to be informed when a Tag is detected by the NFC sensor.
I guess i have more or less everything i need, expect that onNewIntent override.
In the JAVA samples i saw, as soon as we call enableForegroundDispatch on the NfcAdapter, the onNewIntent() method of the activity specified on the enableForegroundDispatch is called.
We have access to the Activity via the FREContext.getActivity() so i can specify the activity that will get the onNewIntent called, but as i can't really extend the FREContext class, i can't override this method to catch the intent.
Is there any way to achieve this?
Have a nice day !

I found this solution that almost satisfies me :
http://forums.adobe.com/message/4491738?tstart=0#4491738
It's basically based on the fact that passing a tag in front on the NFC chips fires an InvokeEvent to the AIR's NativeApplication.
I'm just searching why i get only one of two tag IDs.
Even if i manually grab the last intent tag ID with the ANE i don't have the new tag but the previous one, until i pass the new tag a second time.
With a pure Java project overriding the onNewIntent as i wanted to do i have no problem. The onNewIntent() is called everytime a new tag is detected.
And for now, i have no idea what could be the source of my problem but i still search.
If anyone has an idea, i'll be glad to read it

Similar Messages

  • Adobe AIR ANE Android NoClasseDefFoundError

    I am developing an ane for using and enjoying the service games google play.
    I made a test app natively and runs perfectly.
    I generated one ane and made a falsh builder for test. By utilizing it happens the following error:
    07-22 15:55:35.555: E/AndroidRuntime(9983): FATAL EXCEPTION: main
    07-22 15:55:35.555: E/AndroidRuntime(9983): java.lang.NoClassDefFoundError: com.google.example.games.basegameutils.GameHelper
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at com.google.example.games.basegameutils.BaseGameActivity.getGameHelper(BaseGameActivity.ja va:93)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at com.google.example.games.basegameutils.BaseGameActivity.onCreate(BaseGameActivity.java:10 3)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at com.google.example.games.tanc.MainActivity.onCreate(MainActivity.java:70)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.Activity.performCreate(Activity.java:5248)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.ActivityThread.access$800(ActivityThread.java:139)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.os.Handler.dispatchMessage(Handler.java:102)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.os.Looper.loop(Looper.java:136)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.ActivityThread.main(ActivityThread.java:5086)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at java.lang.reflect.Method.invokeNative(Native Method)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at java.lang.reflect.Method.invoke(Method.java:515)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at dalvik.system.NativeStart.main(Native Method)
    I looked in the package and the class it appears. I found the following solution, but does not work.
    NoClassDefFoundError for code in an Java library on Android - Stack Overflow
    Go to "Properties" of the project.
    Select "Java Build Path"
    Select "Order and Export" Tab
    You should see the selected project's "src" and "gen" paths and dependencies here.
    The order how they listed were first "src" and then "gen" path
    I switch them, so that "gen" folder is build before the "src"
    Thank you

    Hello, Alex
    I'm just creating an ANE to use the new service from Google Play Service
    My real problem is this:
    I caught the ANE https://github.com/freshplanet/ANE-Google-Play-Game-Services. using google play service in froyo version. And use another ANE AdMob using the latest version of google play service.
    By using and enjoying the two together in my project I have problem as there are conflicting library because I have two different versions of google play service, got the idea to update the ANE https://github.com/freshplanet/ANE-Google-Play- Game-Services. And put the dependencies google service only play one of them.
    ANE that started my whole problem was updating.
    I had this same error in native application (Android) and was simple to solve. I changed the "build path -> Order and Export" order of packets by placing the "gen" in primero and the "src" soon followed. But this change does not fit when I expoprto the jar to generate ANE.
    I ended up finding another that NEDs use google play latest service
    https://github.com/alextel69/google-play-game-services-ane.
    I saw in the documentation that it is using AIR SDK 4.0 and I'm using the AIR 3.6 SDK. I'll update my version and find out if that resolves the problem.
    Which version of AIR SDK are you using?
    Once I have news we report here
    Thanks for your help.
    Have a great day

  • Cleaning up ANE Android leftovers?

    After seeing the duplication of resources in assets/META-INF folders, I investigated this further to find that there's a huge amount of unneeded leftover files left here that can *and should* be deleted for a release build.
    For us, this is 11.5MB of a 42.5MB apk, down to 31MB after this clearout.
    Basically, after deleting all files that match the regex,
    assets/META-INF/AIR/extensions/[^/]+/META-INF/ANE/Android-ARM/(?!library.swf)
    Leaves the apk in a perfect state, but a much more manageable / palatable size.  This cleanout can be achieved after the building of the apk with aapt, from android-apktool -  A tool for reverse engineering Android apk files - Google Project Hosting, with commands like,
    aapt remove mygame.apk assets/META-INF/AIR/extensions/com.google.api.game/META-INF/ANE/Android-ARM/android-suppo rt-v4.jar
    aapt remove mygame.apk assets/META-INF/AIR/extensions/com.google.api.game/META-INF/ANE/Android-ARM/appcompat_v7- res/abc_ic_voice_search_api_holo_light.png
    This should *absolutely* be done automatically by the build process, because as I said this contributed to our app growing by a third of it's proper size.

    Seriously Adobe, how can you not at least give this a reply?  Leaving 10MB of unnecessary files on a mobile app is nearly an abominable crime and has to be fixed, and as I've explained (and am operating with now), it's easy-ish for me to fix post-packaging.  For you guys to fix it pre that should be an absolute synch.  Please do something about it.

  • AIR for Android - Native activity is destroyed when app is resumed by clicking on the app icon

    Hello,
    I have created a native extension which launches a native android activity with a simple view in it by firing an Intent.
    The issue is that when we minimize the app and resume it by either choosing the app icon from apps menu, Android automatically calls the onDestroy of the native android activity and kills it.
    I have no idea from where else can the onDestroy function be called? I need to figure out a way to stop the native activity from being destroyed on app resume.
    The code to launch the native activity is something like this:
    Intent intent = new Intent("com.app.myAcivity");
    intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    context.getActivity().startActivity(intent);
    The entry for the activity in the manifest goes like this:
    <activity android:name="com.app.myAcivity"/>
    I have read a lot of blogs and SO questions but could not get around this issue. Please help.
    I don't have this problem with native Android app.
    Thanks.

    Greetings Heather,
    After reading your post, it sounds like you are experiencing an error with the Podcasts app. You may want to consider restarting the device first, and then resetting if that does not work. This article provides detailed instructions for Restarting, and Reseting:
    Turn your iOS device off and on (restart) and reset
    How to restart
    Press and hold the Sleep/Wake button on the top of your device until the red slider appears. Then drag the slider to turn your device completely off.
    After the device turns off, press and hold the Sleep/Wake button again until you see the Apple logo.
    How to reset
    You should reset your device as a last resort and only if you can't restart it.
    To reset, press and hold both the Sleep/Wake and Home buttons for at least 10 seconds, until you see the Apple logo.
    Thank you for contributing to Apple Support Communities,
    BobbyD

  • Android manifest/activity question

    Hi,
    Is it possible to add your own layout xml in an Android application?
    I want to add the activity android:imeOptions="flagNoExtractUi" to the <EditText>-tag to disable the fullscreen virtual keyboard in landscape mode. But where do I put it?
    Thanks!
    /Andreas

    Hi Rehnberg, sorry, I don't have a solution. I'm also looking for a way to do this. Did you find a way to prevent the softkeyboard going fullscreen in landscape?
    I've noticed that sometimes, after I first open my landscape-only Air app, it will use the halfscreen keyboard - although, once it reverts back to the fullscreen keyboard it uses the fullscreen one from then on. I have no idea why this is or how to replicate it, but I thought it was interesting to note that an Air app can display a half screen keyboard in landscape mode - it just seems there is no way to control when!
    If anyone can help us with this, please do!
    Kind regards.

  • Gyroscope ANE Android

    Hi all, i've integrated the Sample gyroscope ANE from here http://www.adobe.com/devnet/air/native-extensions-for-air/extensions/gyroscope.html inside my app. Basically, this will be a retro race game ( similar to OutRun ) , with the possibilyt to drive left -> right via the gyroscope. It will run ONLY on galaxy TAb 10.1 GT-P7500.
    I have some problem :
    VALUES :
    this is my min Value : -5.326322e-7 for each Axis ( the MAX Value SEEMS to be 5.326322e-7) .
    How to convert  it to a real number ( i need to limit it from 0 to 1 left to right) ? Number.toFixed()  ?
    Is there a way to normalize them in the Java part of the ANE ?
    AXIS :
    when i roatate the device from landscape to portrait, on which axis am i rotating ? When i try to trace it, ALL the axis change value ( and sometime they just get the MIN value of -5.326322e-7, even if the are all rotated ) .
    Thanks in advance!

    isit usefull to do it in the ANE Java ?
    No. Just use Actionscript.
    When im faking a steer with the device (screen i front of me, landscape) on which axis im rotating ?
    use the example on the site you linked to:
    var gyro:Gyroscope; if(Gyroscope.isSupported) { gyro = new Gyroscope(); gyro.setRequestedUpdateInterval(1000); gyro.addEventListener(GyroscopeEvent.UPDATE,onChange); }  
    function onChange(e:GyroscopeEvent):void { trace("From gyro: " + e.x + " " + e.y + " " + " " + e.z); }
    Since I don`t know details how you control your steering its pointless to guess, you must at least show how you plan to steer, control your car.
    And, regardig the snippet, why  2500000 and 2663161 ? ar them -5.326322e-7 converted ?
    The basic idea is to convert a solution room from (roughly -0,53 to roughly 0,53) to 0->1 (-5.326322e-7 is no space magic but simply an exponential way to write down -0.532....)
    This is a linear equation with 2 unknowns which gives when solved the funtion:
    f(x) = 2500000/2663161·x + 1/2
    http://en.wikipedia.org/wiki/Linear_function
    when i roatate the device from landscape to portrait, on which axis am i rotating ? When i try to trace it, ALL the axis change value ( and sometime they just get the MIN value of -5.326322e-7, even if the are all rotated ) .
    use a variable that holds the orintation, and switch the formulas (of which I gave you one) depending on that

  • Avast deny adobe air with ane @android platform

    report as android:OpFake-FE[Trj]

    Hello,
    It seems all Adobe Air applications are facing this issue.
    see : http://forum.avast.com/index.php?board=37.0

  • ANE ANdroid error

    I open an Activity with call FREFunction and after some time I get an error <InputDispatcher(1606): channel '419806a8 air.ru.nekit.JAIR.debug/air.ru.nekit.JAIR.debug.AppEntry (server)' ~ Channel is unrecoverably broken and will be disposed!> or <AndroidRuntime: java.lang.UnsatisfiedLinkError: dispatchStatusEventAsync>
    Any commets please)

    Hey @mamoun2015 ,
    Welcome to the HP Forums!
    I understand your tablet is experiencing issues after updating to KitKat.
    If you have already attempted the factory reset there is little I can offer you.
    It would be best for you to get in touch with our phone support team. Please call our technical support at 800-474-6836. If you live outside the US/Canada Region, please click the following link to get the support number for your region: Phone Assist Worldwide.
    Thanks!
    Please click the "Kudos, Thumbs Up" at the bottom of this post if you want to say "Thanks" for helping!
    Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
    The Great Deku Tree
    I work on behalf of HP.

  • Android res/layout Folder not included in the APK file (but included in the ANE)

    I'm having a problem with resources on an Adobe ANE Android extension:  android.content.res.Resources@NotFoundException:  id.viewView
    I have a xml layout file, which is included in the ANE file (checking by unzipping the ANE file and looking into META-INF/ANE/Android-ARM)
    In the APK file (generated with Flash Builder 4.6), the layout folder (inside res) at the top level is missing, but its included deep in the assets folder:
        - META-INF   
        - res
            drawable
            drawable-hdpi
            drawable-ldpi
            drawable-mdpi
            raw
        - assets
            META-INF
                AIR
                    extensions
                        org.dornad.ane.MyTestExtension
                            META-INF
                                ANE
                                    Android-ARM
                                            drawable-hdpi
                                            drawable-mdpi
                                            drawable-xhdpi
                                            layout
                                            values
    Any ideas?

    Can you manually select it for inclusion by modifying Packaging Settings - Package Contents in "Export Release Build" settings?

  • Creating ANE - Problem with creating the android package

    I get the following error when trying to start an App with a ANE creatd by myself based on http://www.adobe.com/devnet/air/articles/ane-android-devices.html:
    dx tool failed:
    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.lang.IllegalArgumentException: already added: Lcom/adobe/fre/FREASErrorException;
        at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
        at com.android.dx.dex.file.DexFile.add(DexFile.java:143)
        at com.android.dx.command.dexer.Main.processClass(Main.java:301)
        at com.android.dx.command.dexer.Main.processFileBytes(Main.java:278)
        at com.android.dx.command.dexer.Main.access$100(Main.java:56)
        at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:229)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
        at com.android.dx.command.dexer.Main.processOne(Main.java:247)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:183)
        at com.android.dx.command.dexer.Main.run(Main.java:139)
        at com.android.dx.command.dexer.Main.main(Main.java:120)
        at com.android.dx.command.Main.main(Main.java:89)
    1 error; aborting
    Can anyone help me with this?

    I met the same problem as yours.
    Besure your jar NOT include FlashRuntimeExtensions.jar.
    I use IntelliJ IDEA + artifacts to generate the library jar. Everything goes fine after removed the FlashRuntimeExtensions.jar from artifacts

  • Android res folder not included in the ane extension

    Hi.
    I am trying to develop an android extension fro air, but I have a problem with resources.
    According to this : http://help.adobe.com/en_US/air/extensions/WSf268776665d7970d-2e74ffb4130044f3619-7ff8.ht ml
    The res folder should be included inside the created extension. But it actually isn’t.
    for this test I simply use the basic Hello world Vibrate test, but I added a new png in the drawable folder.
    As you can see while unziping the .ane file, then going to META-INF/ANE/Android-ARM
    the res file is absent.
    As a result, the program crashes when I try to access my ressource FREContext.getResourceId("drawable.ppy_accessory_manage.png")
    Has anyone managed to make resources work with ANE in android?
    PS, here is my batch to compile the ANE :
    set adt_directory=C:\Program Files\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0\bin
    set root_directory=C:\Users\hugo\Adobe Flash Builder 4.6
    set library_directory=%root_directory%\HelloANELibrary
    set native_directory=%root_directory%\HelloANENative
    set signing_options= -storetype pkcs12 -keystore "C:\Users\hugo\Adobe Flash Builder 4.6\certificat.p12"
    set dest_ANE=HelloANE.ane
    set extension_XML=%library_directory%\src\extension.xml
    set library_SWC=%library_directory%\bin\HelloANELibrary.swc
    "%adt_directory%"/adt -package %signing_options% -target ane "%dest_ANE%" "%extension_XML%" -swc "%library_SWC%" -platform Android-ARM -C "%native_directory%" library.swf HelloANENative.jar

    Answer given on stack overflow :
    http://stackoverflow.com/questions/8060041/adobe-air-3-native-extensions-android-res-folde r-not-included-in-the-ane-file

  • How to use foreground dispatch system of android NFC with AIR native extension?

    Hello,
    I'm developping an AIR application which invokes NFC on android, via AIR native extension (ANE).
    I would like to enable foreground dispatch system of NFC (see http://developer.android.com/guide/topics/nfc/advanced-nfc.html#foreground-dispatch), but unfortunately it has not been achieved so far.
    [Problem]
    For enabling foreground dispatch system of android NFC, we need to listen some android native events e.g.) Activity.onNewIntent(), Activity.onPause() and Activity.onResume(). But I have no idea how to dispatch them to ANE. Could anyone tell me how to get it?
    I know there is an available ANE for android NFC as follows:
    http://code.google.com/p/ane-lab/source/browse/#svn%2Ftrunk%2Fmobile%2Fandroid%2Fjava%2Fnf c1
    But it is not fit for our use case, as it just uses "intent dispatch system" (another way to use android NFC).
    Maybe AIR must be extended for this case, but any information is welcome.
    Thanks.

    Hello
    My name is Sadao Tokuyama.(http://twitter.com/tokufxug)
    Is the person who is to manage the sample code in experimental AIR
    Native Extension.
    If you want to achieve the de-patch system foreground NFC, it is
    necessary to consider the following points.
    1.Create FREFunction for initial processing. processing of onCreate.
    2.can be obtained in onResume Event.ACTIVATE. After issuing
    Event.ACTIVATE, call the FREFunction to run in onResume.
    3.can be obtained in onPause Event.DEACTIVATE. After issuing
    Event.DEACTIVATE, call the FREFunction to run in onPause.
    4.onNewIntent can be obtained at InvokeEvent.INVOKE. After issuing
    InvokeEvent.INVOKE, call the FREFunction to run onNewIntent.(Gets the
    Intent of the scanned NFC. : FREContext.getActivity().getIntent())
    I have committed the sample code. Your reference.
    http://code.google.com/p/ane-lab/source/browse/#svn%2Ftrunk%2Fmobile%2Fandroid%2Fjava%2Fnf c-foreground-dispatch
    Thanks.

  • Android: How to upload a file to OneDrive?

    Iam trying to upload a file using the OneDrive Saver sample app. Instead of creating a text file, I would like to select a file from the gallery and then upload it to OneDrive. I have edited the sample app but the file cannot be uploaded. I don't have
    any errors. 
    Sample app available on GitHub (https://github.com/OneDrive/onedrive-picker-android/tree/master/SaverSample).
        package com.example.onedrivesdk.saversample;
        import java.io.*;
        import android.accounts.AccountManager;
        import android.app.Activity;
        import android.content.ContentResolver;
        import android.content.Intent;
        import android.database.Cursor;
        import android.graphics.Bitmap;
        import android.graphics.BitmapFactory;
        import android.net.Uri;
        import android.os.*;
        import android.provider.MediaStore;
        import android.view.View;
        import android.view.View.OnClickListener;
        import android.widget.*;
        import com.microsoft.onedrivesdk.saver.*;
        public class SaverMain extends Activity {
            private static final int DEFAULT_FILE_SIZE_KB = 100;
            static final int RESULT_STORE_FILE = 4;
            private static Uri mFileUri;
            private static final String ONEDRIVE_APP_ID = "4813EF88";
            private final OnClickListener mStartPickingListener = new OnClickListener() {
                @Override
                public void onClick(final View v) {
                final Intent galleryIntent = new Intent(Intent.ACTION_PICK);
                    galleryIntent.setType("*/*");
                    startActivityForResult(galleryIntent, RESULT_STORE_FILE);
            private ISaver mSaver;
            @Override
            protected void onCreate(final Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.activity_saver_main);
                // Create the picker instance
                mSaver = Saver.createSaver(ONEDRIVE_APP_ID);
                // Add the start saving listener
                findViewById(R.id.startSaverButton).setOnClickListener(mStartPickingListener);
            @Override
            protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
            try {
                    mSaver.handleSave(requestCode, resultCode, data);
                } catch (final SaverException e) {
            switch (requestCode) 
        case RESULT_STORE_FILE:
        mFileUri = data.getData();
        saveFileToDrive();
        break;
            private void saveFileToDrive() 
            Thread t = new Thread(new Runnable() 
            @Override
            public void run() 
        try 
        // Create URI from real path
        String path;
        path = getPathFromUri(mFileUri);
        mFileUri = Uri.fromFile(new java.io.File(path));
        ContentResolver cR = SaverMain.this.getContentResolver();
        // File's binary content
        java.io.File fileContent = new java.io.File(mFileUri.getPath());
        View v = null;
        final Activity activity = (Activity) v.getContext();
        mSaver.startSaving(activity, path, Uri.parse(mFileUri.toString()));
        } catch (Exception e) {
            t.start();
            public String getPathFromUri(Uri uri) 
                  String[] projection = { MediaStore.Images.Media.DATA };
                  Cursor cursor = getContentResolver().query(uri, projection, null, null, null);
                  int column_index = cursor
                          .getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
                  cursor.moveToFirst();
                  return cursor.getString(column_index);

    You're going to need to give way more detail about the situation before we can help.

  • JDBC connection between android and oracle apps

    Hello.
    I am new to oracle apps and android. But the coding of android is in java.
    I want to create a application in which i want to connect oracle apps with my application of android written in java.
    I am sending code which is not working but not having error too.
    **************************** Connection class ******************************
    import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class getConnection { public static Connection getDBConnection(){     Connection con;     con=null;     try{         Class.forName("oracle.jdbcdriver.OracleDriver");     } catch (ClassNotFoundException e) {         System.out.println(e);     }     try {         String url="Host String:1523:SID";         con=DriverManager.getConnection(url,"XXXX","XXXX");                 if(con!=null){             System.out.println("Connection Successfull..."+"\n");         }else{             System.out.println("Connection Failed.....");         }     } catch (SQLException e) {         System.out.println(e);     }     return(con); } }
    ******************************** Main CLass *************************************
    import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import android.os.Bundle; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.app.Activity; import android.view.View; import android.view.View.OnClickListener; public class Main extends Activity implements OnClickListener{ private EditText etUsername;     private EditText etPassword;     private Button btnLogin;     private Button btnCancel;     private TextView lblResult; /** Called when the activity is first created. */     @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.main);                 etUsername = (EditText)findViewById(R.id.username);         etPassword = (EditText)findViewById(R.id.password);         btnLogin = (Button)findViewById(R.id.login_button);         btnCancel = (Button)findViewById(R.id.cancel_button);         lblResult = (TextView)findViewById(R.id.result);             btnLogin.setOnClickListener (new OnClickListener() {         public void onClick(View v) {         Connection con = null;                 PreparedStatement stmt = null;                 ResultSet rs = null;                 int n=0;                 lblResult.setText("Hello.");                 con=getConnection.getDBConnection();                 lblResult.setText("After Connection");                 String query = "select object_id from all_objects where object_id=18";                         try {                     stmt = con.prepareStatement(query);                 } catch (SQLException e) {                     // TODO                     System.out.println(e);                 }                 try {                     rs = stmt.executeQuery();                 } catch (SQLException e) {                     // TODO                     System.out.println(e);                 }                 try {                     while(rs.next()){                         n = rs.getInt("OBJECT_ID");                     }                 } catch (SQLException e) {                     // TODO                     System.out.println(e);                 }                                 // Check Login         String username = etUsername.getText().toString();         String password = etPassword.getText().toString();                         if(username.equals("U_Name") && password.equals("Pass") && n==18){         lblResult.setText("Login successful.");         } else {             lblResult.setText("Login failed. Username and/or password doesn't match.");             }         }         });         btnCancel.setOnClickListener(new OnClickListener() {         //@Override         public void onClick(View v) {             // Close the application             finish();         }         });     } public void onClick(View v) { // TODO Auto-generated method stub } }
    I am doing this in Eclipse.
    Help me out as soon as possible.
    Thank You.
    Edited by: EJP on 12/07/2012 16:05: added {noformat}
    {noformat} tags. Please use them.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    >
    I am sending code which is not working but not having error too.
    >
    Who do you think you are kidding? That code couldn't possibly run without errors.
    The first thing you need to do is learn how to connect to an Oracle database using Java on your pc. Then you can start branching out.
    Review the JDBC Developer Guide for how to connect to Oracle databases using Java.
    http://docs.oracle.com/cd/B28359_01/java.111/b31224/urls.htm#BEIJFHHB

  • Developing and using Adobe AIR native extensions for Android devices

    I was using this tutorial:
    "Developing and using Adobe AIR native extensions for Android devices"
    http://www.adobe.com/devnet/air/articles/ane-android-devices.html
    When packing the Flex mobile ANESampleTest to deploy on an Android device, the below error happens
    Error occurred while packaging the application:
    aapt tool failed:invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/drawable-xxhdpi
    invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/values-sw600dp
    invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/values-sw720dp-lan
    Does anyone know what the issue might be?

    Did you find a workaround for the Error? I'm getting the same and I can't seem to find any solution.

Maybe you are looking for

  • I need to backup all the music on my nano - my library is a mess with all my kids music

    I am sending in my 1st generation ipod nano for battery replacement. I need to back up all the music on my nano. My library is a huge mess with all of my kids music.  How do I just get everything on my nano in a playlist without getting mixed in the

  • Manipulating matrix with XML

    Hi! I am implementing a form that looks and works like Frocasting in MRP. So, there are sometimes a lot of columns in matrix (more than 1000). I have to generate such matrix, put data there, read data. It will be like a self - made document in B1. Th

  • Formula for getting first letter of the string

    Post Author: jmmj CA Forum: Formula Hi, I have a problem to get the first letter of the string.  I need to compare first letter first and then change the rest of string to number as unit cost for calculation.  For example, I have string K100, C200,..

  • After creation PO, pr changes should not be possible.

    Hi friends, our requirement is.......if PO is created by some PR....then after creation of PO PR changes should not be possible. How we can restrict this? Any message? Rgds, Navin

  • Adapters in Data services

    Hi, As said Data services is kind of similar middle ware product  like SAP PI. Can any one tell me what are the different adapters used in Data services for maintaining the message flow of different message formats. thanks, Ravi