[android-developers] Re: Telephony.SECRET_CODE

2010-01-20 Thread Master_Ne0
Get this error wheni type the SECRET_CODE in.

D/AndroidRuntime(  686): Shutting down VM
W/dalvikvm(  686): threadid=3: thread exiting with uncaught exception
(group=0x4001b178)
E/AndroidRuntime(  686): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  686): java.lang.RuntimeException: Unable to start
receiver com.smactivity.SMPTBroadcastReciever:
android.util.AndroidRuntimeException: Calling startActivity() from
outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK
flag. Is this really what you want?
E/AndroidRuntime(  686):at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2646)
E/AndroidRuntime(  686):at android.app.ActivityThread.access
$3100(ActivityThread.java:119)
E/AndroidRuntime(  686):at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1913)
E/AndroidRuntime(  686):at android.os.Handler.dispatchMessage
(Handler.java:99)
E/AndroidRuntime(  686):at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime(  686):at android.app.ActivityThread.main
(ActivityThread.java:4363)
E/AndroidRuntime(  686):at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  686):at java.lang.reflect.Method.invoke
(Method.java:521)
E/AndroidRuntime(  686):at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime(  686):at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime(  686):at dalvik.system.NativeStart.main
(Native Method)
E/AndroidRuntime(  686): Caused by:
android.util.AndroidRuntimeException: Calling startActivity() from
outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK
flag. Is this really what you want?
E/AndroidRuntime(  686):at
android.app.ApplicationContext.startActivity(ApplicationContext.java:
550)
E/AndroidRuntime(  686):at
android.content.ContextWrapper.startActivity(ContextWrapper.java:248)
E/AndroidRuntime(  686):at
android.content.ContextWrapper.startActivity(ContextWrapper.java:248)
E/AndroidRuntime(  686):at
com.smactivity.SMPTBroadcastReciever.onReceive
(SMPTBroadcastReciever.java:19)
E/AndroidRuntime(  686):at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2637)
E/AndroidRuntime(  686):... 10 more

using this code

public class SMPTBroadcastReciever extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {
if(intent.getAction().equals(SECRET_CODE_ACTION)){
Intent i = new Intent(Intent.ACTION_MAIN);
i.setClass(context, SMActivity.class);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}

}

}

Anyone got idea's??

On 5 Jan, 11:07, Master_Ne0 master.ne0s.soluti...@googlemail.com
wrote:
 Hi, been looking at the androidcodeand wanted to know if it was
 possible to use thesecretcodefor SDK applications or was it only
 reserved for system apps?

 System settings has this in the manifest

 receiver android:name=TestingSettingsBroadcastReceiver
             intent-filter
                  action
 android:name=android.provider.Telephony.SECRET_CODE /
                  data android:scheme=android_secret_code
 android:host=4636 /
             /intent-filter
 /receiver

 So when you dial *#*#4636#*#* it launches the testing settings
 activity. It would be very handy if we could use this.

 Ne0
-- 
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] Telephony.SECRET_CODE

2010-01-05 Thread Master_Ne0
Hi, been looking at the android code and wanted to know if it was
possible to use the secret code for SDK applications or was it only
reserved for system apps?

System settings has this in the manifest

receiver android:name=TestingSettingsBroadcastReceiver
intent-filter
 action
android:name=android.provider.Telephony.SECRET_CODE /
 data android:scheme=android_secret_code
android:host=4636 /
/intent-filter
/receiver

So when you dial *#*#4636#*#* it launches the testing settings
activity. It would be very handy if we could use this.

Ne0

-- 
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: File creation problem in Android source build

2010-01-05 Thread Master_Ne0
You can't write an app that can create a file in the Data directory,
unless your device is rooted. You might be better off posting in the
platform group if your trying to modify the framework, as this group
is for Android developers, not contributes.

Ne0

