Using Pre-Processors/Macros in Eclipse and ADT plugin

by sriram » Sat, 05 Dec 2009 02:44:33 GMT


Sponsored Links
 Hi All,

Trying to build an application using eclipse with ADT plugin on
Android. I have quite a few areas which need customization. In C++ we
used to the do the macro/pre-processor way. Using ant scripts I am
able to achieve this nicely. However for debugging purposes and to
leverage the IDE during development, am interested to know if this is
possible to do it using eclipse for android.

Is this possible at all??

--



Other Threads

1. using the getLine1Number() method

Ok, I'm still new to using java and j2me all together, although I
understand enough to make basic programs and understand what I think
about returning methods. I'm having trouble with the code below, for
now all i want my code to do is pull up the MSISDN "telephone number"
that a mobile device has. Everytime i run the emulator I get an error
that the app has stopped unexpectedly and to try again. I've modified
the helloworld demo a little bit and just trying to get the tn to show
up. please tell me what i've done wrong and can someone also send me
an article about using the android api's please.

package com.general.AntiClep;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import android.telephony.TelephonyManager;

import android.content.Context;
public class AntiClep extends Activity {
   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {



        String str = null;
        sum();
       super.onCreate(savedInstanceState);
       TextView tv = new TextView(this);
       tv.setText(str);
       setContentView(tv);
   }

   public String sum(){
           TelephonyManager tm = (TelephonyManager)getSystemService
           (Context.TELEPHONY_SERVICE);

                String result = tm.getLine1Number();


                return result;

   }
}

--~--~---------~--~----~------------~-------~--~----~

2. How Do I Install Market Apps on the Emulator, and other questions about Intents

I like the promise of Android Intents, where I do not have to re-
invent a tool that someone else has already developed.  Practically,
however, I have not been able to use this feature very much.

The first problem I have run into is the lack of a comprehensive list
of intent filters available for each application.  I have seen
openintents.org and 
http://developer.android.com/guide/appendix/g-app-intents.html,
but this is a very small subset of the over 4000 applications on the
market.  Is there a way to view the manifest for an app I have
downloaded on my phone?

The second problem relates to developing on the emulator.  There seems
to be no way of downloading apps from the market onto the emulator.
For example, I know how to call the "radar" app, since it is listed on
openintents.org, however I cannot run this on the emulator because I
do not have the radar app installed.  So how do I install apps from
the market that I need for development on the emulator?

Thanks!

--~--~---------~--~----~------------~-------~--~----~

3. fastboot download too many links

4. android developers challenge II

5. JAVA Coding standards for Android Platform

6. Can't install the latest security update (CRC1)

7. Changing the Price of an App