Thanks a lot guys...
That should solve my problem..
On Jan 29, 8:28 am, Dianne Hackborn wrote:
> Don't use getBaseContext(), just use the Context you have.
>
> And if you are doing something from a background service, Service is-a
> Context, so you can just use the service instance.
>
>
>
> On W
Don't use getBaseContext(), just use the Context you have.
And if you are doing something from a background service, Service is-a
Context, so you can just use the service instance.
On Wed, Jan 28, 2009 at 7:26 PM, suhas gavas wrote:
>
> try passing getBaseContext() in place of this
>
>
>
>
> On
try passing getBaseContext() in place of this
On Wed, Jan 28, 2009 at 9:28 PM, Immy wrote:
>
> Hi,
>
> Thanks for the reply..
>
> This is what I'm doing in all other classes, which happen to be
> Activities...
> But here,
>
> Database_mob mDbHelper = new Database_mob(this);
>
> generates an er
Thanks for replying..
Exactly what I wanted.. Solves one scenario in my application..
Here is the other,
I intend to use a Alarm in my application, which periodically connects
to a web service to update my database.
Here no activity is involved. I intend to make it a background
service. But this
Immy wrote:
> Hi,
>
> Thanks for the reply..
>
> This is what I'm doing in all other classes, which happen to be
> Activities...
> But here,
>
> Database_mob mDbHelper = new Database_mob(this);
>
> generates an error which says Database_mob(*classname*) is undefined.
That would be because cla
I am accepting context as a parameter in the constructor of the
class... but that's what the error says..
On Jan 28, 8:58 pm, Immy wrote:
> Hi,
>
> Thanks for the reply..
>
> This is what I'm doing in all other classes, which happen to be
> Activities...
> But here,
>
> Database_mob mDbHelper =
Hi,
Thanks for the reply..
This is what I'm doing in all other classes, which happen to be
Activities...
But here,
Database_mob mDbHelper = new Database_mob(this);
generates an error which says Database_mob(*classname*) is undefined.
Regards,
Immanuel
On Jan 28, 12:51 pm, suhas gavas wro
make object of the class in which u have to use the context . Then
pass as parameter this to the class And the class in which u
have to use conext should have constructor as parameter context in it
e.g
class activity extends Activity
{
Viewclass myclass;
public on
make object of the class in which u have to use the context . Then
pass as parameter this to the class And the class in which u
have to use conext should have constructor as parameter context in it
e.g
class activity extends Activity
{
Viewclass myclass;
public on
9 matches
Mail list logo