[android-developers] HELP! Lost all my stats on Android Market!

2009-02-01 Thread Akbur

Dear all,

I was uploading my .apk file on Android Market and keep getting this:

You have another published application on Market with the same
package name (com.x.x).  (Where x.x. is my package name). Go to that
other application, and click upgrade.

I do not have another published application with that package name
because it was some how lost by the UI and it refused to accept my APK
file!  Can someone advise what I should do?  Ideally I would like my
old stats back.  My Android Market account is the same as this email
address.

At the moment my app is back on the Market but using a different
package name (to avoid the error), which means all my stats have been
reset and users who wish to upgrade will need to inconveniently
uninstall the old.

Any advice?

Thanks,
Akbur
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Unregistering a statically defined BroadcastReceiver in code?

2008-11-03 Thread Akbur

This looks as though it should do the trick.  Thanks Jason. :-)

Akbur

On 2 Nov, 18:32, Jason Parekh [EMAIL PROTECTED] wrote:
 Hi Akbur,

 You can't unregister this receiver, but you can disable it.  Check out
 PackageManager.setComponentEnabledSetting.

 jason

 On Sun, Nov 2, 2008 at 7:03 AM, Akbur [EMAIL PROTECTED] wrote:

  Dear all,

  I've registered my BroadcastReceiver in my application manifest like
  this:

     application android:icon=@drawable/icon android:label=@string/
  app_name android:debuggable=true
         receiver android:enabled=true android:name=.SMSReceiver
             intent-filter
                 action
  android:name=android.provider.Telephony.SMS_RECEIVED /
             /intent-filter
         /receiver
     /application

  Suppose I wish to make an Activity which is able to unregister this
  BroadcastReceiver.  I know there is a method called
  unregisterReceiver(BroadcastReceiver receiver) however I am not sure
  how I can pass the correct receiver instance to it?  Has any one done
  this?  If so, would you care to share? :-)

  Thanks!
  Akbur
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Unregistering a statically defined BroadcastReceiver in code?

2008-11-02 Thread Akbur

Dear all,

I've registered my BroadcastReceiver in my application manifest like
this:

application android:icon=@drawable/icon android:label=@string/
app_name android:debuggable=true
receiver android:enabled=true android:name=.SMSReceiver
intent-filter
action
android:name=android.provider.Telephony.SMS_RECEIVED /
/intent-filter
/receiver
/application

Suppose I wish to make an Activity which is able to unregister this
BroadcastReceiver.  I know there is a method called
unregisterReceiver(BroadcastReceiver receiver) however I am not sure
how I can pass the correct receiver instance to it?  Has any one done
this?  If so, would you care to share? :-)

Thanks!
Akbur

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: Android on device GPS locate not working - code included

2008-11-02 Thread Akbur

Amir,

I've developed a similar app just for kicks (so the wife can keep
track of me) ;)

I did the following:

LocationManager lm = (LocationManager)
context.getSystemService(Context.LOCATION_SERVICE);

Location loc = lm.getLastKnownLocation(gps);
if (loc == null)
{
locType = Network;
loc = lm.getLastKnownLocation(network);
}

In this case if the GPS service does not have a fix or is switched
off, the network, though not as accurate as GPS should be active and
give you an approximate location.

All the best,
Akbur

On Nov 2, 11:45 am, Guillaume Perrot [EMAIL PROTECTED] wrote:
 It can take a while to the G1 to init the gps and return a fix.
 And you must see the sky for the GPS to work.
 Your code and permissions seem correct, try using the network provider
 to test (which is faster and work in buildings unlike the GPS).
 Make sure GPS location provider is enabled on the phone settings.
 You can check your location with the standard map application.

 On Nov 2, 5:42 am, C-LIS Keiji Ariyama [EMAIL PROTECTED] wrote:

  Hi Amir,

  I had encountered a same situation. But my case is about
  getLastKnownLocation(String) cid:part1.07010905.08080...@c-lis.co.jp
  method on the emulator.
  In that time, I fixed my code below.

   Old 
  public class TestActivity extends Activity {
      private void initActivity() {
          LocationManager locman = (LocationManager) getContext()
                  .getSystemService(Context.LOCATION_SERVICE);
      }}

  -

   Fixed 
  public class TestActivity extends Activity {
      LocationManager locman = null;
      private void initActivity() {
          locman = (LocationManager) getContext()
                  .getSystemService(Context.LOCATION_SERVICE);
      }}

  -

  Sorry. I don't know about G1. Because I have not been having it...

  Keiji,

  Amir wrote:
   I'm creating a project that allows for my location to be found using
   the android device and communicating with my website as to where my
   Android device is.  When I download the .apk to my phone the following
   permissions are acquired:

   Network communication (full)
   Your location (fine (GPS), coarse (network-based) location)

   As of now, on the emulator everything works fine and I can find my
   location (default location on Google Maps), but on the phone the
   application/device can't find location of the android phone.

   please help!...below is the code I'm using for the GPS section.

   - Amir

   

   package org.gw.service;

   import android.content.Context;
   import android.location.Location;
   import android.location.LocationListener;
   import android.location.LocationManager;
   import android.os.Bundle;
   import android.widget.Toast;

   public class LocationService extends AService {

      public int excute() {
   getDataMap().put(Command, LOCATION);

   if (isOk()) {

       // // location.
       // getDataMap().put(Des, OK);
       // //get location
       // getDataMap().put(Value, 100,100);
       // String location = 25,121.55;
       LocationManager lm = (LocationManager) getContext()
        .getSystemService(Context.LOCATION_SERVICE);

       LocationListener locationListener = new GWLocationListener(this);
       lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
        locationListener);

   } else {
       getDataMap().put(Des, error password!!);
   }

   return 0;
      }

      private class GWLocationListener implements LocationListener {
   private LocationService service;
   public GWLocationListener(LocationService service) {
       this.service=service;
   }

   @Override
   public void onLocationChanged(Location loc) {
       if (loc != null) {
    String location = loc.getLatitude()+,+loc.getLongitude();
    service.getDataMap().put(Value, location);
     getDataMap().put(Des, OK);
    new ServiceClient(service).excute();
       }
       else
       {

    getDataMap().put(Des, Location fail!);
    new ServiceClient(service).excute();
       }
   }

   @Override
   public void onProviderDisabled(String provider) {
      return;
   }

   @Override
   public void onProviderEnabled(String provider) {
       return;
   }

   @Override
   public void onStatusChanged(String provider, int status, Bundle
   extras) {
       return;
   }
      }
   }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---