make an intent from an object onstead of a class
I开发者_开发问答ntent intent = new Intent(EXGPS.this, LocationGPS.class);
I need:
LocationGPS gps = new LocationGPS(this);
Intent intent = new Intent(EXGPS.this, gps);
I have to do it in some way cause I cant pass my LocationGPS contructor that is getting Context c.
thank you in advance :-)Don't do it that way. Set up a Global
class which has a static reference to your Application
's Context
. Reference that static field directly from your LocationGPS
class.
精彩评论