On Jan 5, 10:15 am, Derek xianguan...@gmail.com wrote:
 does the below permission help?
 android.permission.WRITE_EXTERNAL_STORAGE

 On Jan 5, 9:54 am, Arun achoudhary2...@gmail.com wrote:

  Hi ,

  I am trying to create a file in android framework using the following
  snippet of code :-

  public void CreateMyFile()
      {
  try {
  String destination = /data/hellothere.txt;

  File fileCon= new File(destination);
  if( ! fileCon.exists() ){
          fileCon.createNewFile();
      }}

  catch (IOException ioe) {
  ioe.printStackTrace();}

    //FilePermission fp=new FilePermission(destination,write);
      }

  When i compile this on sdk and execute it, everythng works fine and
  file got created in the /data path with the hellothere.txt name.
  But when i compile it in the source code and execute this on a android
  filesystem on emulator and real hardware, the file is not getting
  created and I am getting teh following error in logcat :-

  I/ActivityManager(   54): Start proc file.app for activity
  file.app/.fileop: pid=632 uid=10043 gids={1015}
  W/System.err(  632): java.io.IOException: Parent directory of file is
  not writable: /data/hellothere.txt
  W/System.err(  632): at java.io.File.createNewFile(File.java:1263)
  W/System.err(  632): at file.app.fileop.onCreate(fileop.java:44)
  W/System.err(  632): at
  android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
  1047)
  W/System.err(  632): at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
  2431)
  W/System.err(  632): at android.app.ActivityThread.handleLaunchActivity
  (ActivityThread.java:2484)
  W/System.err(  632): at android.app.ActivityThread.access$2200
  (ActivityThread.java:119)
  W/System.err(  632): at android.app.ActivityThread$H.handleMessage
  (ActivityThread.java:1835)
  W/System.err(  632): at android.os.Handler.dispatchMessage
  (Handler.java:99)
  W/System.err(  632): at android.os.Looper.loop(Looper.java:123)
  W/System.err(  632): at android.app.ActivityThread.main
  (ActivityThread.java:4325)
  W/System.err(  632): at java.lang.reflect.Method.invokeNative(Native
  Method)
  W/System.err(  632): at java.lang.reflect.Method.invoke(Method.java:
  521)
  W/System.err(  632): at com.android.internal.os.ZygoteInit
  $MethodAndArgsCaller.run(ZygoteInit.java:860)
  W/System.err(  632): at com.android.internal.os.ZygoteInit.main
  (ZygoteInit.java:618)
  W/System.err(  632): at dalvik.system.NativeStart.main(Native Method)
  I/ActivityManager(   54): Displayed activity file.app/.fileop: 5196 ms
  (total 5196 ms)

  Please someone help me in this regard



-- 
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: MapView Overlay problem

2010-01-05 Thread Master_Ne0
I also had this problem, i had to save the overlay locations to the
outstate bundle then add them again onResume. Couldn't figure a way to
save my overlay class to bundle. Let me know if you find a better
workaround.

Ne0

On Jan 5, 11:59 am, Stefan ebay-dah...@web.de wrote:
 hello,

 i have an activity with a MapView ad overlays. If i start a new
 activity and go back to my Activity with the map, i only see the map
 without my overlays. How can i save my overlays?? The
 mapView.onSaveInstanceState() does not save the overlays, does it? Or
 have i implement something wrong and the overlays should be visible
 after i come back to my MapActivity?

 Thanks in advance.

-- 
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: How to downgrade T-Mobile G1 from Donut to Cupcake?

2010-01-05 Thread Master_Ne0
I would get it from here http://developer.htc.com/adp.html. Though you
will need to root your G1 first, xda-developers will help you do that.

Ne0

On Jan 5, 12:05 pm, Stefan Klumpp stefan.klu...@gmail.com wrote:
 Most likely you will find the information you need on:http://theunlockr.com/

 On Dec 18 2009, 5:03 pm, Greivin Lopez greivin.lo...@gmail.com
 wrote:

  Hi,

  I need to supportAndroid1.5 (Cupcake) for my application but I don't
  have any 1.5 device.  I currently have a Motorola Droid with 2.0.1 and
  the T-Mobile G1 (HTC Dream) with 1.6 (Donut).

  What I want to do is todowngrademy G1 to the previous official OTA
  release of Cupcake.  I have no experience in rooting anAndroid
  device, so I would appreciate if someone could give me a step-by-step
  guide on how to accomplish this?

  Thank you in advance.



-- 
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: PhoneStateListener::onSignalStrengthChanged

2009-11-18 Thread Master_Ne0
Not quite, the original way passed an int not a SignalStrength class,
i dont think SignalStrength is part of the SDK yet. They say its been
deprecated, i assume this means a soon to come revision of the SDK
will have this class in and fixed. You will have to wait for a google
developer to confirm this.

Ne0

On Nov 17, 5:48 pm, Ken Adair kadai...@gmail.com wrote:
 Thanks for the reply. The way you mentioned was the way to do it prior
 to Android 2.0. However, it has since been deprecated, meaning that is
 no longer the way to access signal strength. From my limited testing
 this method no longer seems to work when testing with the Droid.

 On Nov 17, 12:30 pm, Master_Ne0 master.ne0s.soluti...@googlemail.com
 wrote:

  The source code suggests this,

  @Override
          public void onSignalStrengthsChanged(SignalStrength
  signalStrength) {
              mSignalStrength = signalStrength;
              updateSignalStrength();
          }

  where SignalStrength is android.telephony.SignalStrength class. Let me
  know if this works, doubt that it will be backwards compatible.

  Ne0

  On Nov 17, 1:46 am, Ken Adair kadai...@gmail.com wrote:

   I'm assuming it is returning -1 because it is no longer being used
   with 2.0?



-- 
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: PhoneStateListener::onSignalStrengthChanged

2009-11-17 Thread Master_Ne0
The source code suggests this,

@Override
public void onSignalStrengthsChanged(SignalStrength
signalStrength) {
mSignalStrength = signalStrength;
updateSignalStrength();
}

where SignalStrength is android.telephony.SignalStrength class. Let me
know if this works, doubt that it will be backwards compatible.

Ne0

On Nov 17, 1:46 am, Ken Adair kadai...@gmail.com wrote:
 I'm assuming it is returning -1 because it is no longer being used
 with 2.0?

-- 
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: Android 2.0 (eclair) source

2009-11-16 Thread Master_Ne0
Not sure how accurate this info is, but i read (can't remember where
now! Doh!) that the eclair branch is not and will not be public. You
have to wait until they merge it into master, i think some modules
have been done done all ready.

Let us know if this wrong!!

Ne0

On 8 Nov, 06:51, jpntiger jpntiger.w...@gmail.com wrote:
 Anybody had success getting eclair source?

 On Nov 5, 9:27 am, Eric eric.gerv...@gmail.com wrote:

  I'm having the same issue. It used to say that there were noeclair
  branch. Fair enough. However now there is aneclairbranch, only repo
  fails to get it with the ugly error message outlined by Doug.

  Eric

  On Oct 28, 8:50 pm, tu tuqh...@163.com wrote:

   Yes, I also entered the same error message, some body can help us
   ASAP? thanks and best regards.

   On 10月29日, 上午2时53分, Doug dougforp...@gmail.com wrote:

Any idea when theeclairsourcewill be available viagit?
If I try to init a repo with -beclair I get an error stating that
the manifest is missing.
If I init a repo to head there doesn't seem to be much/anyeclaircode
in there.

Why do I ask?  Well, the docs looks like they're still in the process
of being updated (fair enough) but certain methods that have now been
deprecated don't seem to have been replaced with ones that perform
similar tasks - I need to browse thesourceso I can find out how to
get my application working against this new build.

(I got the following init command 
fromhttp://source.android.com/download)

$ repo init -ugit://android.git.kernel.org/platform/manifest.git-beclair
Getting repo ...
   fromgit://android.git.kernel.org/tools/repo.git
remote: Counting objects: 945, done.
remote: Compressing objects: 100% (372/372), done.
remote: Total 945 (delta 592), reused 894 (delta 553)
Receiving objects: 100% (945/945), 282.14 KiB, done.
Resolving deltas: 100% (592/592), done.
.
.
.
 * [new branch]      eclair    - origin/eclair
.
.
.
Fromgit://android.git.kernel.org/platform/manifest
 * [new tag]        android-1.0 -android-1.0
fatal: manifest 'default.xml' not available
fatal: manifest default.xml not found

-- 
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