Re: [android-developers] Users Verifying my App Signature

2011-08-12 Thread Nikolay Elenkov
On Fri, Aug 12, 2011 at 2:54 PM, Dianne Hackborn hack...@android.com wrote:
 On Thu, Aug 11, 2011 at 7:36 PM, Nikolay Elenkov nikolay.elen...@gmail.com
 wrote:

 BTW, your signing certificate does not have to be self signed. You can
 have your own CA, and use it issue signing certificates.

 You really don't want to do that until you can get a cert from a CA that
 doesn't expire for 50 years or so.

Oh, yes there is that. It used to be 25, apparently it got doubled.

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


Re: [android-developers] Fwd: imageview displaying

2011-08-12 Thread arun kumar
thankyou for ur reply


how can i solve this the image has to appear according to the screen
resolution(actually am having a circle(placed at the centre of the
screen)  on that i placed four images (top,left,right.bottom) by giving
android:layout_marginLeft=10dip ((for leftside image)) and similarly for
all the images i done like that...it suit perfectly well for my screen
but when i am try to ROTATE the screen and trying to run the app in
other screens of different resolution the images are not showing on the
circle they are palced at the fixed position.

my intention is the app should look similar in all the devices of different
resolution. (images should appear on the circle for all the different
resolution)

-- 
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] making an installed app not to be displayed in manage applications menu

2011-08-12 Thread kampy
Hi,

 I am making an mobile theft tracker application for which either i
need to remove uninstalling and reinstalling permissions and have to
provide uninstalling from the app

OR

have to provide uninstalling menu in the app and make the app not to
be displayed in the manage applications menu .

Can anyone help me out how to do this

-- 
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] AccountManager.addAccountExplicitly generates a null pointer error...

2011-08-12 Thread Richard Schilling
I'm getting a null pointer exception and the phone reboots when I call
AccountManager.addAccountExplicitly, even though I have a service that
returns a proper SyncAdapter.  It's all setup in the manifest
properly, etc  just like others was saying to do.  What other
possible conditions generate this:

08-11 22:47:16.394: ERROR/AndroidRuntime(52): Uncaught handler: thread
android.server.ServerThread exiting due to uncaught exception
08-11 22:47:16.394: ERROR/AndroidRuntime(52): *** EXCEPTION IN SYSTEM
PROCESS.  System will crash.
08-11 22:47:16.394: ERROR/AndroidRuntime(52):
java.lang.NullPointerException
08-11 22:47:16.394: ERROR/AndroidRuntime(52): at
com.android.settings.ManageAccountsSettings.onSyncStateUpdated(ManageAccountsSettings.java:
187)
08-11 22:47:16.394: ERROR/AndroidRuntime(52): at
com.android.settings.ManageAccountsSettings.onAccountsUpdated(ManageAccountsSettings.java:
244)
08-11 22:47:16.394: ERROR/AndroidRuntime(52): at
android.accounts.AccountManager$10.run(AccountManager.java:826)
08-11 22:47:16.394: ERROR/AndroidRuntime(52): at
android.os.Handler.handleCallback(Handler.java:587)
08-11 22:47:16.394: ERROR/AndroidRuntime(52): at
android.os.Handler.dispatchMessage(Handler.java:92)
08-11 22:47:16.394: ERROR/AndroidRuntime(52): at
android.os.Looper.loop(Looper.java:123)
08-11 22:47:16.394: ERROR/AndroidRuntime(52): at
com.android.server.ServerThread.run(SystemServer.java:428)


I've got the SyncService that returns a valid object so I know that
shouldn't be the problem:

public class OAuthSyncService extends Service {
  // syncher extends AbstractThreadedSyncAdapter

 // code omitted for brevity ...
@Override
public IBinder onBind(Intent intent) {

return syncer.getSyncAdapterBinder();
}
}


Thanks

Richard

-- 
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: Known reasons for rebooting?

2011-08-12 Thread Per
Update:

I had my app running for hours yesterday while charging, with the
Desire kept cool by sitting on top of a small CPU-cooler-like fan.
Noisy, but cool.
When I switched off the fan, the Desire rebooted within 3 minutes.

Also, no reboots in flight mode.

Bugger.


On Aug 11, 1:55 pm, Per p...@care2wear.com wrote:
 Oh dear.

 Though I'm sort of happy that I'm not to blame this time, this is
 horrible.

 I tried a few experiments not involving my app, and sure enough,
 loading the poor device a bit (music, youtube, navigation at the same
 time) works fine off the charger, but inserting the charger invariably
 reboots the thing within minutes. Sometimes it even reboots while
 recovering...

 Turning off WiFi/Data has no effect.
 Flight mode seems to help, but that's not really a good option :)

 I'll try cooling the device by a fan or something, just to confirm
 that temperature really is the cause.

 The thread you pointed to also discussed Froyo as a possible (partial)
 cause.
 I tend to suspect the 2.1-2.2 update to worsen the problem, I don't
 remember seeing this a year ago (when I was making a similar app).

 thanks,
 Per

 On Aug 11, 10:54 am, Nico Balestra nicobales...@gmail.com wrote:

  I think this is related to a known problem affecting the HTC Desire.

  Apparently it happens when the CPU gets hot, which is very likely for
  intensive operations.
  See 
  this:http://androidforums.com/desire-support-troubleshooting/78992-htc-des...

  I had an HTC Desire and it was rebooting all the time as soon as I attached
  the phone to my USB cable and starting an application via Eclipse. The same
  was happening when I was browsing the web or playing Angry Birds :)

  Eventually.. I've got a Samsung Galaxy S2!!

  Hope this help,
  Nico

  2011/8/11 Per p...@care2wear.com

   Does anyone know of (reproducible) reasons for device reboot?

   My app-under-development will run for hours if the device is not
   charging, but with USB connected it will reboot, usually within
   minutes. No exceptions shown, just a reboot.

   The app has one activity, which (via a WakefulIntentService [from
   CommonsWare]) sets up alarms that will trigger at different intervals
   (4mins to half a day). The alarms are cancelled when the activity is
   destroyed.
   When an alarm goes off, a BroadcastReceiver starts a
   WakefulIntentService, which pulls some data from a server and saves it
   in a file. That service starts another service, which provides a cache
   of the data in the file to the activity. The start of the cache
   service is afaik the simplest way of providing a simple notification.
   It is most likely already running, as it is bound by the activity.

   This could most likely be done smarter, but it seemed like a fair
   compromise when I want the app to work offline, too.

   Does anyone know of an interaction between USB/charging and
   wakelocks / alarms / services ?
   Logcat does not provide much help. Seems that the log is cleared at
   reboot.
   Any hints for debugging this apart from logcat (will adb bugreport
   provide more history than logcat?)

   Just for the record, I have seen the device (HTC Desire running 2.2)
   reboot when it gets hot (hot environment, lots of voice/data traffic
   while or just after charging), but it's running pretty cool in this
   scenario.

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



-- 
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: asmack.jar - typing notification.

2011-08-12 Thread arindam

Hi,

I have added the listener like MessageEventRequestListener and
MessageEventNotificationListener but nothing is happening.

Please give me idea on this.

Thanks.

- Arindam

-- 
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] Java script to Native Bindings reverse

2011-08-12 Thread Android Developer
Hi,

I am working on web applications where am trying to access Native
functionality in the phone using Java script APIs.

Android Web view supports Add Java script interface for Java script to
Java (native) bindings as in below link:

http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,
java.lang.String)

BUT if I need to pass data back to Java script there is no API or
mechanism to do so.
Could you please let me know if there is a way out, tried hard but
seems no API exposed for the same.

Thanks in advance,
A fellow Android Developer
PS

-- 
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: MediaRecorder video save issue

2011-08-12 Thread esse
Appears to be a problem specific to the phone's or operating system. I
have now tested the above code and my more complex video recorder code
on two different phones and I did not get the above issue.
Unfortunately I do not know if it was the phone or os.

On Aug 3, 12:20 pm, esse remotuse...@gmail.com wrote:
 For several days I have been trying to figure out an obscure problem
 related to saving video. I have narrowed it down to an issue with
 MediaRecorder. The problem is when you record many (15-30) videos in a
 row. What happens is that at some point (10) the BEEP sound that
 occurs when you start recording (i.e. MediaRecorder.start()) stops. In
 LogCat there will be an error from AudioFlinger ERROR/AudioTrack:
 AudioFlinger could not create track, status: -12. Once this has
 happen you can still record as many videos as you want without
 problem, BUT if you press the phones volume keys the phone will CRASH.

 The reason that I think it is related specifically to saving video is
 that I can comment out all of the video related setup for the
 MediaRecorder and then record only audio without any problem and
 nothing else about the code/program is different.

 I have included code that creates the same issue on my phone (Samsung
 Captivate running 2.2). Note that my actually video recorder code is
 different and that this code is simply to share and focus on the
 MediaRecorder video save issue.

 If you have experienced a similar issue please respond, if you test
 this code on your phone and you don't have any problems please let me
 know as I have started to think it is a phone/firmware issue. If you
 have code that works and can share please do.

 Thanks,

 public class Camcorder extends Activity implements
 SurfaceHolder.Callback {
                 MediaRecorder mRecorder;
                 SurfaceHolder mHolder;
                 SurfaceView mSurfaceView;
                 String mOutputFileRoot = /sdcard/Avid_;
                 String mOutputFile;
                 String mFileExt = .3gp;
                 Integer cnt = 0;
              private boolean mRecording = false;

              /** Called when the activity is first created. */
              @Override
              public void onCreate(Bundle savedInstanceState) {
                   super.onCreate(savedInstanceState);
                   requestWindowFeature(Window.FEATURE_NO_TITLE);

 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                                         
 WindowManager.LayoutParams.FLAG_FULLSCREEN);

 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
                   setContentView(R.layout.camcorder_preview);

                   mSurfaceView =
 ((SurfaceView)findViewById(R.id.camera_preview));
                   mHolder = mSurfaceView.getHolder();
                   mHolder.addCallback(this);
                           
 mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

              }

          @Override
          public boolean onKeyDown(int keyCode, KeyEvent event)
          {
              if (keyCode == KeyEvent.KEYCODE_SEARCH)
              {
                   if (mRecording) {
                                 stopRecording();
                     //finish();
                          if(mRecorder == null){
                                 initMediaRecorder();
                                 prepareMediaRecorder();
                                 }
                                 mRecording = false;
                 } else {
                     mRecording = true;

                     startRecording();
                 }
                  return true;
              }
              return super.onKeyDown(keyCode, event);
          }

          public void surfaceCreated(SurfaceHolder holder) {
                  mHolder = holder;
                  initMediaRecorder();
                  prepareMediaRecorder();

         }

         public void surfaceChanged(SurfaceHolder holder, int format,
 int width,
                         int height) {
         }

         public void surfaceDestroyed(SurfaceHolder holder) {
                 if(mHolder != null) mHolder = null;
                 if(mSurfaceView != null) mSurfaceView = null;
         }

         public void initMediaRecorder(){

                 mRecorder = new MediaRecorder();

                 mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
                 mRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
                 
 mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
                 mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
                 mRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263);
                 mRecorder.setPreviewDisplay(mHolder.getSurface());
                 mOutputFile = mOutputFileRoot + cnt.toString() + mFileExt;
                 cnt += 1;
                 mRecorder.setOutputFile(mOutputFile);

         }

         private void 

[android-developers] Number of notifications

2011-08-12 Thread hman
Hi,
How can I get the number of notifications (that appears in the
statusbar) avialable on the phone at any time ? regardless of whether
these notifications are calls, sms..etc.. appreciate if any one can
hel me with the right code..

thanks

-- 
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: Force Close Issue

2011-08-12 Thread Usef Ali
You could alway option your present location first, then destination
to.

On Aug 12, 12:21 am, Nick Risaro nris...@gmail.com wrote:
 That's so sad :(

 Maybe if you attach some logs we can help you and stop being sad.



 On Fri, Aug 12, 2011 at 1:15 AM, Spica spicaneb...@gmail.com wrote:
  I am developing location based application which uses phone's gps. It
  works fine on my android device when i am not moving but as soon as i
  start moving my application either freezes or error out with option of
  Force close. This application is also consuming web service to send
  location to the server.

  --
  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- Hide quoted text -

 - Show quoted text -

-- 
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] how to enable the dragging option in android browser?

2011-08-12 Thread simi
i want to run the site http://html5demos.com/drag; .. actually this
site is opening in android browser(1e,in android emulator).but can not
do the drag option.. what should do for dragging the texts in
emulator Is there any workaround possible for working
the HTML5 drag and drop example in emulator browser?

-- 
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] update_all.py problem

2011-08-12 Thread antoine Y
Hi Everyone,
 I am trying to port bionic libc with linux kernel, and when I
generate header files, according to README.TXT at /bionic/libc/
kernel/, I copy linux header files at kernel/original... and run tools/
update_all.py, it comes problem as following:(no mater it's in
isolated bionic dir or in whole android code dirs)
 libc/kernel$  tools/update_all.py
Traceback (most recent call last):
  File tools/update_all.py, line 3, in module
import sys, cpp, kernel, glob, os, re, getopt, clean_header
  File /media/work/sei/android/working_directory/bionic/libc/kernel/
tools/cpp.py, line 5, in module
from defaults import *
  File /media/work/sei/android/working_directory/bionic/libc/kernel/
tools/defaults.py, line 48
{asm: __asm__},
  ^
SyntaxError: invalid syntax

It beats me. Does somebody know how to solve it?

Thanks!

-- 
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] Activity Start Performance Improvement - how to dealt with loading the data while the UI continues to be displayed

2011-08-12 Thread gml
Hi guys,

I have simple application that loading the data needed upon the
Activity starts which it consume about 2-3 minutes. Then, the UI
displayed after that long process.

Present Scenario:
1) click the app to start.
2) progress bar pop-up while doing the data loading in my localDB
(about 2-3mins).
3) progress bar closes, UI start to load and display the data from
localDB.

Problem:
Want to start and load/display the UI immediately while loading the
data into localDB but display it one by one.
But don't have idea on how to implement it.

Expected Scenario:
1) click the app to start. then immediately load and display the UI.
2) on the background, get the data and load to localDB while
displaying it one by one to UI.

Thanks and regards,

Eros
Japan

-- 
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] Need ideas on encrypting h.264 videos on Android

2011-08-12 Thread Peter Taps
Folks,

Our application requires that a H.264 video be kept on the disk in an
encrypted format. One should be able to play this video only through our
application.

I am seeking ideas on the best way to achieve this.

I looked at VideoView class. Looks like it can only take a file, HTTP or
RTSP uri. One thought I had was to implement a RTSP server on the device as
part of our application but that may be an overkill.

I would appreciate your thought..

Thank you in advance for your help.

Best regards,
Peter

-- 
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: Force Close Issue

2011-08-12 Thread Usef Ali
You could mange that fix by having the app locate you (the user)
first, then input destination 2nd.

On Aug 12, 12:15 am, Spica spicaneb...@gmail.com wrote:
 I am developing location based application which uses phone's gps. It
 works fine on my android device when i am not moving but as soon as i
 start moving my application either freezes or error out with option of
 Force close. This application is also consuming web service to send
 location to the server.

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


Re: [android-developers] Re: Force Close Issue

2011-08-12 Thread Der Jäger .
Can't you incorporate Google maps to your app for judging your location ?

On Fri, Aug 12, 2011 at 12:40 AM, Spica spicaneb...@gmail.com wrote:

 This my first android application so i am not sure what log i need to
 attach...

 On Aug 12, 12:21 am, Nick Risaro nris...@gmail.com wrote:
  That's so sad :(
 
  Maybe if you attach some logs we can help you and stop being sad.
 
 
 
 
 
 
 
  On Fri, Aug 12, 2011 at 1:15 AM, Spica spicaneb...@gmail.com wrote:
   I am developing location based application which uses phone's gps. It
   works fine on my android device when i am not moving but as soon as i
   start moving my application either freezes or error out with option of
   Force close. This application is also consuming web service to send
   location to the server.
 
   --
   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

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




--

-- 
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] Camera onPreviewFrame not called after video recording with MediaRecorder

2011-08-12 Thread esse
when using the Camera.PreviewCallback implementation the
onPreviewFrame is called without problem after initializing camera and
starting preview (Camera.startPrevew()). The problem is if I make a
video recording using MediaRecorder onPreviewFrame does not get called
any more.

I understand that when using MediaRecorder to record video stops the
Camera.PreviewCallback, but why can't it be restarted?

I have tried resetting the camera preview callback
(setPreviewCallback(callback)) and restarting startPreview, but while
I have a preview there is no call to onPreviewFrame.

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


Re: [android-developers] Fwd: imageview displaying

2011-08-12 Thread Appaholics
Use a RelativeLayout or create the screen at runtime with java and set the
margins after calculating them.

Thanks

On Fri, Aug 12, 2011 at 11:33 AM, arun kumar arun.kata...@gmail.com wrote:

 thankyou for ur reply


 how can i solve this the image has to appear according to the screen
 resolution(actually am having a circle(placed at the centre of the
 screen)  on that i placed four images (top,left,right.bottom) by giving
 android:layout_marginLeft=10dip ((for leftside image)) and similarly for
 all the images i done like that...it suit perfectly well for my screen
 but when i am try to ROTATE the screen and trying to run the app in
 other screens of different resolution the images are not showing on the
 circle they are palced at the fixed position.

 my intention is the app should look similar in all the devices of different
 resolution. (images should appear on the circle for all the different
 resolution)

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




-- 

Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

-- 
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] How to save captured image by camera to a particular location ?

2011-08-12 Thread Amit Mangal
Hi Everyone,
I am opening camera by my app and taking picture with that camera now i want
to save that image to a particular folder in sd card i have calculated path
of folder.
please let me know how to save that image in particular path.

thank you

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

Re: [android-developers] Re: Known reasons for rebooting?

2011-08-12 Thread Nico Balestra
As I told you.. I switched on a Samsung Galaxy S2 :)
I thought about keeping the HTC just for testing my apps on a different
device but eventually it was useless.
As soon as I connected the device on the USB port... puff.. function
reboot() { reboot(); }:)))

2011/8/12 Per p...@care2wear.com

 Update:

 I had my app running for hours yesterday while charging, with the
 Desire kept cool by sitting on top of a small CPU-cooler-like fan.
 Noisy, but cool.
 When I switched off the fan, the Desire rebooted within 3 minutes.

 Also, no reboots in flight mode.

 Bugger.


 On Aug 11, 1:55 pm, Per p...@care2wear.com wrote:
  Oh dear.
 
  Though I'm sort of happy that I'm not to blame this time, this is
  horrible.
 
  I tried a few experiments not involving my app, and sure enough,
  loading the poor device a bit (music, youtube, navigation at the same
  time) works fine off the charger, but inserting the charger invariably
  reboots the thing within minutes. Sometimes it even reboots while
  recovering...
 
  Turning off WiFi/Data has no effect.
  Flight mode seems to help, but that's not really a good option :)
 
  I'll try cooling the device by a fan or something, just to confirm
  that temperature really is the cause.
 
  The thread you pointed to also discussed Froyo as a possible (partial)
  cause.
  I tend to suspect the 2.1-2.2 update to worsen the problem, I don't
  remember seeing this a year ago (when I was making a similar app).
 
  thanks,
  Per
 
  On Aug 11, 10:54 am, Nico Balestra nicobales...@gmail.com wrote:
 
   I think this is related to a known problem affecting the HTC Desire.
 
   Apparently it happens when the CPU gets hot, which is very likely for
   intensive operations.
   See this:
 http://androidforums.com/desire-support-troubleshooting/78992-htc-des...
 
   I had an HTC Desire and it was rebooting all the time as soon as I
 attached
   the phone to my USB cable and starting an application via Eclipse. The
 same
   was happening when I was browsing the web or playing Angry Birds :)
 
   Eventually.. I've got a Samsung Galaxy S2!!
 
   Hope this help,
   Nico
 
   2011/8/11 Per p...@care2wear.com
 
Does anyone know of (reproducible) reasons for device reboot?
 
My app-under-development will run for hours if the device is not
charging, but with USB connected it will reboot, usually within
minutes. No exceptions shown, just a reboot.
 
The app has one activity, which (via a WakefulIntentService [from
CommonsWare]) sets up alarms that will trigger at different intervals
(4mins to half a day). The alarms are cancelled when the activity is
destroyed.
When an alarm goes off, a BroadcastReceiver starts a
WakefulIntentService, which pulls some data from a server and saves
 it
in a file. That service starts another service, which provides a
 cache
of the data in the file to the activity. The start of the cache
service is afaik the simplest way of providing a simple notification.
It is most likely already running, as it is bound by the activity.
 
This could most likely be done smarter, but it seemed like a fair
compromise when I want the app to work offline, too.
 
Does anyone know of an interaction between USB/charging and
wakelocks / alarms / services ?
Logcat does not provide much help. Seems that the log is cleared at
reboot.
Any hints for debugging this apart from logcat (will adb bugreport
provide more history than logcat?)
 
Just for the record, I have seen the device (HTC Desire running 2.2)
reboot when it gets hot (hot environment, lots of voice/data traffic
while or just after charging), but it's running pretty cool in this
scenario.
 
--
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
 
 

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


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

Re: [android-developers] how to enable the dragging option in android browser?

2011-08-12 Thread Duygu Kahraman
i check in device.Dragging option doesnt work too.



Duygu Kahraman
http://tr.linkedin.com/in/duygukahramann

2011/8/12 simi simivenugopa...@gmail.com

 i want to run the site http://html5demos.com/drag; .. actually this
 site is opening in android browser(1e,in android emulator).but can not
 do the drag option.. what should do for dragging the texts in
 emulator Is there any workaround possible for working
 the HTML5 drag and drop example in emulator browser?

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

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

Re: [android-developers] Users Verifying my App Signature

2011-08-12 Thread sparky
No, I think that was just hyperbole.  It's still 25 years.

http://developer.android.com/guide/publishing/app-signing.html

The signature isn't to say, unequivocally, I am Sparky. It says, both 
versions of this app were signed by the same author.

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

Re: [android-developers] Users Verifying my App Signature

2011-08-12 Thread Nikolay Elenkov
On Fri, Aug 12, 2011 at 6:06 PM, sparky spar...@google.com wrote:
 No, I think that was just hyperbole.  It's still 25 years.
 http://developer.android.com/guide/publishing/app-signing.html


On other forums, there have been reports that you are unable to
publish a new app if the certificate is valid for less than 50 years.
Updates still work, it seems.

 The signature isn't to say, unequivocally, I am Sparky. It says, both
 versions of this app were signed by the same author.

It's rather hard to be unequivocal :)

-- 
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] how to set read writ permission to recorded file

2011-08-12 Thread Amit Mangal
Hi everyone i am doing audio recording after recording audio my prepare get
fails.
I have read on some threads set permission to a file while playing from sd
card please tell me any one knows how to set permission recorded file
programatically so that i willbe able to play it inside from my app.

thanks

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

Re: [android-developers] how to set read writ permission to recorded file

2011-08-12 Thread Appaholics
You aren't making too much sense. Do you want the permissions for the
manifest or the permissions to set for the audio file?

Thanks

On Fri, Aug 12, 2011 at 2:48 PM, Amit Mangal forum.amit.man...@gmail.comwrote:

 Hi everyone i am doing audio recording after recording audio my prepare get
 fails.
 I have read on some threads set permission to a file while playing from sd
 card please tell me any one knows how to set permission recorded file
 programatically so that i willbe able to play it inside from my app.

 thanks

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




-- 

Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

-- 
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] Save data in file or db

2011-08-12 Thread Kristoffer
Hello.

This is my first app made in eclipse (have worked with app inventor)

This is a simple app where i have two buttons and a textview.

one button will increase 1 to the number that shows in the textview
and the other button will decrease with 1.

So the question is whats the best way to handle the number that shows
in the textView field?

Is it over kill to use sqlite for this?
should i save it in i file?

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


Re: [android-developers] Save data in file or db

2011-08-12 Thread Appaholics
If you need it only once per run and can afford to throw it away and start
again from next time then simply increment a variable. Otherwise for
something like this SharedPreferences would do as well.

Thanks

On Fri, Aug 12, 2011 at 2:53 PM, Kristoffer kris.isak.v...@gmail.comwrote:

 Hello.

 This is my first app made in eclipse (have worked with app inventor)

 This is a simple app where i have two buttons and a textview.

 one button will increase 1 to the number that shows in the textview
 and the other button will decrease with 1.

 So the question is whats the best way to handle the number that shows
 in the textView field?

 Is it over kill to use sqlite for this?
 should i save it in i file?

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




-- 

Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

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

Re: [android-developers] how to set read writ permission to recorded file

2011-08-12 Thread Amit Mangal
No,

I want to play audio file which i have recorded by my application.recording
is working fine but playing not.
thanks
On Fri, Aug 12, 2011 at 2:51 PM, Appaholics raghavs...@appaholics.inwrote:

 You aren't making too much sense. Do you want the permissions for the
 manifest or the permissions to set for the audio file?

 Thanks

 On Fri, Aug 12, 2011 at 2:48 PM, Amit Mangal 
 forum.amit.man...@gmail.comwrote:

 Hi everyone i am doing audio recording after recording audio my prepare
 get fails.
 I have read on some threads set permission to a file while playing from sd
 card please tell me any one knows how to set permission recorded file
 programatically so that i willbe able to play it inside from my app.

 thanks

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




 --
 
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete control)
 http://www.raghavsood.com/
 https://market.android.com/developer?pub=Appaholics
 http://www.appaholics.in/

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

-- 
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] Sqlite version in all Android platforms

2011-08-12 Thread ndiiie 90
Hi guys,

I am wonder what is sqlite version in all android platforms?

Is it version 3? or is there any version below?


Thanks,

Rendy

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

Re: [android-developers] how to set read writ permission to recorded file

2011-08-12 Thread Appaholics
If you created the file you should be able to read it. There must be some
other problem. Post the LogCat and relevant code.

On Fri, Aug 12, 2011 at 3:24 PM, Amit Mangal forum.amit.man...@gmail.comwrote:

 No,

 I want to play audio file which i have recorded by my application.recording
 is working fine but playing not.
 thanks
 On Fri, Aug 12, 2011 at 2:51 PM, Appaholics raghavs...@appaholics.inwrote:

 You aren't making too much sense. Do you want the permissions for the
 manifest or the permissions to set for the audio file?

 Thanks

 On Fri, Aug 12, 2011 at 2:48 PM, Amit Mangal forum.amit.man...@gmail.com
  wrote:

 Hi everyone i am doing audio recording after recording audio my prepare
 get fails.
 I have read on some threads set permission to a file while playing from
 sd card please tell me any one knows how to set permission recorded file
 programatically so that i willbe able to play it inside from my app.

 thanks

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




 --
 
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete control)
 http://www.raghavsood.com/
 https://market.android.com/developer?pub=Appaholics
 http://www.appaholics.in/

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


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




-- 

Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

-- 
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: Save data in file or db

2011-08-12 Thread Kristoffer
Thanks for the answer.

I need to save the value from sessions to sessions to i need to save
it.
so you think that i should go with SharedPreferences instead?


On 12 Aug, 11:26, Appaholics raghavs...@appaholics.in wrote:
 If you need it only once per run and can afford to throw it away and start
 again from next time then simply increment a variable. Otherwise for
 something like this SharedPreferences would do as well.

 Thanks

 On Fri, Aug 12, 2011 at 2:53 PM, Kristoffer kris.isak.v...@gmail.comwrote:





  Hello.

  This is my first app made in eclipse (have worked with app inventor)

  This is a simple app where i have two buttons and a textview.

  one button will increase 1 to the number that shows in the textview
  and the other button will decrease with 1.

  So the question is whats the best way to handle the number that shows
  in the textView field?

  Is it over kill to use sqlite for this?
  should i save it in i file?

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

 --
 
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete 
 control)http://www.raghavsood.com/https://market.android.com/developer?pub=Appaholicshttp://www.appaholics.in/

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


Re: [android-developers] Re: Save data in file or db

2011-08-12 Thread Appaholics
For a simple storage thing like this you could safely use SharedPreferences.
If it starts becoming complex then a database would be best.

On Fri, Aug 12, 2011 at 3:47 PM, Kristoffer kris.isak.v...@gmail.comwrote:

 Thanks for the answer.

 I need to save the value from sessions to sessions to i need to save
 it.
 so you think that i should go with SharedPreferences instead?


 On 12 Aug, 11:26, Appaholics raghavs...@appaholics.in wrote:
  If you need it only once per run and can afford to throw it away and
 start
  again from next time then simply increment a variable. Otherwise for
  something like this SharedPreferences would do as well.
 
  Thanks
 
  On Fri, Aug 12, 2011 at 2:53 PM, Kristoffer kris.isak.v...@gmail.com
 wrote:
 
 
 
 
 
   Hello.
 
   This is my first app made in eclipse (have worked with app inventor)
 
   This is a simple app where i have two buttons and a textview.
 
   one button will increase 1 to the number that shows in the textview
   and the other button will decrease with 1.
 
   So the question is whats the best way to handle the number that shows
   in the textView field?
 
   Is it over kill to use sqlite for this?
   should i save it in i file?
 
   --
   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
 
  --
  
  Raghav Sood
  CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
  required to have complete control)
 http://www.raghavsood.com/https://market.android.com/developer?pub=Appaholicshttp://www.appaholics.in/

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




-- 

Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

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

Re: [android-developers] Need ideas on encrypting h.264 videos on Android

2011-08-12 Thread Sumedh Jiwane
actually not sure what do you want to do. can you be elaborate more. Do you
want to play local file or remote file. Do you want to stream or download
and play?


On Fri, Aug 12, 2011 at 8:28 AM, Peter Taps ptr...@gmail.com wrote:

 Folks,

 Our application requires that a H.264 video be kept on the disk in an
 encrypted format. One should be able to play this video only through our
 application.

 I am seeking ideas on the best way to achieve this.

 I looked at VideoView class. Looks like it can only take a file, HTTP or
 RTSP uri. One thought I had was to implement a RTSP server on the device as
 part of our application but that may be an overkill.

 I would appreciate your thought..

 Thank you in advance for your help.

 Best regards,
 Peter

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

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

Re: [android-developers] Fwd: imageview displaying

2011-08-12 Thread arun kumar
Hi am sending the xml code i made by taking relative layout...so,where i
have to change the code..can u guide me...

Thanks


RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:orientation=vertical android:id=@+id/ll
android:background=@drawable/circle2
android:layout_width=wrap_content android:layout_height=wrap_content
android:scaleType=center

 LinearLayout android:layout_alignParentTop=true
android:layout_marginTop=48dip android:orientation=vertical
android:layout_width=fill_parent android:layout_height=fill_parent

  RelativeLayout  android:orientation=vertical
android:layout_width=fill_parent android:layout_weight=1
android:layout_height=wrap_content 
  ImageView  android:layout_height=wrap_content
android:layout_centerHorizontal=true android:id=@+id/iv1
android:layout_width=wrap_content android:paddingTop=15dip
android:src=@drawable/ideas/ImageView

  /RelativeLayout

   RelativeLayout  android:orientation=horizontal
android:layout_width=fill_parent android:layout_weight=1
android:layout_height=100dip 

 ImageView android:paddingTop=10dip
android:layout_height=wrap_content android:id=@+id/iv4
android:layout_width=wrap_content  android:paddingLeft=10dip
android:src=@drawable/valueaddedservices
android:scaleType=fitCenter/ImageView



ImageView android:src=@drawable/investors
android:paddingTop=10dip android:layout_marginRight=10dip
android:layout_alignParentRight=true android:layout_width=wrap_content
android:layout_gravity=right android:id=@+id/iv2
android:layout_height=wrap_content/ImageView


   /RelativeLayout

  RelativeLayout  android:orientation=horizontal
android:layout_weight=1 android:layout_width=fill_parent
android:layout_height=wrap_content 
  ImageView  android:layout_height=wrap_content
android:layout_marginLeft=8dip android:layout_centerHorizontal=true
android:id=@+id/iv3   android:layout_width=wrap_content
android:paddingBottom=40dip
android:src=@drawable/implementors/ImageView


 /RelativeLayout
 /LinearLayout


 /RelativeLayout

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

Re: [android-developers] Java script to Native Bindings reverse

2011-08-12 Thread Mark Murphy
On Fri, Aug 12, 2011 at 2:57 AM, Android Developer p.sidda...@gmail.com wrote:
 I am working on web applications where am trying to access Native
 functionality in the phone using Java script APIs.

 Android Web view supports Add Java script interface for Java script to
 Java (native) bindings as in below link:

 http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,
 java.lang.String)

 BUT if I need to pass data back to Java script there is no API or
 mechanism to do so.

Sure there is.

 Could you please let me know if there is a way out, tried hard but
 seems no API exposed for the same.

Call loadUrl(javascript:...), where the ... is your JavaScript
source code. That JavaScript source will be executed in the context of
whatever Web page is presently loaded. This is the same technique that
bookmarklets use.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

-- 
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: Sqlite version in all Android platforms

2011-08-12 Thread Peter Stacey

http://developer.android.com/reference/android/database/sqlite/package-summary.html

Last sentence of first paragraph.


On Aug 12, 7:57 pm, ndiiie 90 rnd...@gmail.com wrote:
 Hi guys,

 I am wonder what is sqlite version in all android platforms?

 Is it version 3? or is there any version below?

 Thanks,

 Rendy

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


Re: [android-developers] making an installed app not to be displayed in manage applications menu

2011-08-12 Thread Mark Murphy
On Fri, Aug 12, 2011 at 2:15 AM, kampy narasimha1...@gmail.com wrote:
  I am making an mobile theft tracker application for which either i
 need to remove uninstalling and reinstalling permissions and have to
 provide uninstalling from the app

 OR

 have to provide uninstalling menu in the app and make the app not to
 be displayed in the manage applications menu .

 Can anyone help me out how to do this

Fortunately, none of this is possible. The techniques you describe are
far more likely to be used by malware.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

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


Re: [android-developers] Number of notifications

2011-08-12 Thread Mark Murphy
On Thu, Aug 11, 2011 at 5:11 PM, hman housn...@gmail.com wrote:
 How can I get the number of notifications (that appears in the
 statusbar) avialable on the phone at any time ? regardless of whether
 these notifications are calls, sms..etc.. appreciate if any one can
 hel me with the right code..

This is not possible from the Android SDK, sorry. The status bar (or
system bar for Honeycomb) is managed completely by the OS in its own
process.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

-- 
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] Service Discovery is not happening when screen is off

2011-08-12 Thread SREEHARI
Hi,

My application runs a service which can announce the Upnp discovery
through Wifi. The device is getting discovered in Cling work bench.
But when the screen is off, the device is not getting discovered. I
tried Wakelock and Wifilock, but still its not working. I changed the
sleep policy in Wifi settings also.

I tried this application in 3 phones. In Samsung galaxy fit with
Android 2.2, it works fine. In screen off mode also the device is
getting discovered. in Nexus S and HTC wildfire S with Android 2.3.3
its not happening. Is this the problem with Wifi state change or
something else?? Please help me on this.

Thanks in advance,
Sreehari

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


Re: [android-developers] Re: Sqlite version in all Android platforms

2011-08-12 Thread Mark Murphy
Actually, that documentation lies.

http://stackoverflow.com/questions/2421189/version-of-sqlite-used-in-android

On Fri, Aug 12, 2011 at 6:54 AM, Peter Stacey peterst6...@gmail.com wrote:

 http://developer.android.com/reference/android/database/sqlite/package-summary.html

 Last sentence of first paragraph.


 On Aug 12, 7:57 pm, ndiiie 90 rnd...@gmail.com wrote:
 Hi guys,

 I am wonder what is sqlite version in all android platforms?

 Is it version 3? or is there any version below?

 Thanks,

 Rendy

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




-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

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


Re: [android-developers] OnCheckedChangeListener not working on RadioGroup

2011-08-12 Thread Mark Murphy
The error message is self-explanatory. You are trying to use
a CompoundButton.OnCheckedChangeListener() in a place that takes
a RadioGroup.OnCheckedChangeListener.

On Fri, Aug 12, 2011 at 12:58 AM, shamir shakir dewswo...@gmail.com wrote:

 Hello,
 I was trying to add the CheckedChangeListner for RadioGroup and it's not
 working ... :(
 I'm using eclipse IDE. And I'm getting this error

 The method setOnCheckedChangeListener(RadioGroup.OnCheckedChangeListener)
 in the type RadioGroup is not applicable for the arguments (new
 CompoundButton.OnCheckedChangeListener(){})


 Here's the code

 package com.dewsworld.android.practise;

 import java.util.Date;

 import android.app.Activity;
 import android.content.Intent;
 import android.content.res.Resources.Theme;
 import android.graphics.drawable.GradientDrawable.Orientation;
 import android.os.Bundle;
 import android.os.Process;
 import android.provider.ContactsContract;
 import android.util.Log;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.AutoCompleteTextView;
 import android.widget.Button;
 import android.widget.CheckBox;
 import android.widget.Checkable;
 import android.widget.CompoundButton;
 import android.widget.CompoundButton.OnCheckedChangeListener;
 import android.widget.EditText;
 import android.widget.Gallery;
 import android.widget.LinearLayout;
 import android.widget.ProgressBar;
 import android.widget.QuickContactBadge;
 import android.widget.RadioGroup;
 import android.widget.TextView;
 import android.widget.Toast;
 import android.widget.ToggleButton;
 import android.widget.SimpleAdapter.ViewBinder;

 public class EntryPointActivity extends Activity {
  @Override
  protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main) ;
  RadioGroup radioGroup = (RadioGroup)this.findViewById(R.id.rg) ;
  radioGroup.setOnCheckedChangeListener( new OnCheckedChangeListener() {
   @Override
  public void onCheckedChanged(RadioGroup group, int checkedId) {
  // ... :(
  }
  });
  }
 }


 Any kind of help is much more appreciated. Thanks

 --

* Shamir Shakir*
 L-2, T-2, Grad. Student, B. Sc., Dept. of CSE,
 Military Institute of Science and Technology (MIST),
 Mirpur Cantonment, Dhaka, Bangladesh.

 www.dewsworld.info | dewswo...@gmail.com


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




-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

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

Re: [android-developers] Fwd: imageview displaying

2011-08-12 Thread Appaholics
Put everything in one RelativeLayout and then use the Below etc parameters
to position your images.

On Fri, Aug 12, 2011 at 4:20 PM, arun kumar arun.kata...@gmail.com wrote:

 Hi am sending the xml code i made by taking relative layout...so,where i
 have to change the code..can u guide me...

 Thanks


 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
 android:orientation=vertical android:id=@+id/ll
 android:background=@drawable/circle2
 android:layout_width=wrap_content
 android:layout_height=wrap_content android:scaleType=center
 
  LinearLayout android:layout_alignParentTop=true
 android:layout_marginTop=48dip android:orientation=vertical
 android:layout_width=fill_parent android:layout_height=fill_parent

   RelativeLayout  android:orientation=vertical
 android:layout_width=fill_parent android:layout_weight=1
 android:layout_height=wrap_content 
   ImageView  android:layout_height=wrap_content
 android:layout_centerHorizontal=true android:id=@+id/iv1
 android:layout_width=wrap_content android:paddingTop=15dip
 android:src=@drawable/ideas/ImageView

   /RelativeLayout

RelativeLayout  android:orientation=horizontal
 android:layout_width=fill_parent android:layout_weight=1
 android:layout_height=100dip 

  ImageView android:paddingTop=10dip
 android:layout_height=wrap_content android:id=@+id/iv4
 android:layout_width=wrap_content  android:paddingLeft=10dip
 android:src=@drawable/valueaddedservices
 android:scaleType=fitCenter/ImageView



 ImageView android:src=@drawable/investors
 android:paddingTop=10dip android:layout_marginRight=10dip
 android:layout_alignParentRight=true android:layout_width=wrap_content
 android:layout_gravity=right android:id=@+id/iv2
 android:layout_height=wrap_content/ImageView


/RelativeLayout

   RelativeLayout  android:orientation=horizontal
 android:layout_weight=1 android:layout_width=fill_parent
 android:layout_height=wrap_content 
   ImageView  android:layout_height=wrap_content
 android:layout_marginLeft=8dip android:layout_centerHorizontal=true
 android:id=@+id/iv3   android:layout_width=wrap_content
 android:paddingBottom=40dip
 android:src=@drawable/implementors/ImageView


  /RelativeLayout
  /LinearLayout


  /RelativeLayout




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




-- 

Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

-- 
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: Sqlite version in all Android platforms

2011-08-12 Thread Peter Stacey

Interesting. I thanks for that one Mark.

I think it's safe to assume the minimum version is 3.4.0


On Aug 12, 8:56 pm, Mark Murphy mmur...@commonsware.com wrote:
 Actually, that documentation lies.

 http://stackoverflow.com/questions/2421189/version-of-sqlite-used-in-...









 On Fri, Aug 12, 2011 at 6:54 AM, Peter Stacey peterst6...@gmail.com wrote:

 http://developer.android.com/reference/android/database/sqlite/packag...

  Last sentence of first paragraph.

  On Aug 12, 7:57 pm, ndiiie 90 rnd...@gmail.com wrote:
  Hi guys,

  I am wonder what is sqlite version in all android platforms?

  Is it version 3? or is there any version below?

  Thanks,

  Rendy

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

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
 Available!

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


Re: [android-developers] How to close an activity

2011-08-12 Thread leo luo
Hi,

If the version u used is before 2.2, I guess u can try this methord:
ActivityManager activityManager =
(ActivityManager)
context.getSystemService(Context.ACTIVITY_SERVICE);
activityManager.restartPackage(packagename);
If the version is 2.2 or later: u may try this:

public static ListActivity activityList = new ArrayListActivity();
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
activityList.add(this);
public static void exitClient(Context context)
{
Log.d(TAG, - exitClient -);
   for (int i = 0; i  activityList.size(); i++)
{
if (null != activityList.get(i))
{
activityList.get(i).finish();
}
 }
ActivityManager activityManager =(ActivityManager)
context.getSystemService(Context.ACTIVITY_SERVICE);
activityManager.restartPackage(com.huawei.softclient.mtvclient);
System.exit(0);
}

On Wed, Aug 10, 2011 at 11:05 PM, xzoom yoni.se...@gmail.com wrote:

 Hi,
 I have an activity A (a menu) that creates and start activity B (a
 running game).

public void onClick(View v) {
switch(v.getId()){
case R.id.start:
Intent i = new Intent(this,
 GameActivity.class);
startActivity(i);
break;
case R.id.exit:
finish();
break;
}
}

 When I'm back into the menu (activity A) and while activity B is in
 the background , I want to stop activity A and B. How to do it?
 thanks.

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

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

Re: [android-developers] Re: Sqlite version in all Android platforms

2011-08-12 Thread Mark Murphy
On Fri, Aug 12, 2011 at 7:07 AM, Peter Stacey peterst6...@gmail.com wrote:
 I think it's safe to assume the minimum version is 3.4.0

Agreed. I think that they just haven't updated the docs. There was an
extended thread recently on the compatibility issues this can raise,
particularly if you assume newer capabilities.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

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


Re: [android-developers] Need ideas on encrypting h.264 videos on Android

2011-08-12 Thread Daniel Drozdzewski
On 12 August 2011 11:28, Sumedh Jiwane sumed...@gmail.com wrote:
 actually not sure what do you want to do. can you be elaborate more. Do you
 want to play local file or remote file. Do you want to stream or download
 and play?

 On Fri, Aug 12, 2011 at 8:28 AM, Peter Taps ptr...@gmail.com wrote:

 Folks,

 Our application requires that a H.264 video be kept on the disk in an
 encrypted format. One should be able to play this video only through our
 application.

 I am seeking ideas on the best way to achieve this.

 I looked at VideoView class. Looks like it can only take a file, HTTP or
 RTSP uri. One thought I had was to implement a RTSP server on the device as
 part of our application but that may be an overkill.

 I would appreciate your thought..

 Thank you in advance for your help.

 Best regards,
 Peter

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


Peter, looking at various available APIs, it seems that you have 1
choice (maybe 2):

1) to decrypt the video into a temporary local file and prepare
MediaPlayer (or VideoView) with URI to this temp file.
It obviously makes you vulnerable to attack, between creation and
deletion of said file.

possible 2) Extend FileDescriptor class so that it's IN file
descriptor points at encrypted video file
FD.sync() of your extended FD causes read +  decrypt + write to OUT FD
(which is what MediaPlayer reads from) of some chunk of the encrypted
file. The resulting amount of decrypted bytes should be big enough to
keep the player occupied. Please also mind that this will all depend
on the 'power' of host hardware.

Your sync() method should be overriding parts of file that OUT FD
points to, that have been consumed already by the Player with some
random gibberish. You will need to use RandomAccessFile to create the
OUT FD and keep track of its offset for erasing and for playing.

Good Luck!

-- 
Daniel Drozdzewski

-- 
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: connecting USB serial device to Android handset, is it possible?

2011-08-12 Thread ColorTheorist
While I do not have full understanding of different hardwares and
chips, not being too familiar with hardware in general, the Honeycomb
suite does allow for the user to connect an HID interfacing USB device
and open up a connection with it.  From there you could communicate
with the device via a direct bytestream if you know what commands to
send it over the connection (as well as receive over the connection).
I have done this just recently with an external USB device and am
currently communicating with it at the moment.

If this is on track, I'm glad that it could provide you with the
understanding that it is capable.

On Aug 10, 10:55 am, razor razorjac...@gmail.com wrote:
 Hi.
 I have simple USB interface (acting like serial port, basen on FTDI
 FT245RL chip).
 It works on windows like COM port.

 Is it possible to connect it to Android Phone (like HTC Desire) and
 read/write values from this port ?

-- 
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: Run Flash on Android Emulator?

2011-08-12 Thread dhirendra
Hi Mark,

Do you know how to embed flash animation into my android
application(flash on app start) which is not browser based?
If not possible, is their anyway i can load webview for flash to just
show that animation and than go to my application which is not webview
based.

Regards
Dhirendra

On Aug 11, 5:41 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Aug 9, 2011 at 4:32 PM, kch...@arccorp.com kch...@arccorp.com wrote:
  My boss wants me to view an internal company website on Android
  Emulator. However, the website was built in Flash.
  So far, I cannot find any way to run Flash website on Emulator.
  Is Flash runnable on Android Emulator?

 Not really.

 First, it is only distributed through the Android Market, which means
 to get it on an emulator, you would have to pirate something.

 Second, AFAIK, it relies heavily on hardware graphics acceleration,
 and therefore would perform poorly on an emulator anyway.

  btw, I'm using Galaxy Tablet to view it and it is super SLOW...

 It will be ~10x slower on an equivalent emulator.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to Android Development_ Version 3.6 Available!

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


Re: [android-developers] how to set read writ permission to recorded file

2011-08-12 Thread Amit Mangal
Problem is solved i need to pass file descriptor rather than path string.
thanks

On Fri, Aug 12, 2011 at 3:28 PM, Appaholics raghavs...@appaholics.inwrote:

 If you created the file you should be able to read it. There must be some
 other problem. Post the LogCat and relevant code.

 On Fri, Aug 12, 2011 at 3:24 PM, Amit Mangal 
 forum.amit.man...@gmail.comwrote:

 No,

 I want to play audio file which i have recorded by my
 application.recording is working fine but playing not.
 thanks
 On Fri, Aug 12, 2011 at 2:51 PM, Appaholics raghavs...@appaholics.inwrote:

 You aren't making too much sense. Do you want the permissions for the
 manifest or the permissions to set for the audio file?

 Thanks

 On Fri, Aug 12, 2011 at 2:48 PM, Amit Mangal 
 forum.amit.man...@gmail.com wrote:

 Hi everyone i am doing audio recording after recording audio my prepare
 get fails.
 I have read on some threads set permission to a file while playing from
 sd card please tell me any one knows how to set permission recorded file
 programatically so that i willbe able to play it inside from my app.

 thanks

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




 --
 
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete control)
 http://www.raghavsood.com/
 https://market.android.com/developer?pub=Appaholics
 http://www.appaholics.in/

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


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




 --
 
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete control)
 http://www.raghavsood.com/
 https://market.android.com/developer?pub=Appaholics
 http://www.appaholics.in/

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


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

Re: [android-developers] Re: Run Flash on Android Emulator?

2011-08-12 Thread Mark Murphy
On Fri, Aug 12, 2011 at 8:22 AM, dhirendra dhirendraii...@gmail.com wrote:
 Do you know how to embed flash animation into my android
 application(flash on app start) which is not browser based?

There may be a way to show the Flash in an app via a WebView, but I
have not tried it, and I see enough support questions about it that I
suspect it may not be very straight-forward.

Beyond that, no, it is not possible.

 If not possible, is their anyway i can load webview for flash to just
 show that animation and than go to my application which is not webview
 based.

In theory, you could use addJavaScriptInterface() to expose something
in the JavaScript environment of the page loading the Flash animation,
that the Flash animation could call via the Flash-JavaScript bridge.
The interface could start another activity and call finish() on the
current one. I have no idea if this works, and I suspect that it would
be simpler for you to convert the FLV into an MP4 and play it with
VideoView.

Furthermore, I *really* detest opening animations like this. They add
no value, waste the user's time, and suck up device resources. If you
are going to have one, give the user a setting to turn it off, so they
are not irritated by it every time they use your app.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

-- 
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] How to get android capture image URI?

2011-08-12 Thread vijayakumar M
Hi Friends,

How to get android camera capture image uri?
any one help me please

Thanks for advance

-- 





νιנαソαkum@r M
BloG:http://iamvijayakumar.blogspot.com/

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

Re: [android-developers] How to get android capture image URI?

2011-08-12 Thread Ratheesh Valamchuzhy
hi
Vijaya kumar
plse find the links

http://stackoverflow.com/questions/6248887/android-device-specific-camera-path

or
Uri target = Uri.parse(content://media/external/
images/media);

-- 
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 close an activity A and sub activity B that runs in the background?

2011-08-12 Thread nadam
Activity B is not running in the background. It's already stopped, so
you just need to call finish() to stop Activity A.

But since you already do that I assume that there is some other
problem. Maybe you call startActivity() to get back to Activity A from
Activity B? Call finish() instead in Activity B.

On 10 Aug, 17:06, xzoom yoni.se...@gmail.com wrote:
 Hi,
 I have an activity A (a menu) that creates and start activity B (a
 running game).

         public void onClick(View v) {
                 switch(v.getId()){
                         case R.id.start:
                                 Intent i = new Intent(this, 
 GameActivity.class);
                                 startActivity(i);
                                 break;
                         case R.id.exit:
                                 finish();
                                 break;
                 }
         }

 When I'm back into the menu (activity A) and while activity B is in
 the background , I want to stop activity A and B. How to do it?
 thanks.

-- 
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: Problem installing USB driver for Nexus S

2011-08-12 Thread nadam
The right drivers seems to be part of PdaNet, so that's what many
people recommend as the easiest way to solve this problem.
http://junefabrics.com/android/download.php

On 10 Aug, 02:02, David dfket...@gmail.com wrote:
 Hi!

 I've installed the SDK and AVD Manager (successfully, I believe), and
 now I'm trying to install the USB driver from Google for the Samsung
 Nexus S. But in the list of available packages under Google Inc., it
 just says Some packages were found but are not compatible updates.
 I'm running under Windows 7 64-bit. Any suggestions?

 Thanks.

-- 
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: Query...

2011-08-12 Thread nadam
http://developer.android.com/guide/topics/data/data-storage.html

On 11 Aug, 13:01, ISHAN THAPAR ishanthapar...@gmail.com wrote:
 But can you give me some example with code to unnderstand!!!







 On Thu, Aug 11, 2011 at 3:56 AM, Nico Balestra nicobales...@gmail.com wrote:
  Probably bits

  2011/8/11 Daniel Drozdzewski daniel.drozdzew...@gmail.com

  On 11 August 2011 11:43, Ishan ishanthapar...@gmail.com wrote:
   Hello Friends,

   Can any one tell me how information is stored in android phone?

  robustly

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

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

-- 
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 parse a text data in an xml,if the text data in xml contains spaces ?

2011-08-12 Thread nadam
The characters() method may be called several times, so you need to
use a StringBuilder to append all the information. See the following
links:
http://stackoverflow.com/questions/2838099/android-sax-parser-not-getting-full-text-from-between-tags
http://www.ibm.com/developerworks/opensource/library/x-android

On 11 Aug, 09:10, Prashant Mahajan androidra...@gmail.com wrote:
 Hello Everyone,

  I am using Saxparser and also giving name of the tags in startElement and
 endElement methods. But i am not getting whole text in between two tags.m
 only getting half of the text. Also if der is a space between two sentences
 of the text data in xml, i am getting the text after the space in output but
 not the complete text. How to overcome this flaw...? Kindly Help.. Thanks in
 advance.

 *The text data in xml is in the format shown below.*
 Desc![CDATA[

 Contrary to popular belief, Lorem Ipsum is not simply random text. It has
 roots in a piece of classical Latin literature from 45 BC, making it over
 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney
 College in Virginia, looked up one of the more obscure Latin words,
 consectetur, from a Lorem Ipsum passage, and going through the cites of the
 word in classical literature, discovered the undoubtable source. Lorem Ipsum
 comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum
 (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a
 treatise on the theory of ethics, very popular during the Renaissance. The
 first line of Lorem Ipsum, Lorem ipsum dolor sit amet.., comes from a line
 in section 1.10.32.

 The standard chunk of Lorem Ipsum used since the 1500s is reproduced below
 for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum
 et Malorum by Cicero are also reproduced in their exact original form,
 accompanied by English versions from the 1914 translation by H. Rackham.]
 ]/Desc

 *And part of MyCode is as follows;*

  public byte parse() {
         SAXParserFactory spf = null;
         SAXParser sp = null;
         InputStream inputStream = null;

         try {
             inputStream = new ByteArrayInputStream(data.getBytes());
             spf = SAXParserFactory.newInstance();
             if (spf != null) {
                 sp = spf.newSAXParser();
                 sp.parse(inputStream, this);
             }
         }

         catch (Exception e) {
             System.out.println(Exception:  + e);
             e.printStackTrace();
         } finally {
             try {
                 if (inputStream != null)
                     inputStream.close();
             } catch (Exception e) {
             }
         }

 }

 public void startElement(String uri, String localName, String qName,
             Attributes attributes) throws SAXException {

 tempVal = ;

     if (localName.equals(Desc)) {
             track = new Track();
             isABC = true;
         }

 }

 public void characters(char[] ch, int start, int length)
             throws SAXException {
         tempVal = new String(ch, start, length);
     }

 public void endElement(String uri, String localName, String qName)
             throws SAXException {

 if (localName.equals(Desc))
         {
             // add it to the list
             abclist.addElement((track));
             isABC = false;
         }







 }

-- 
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: Force Close Issue

2011-08-12 Thread Spica
Guys, functionality is fine but issue is that it crashes when device
moves. I will install looger app and upload the log here today.

On Aug 12, 12:32 am, Usef Ali djse.internatio...@gmail.com wrote:
 You could mange that fix by having the app locate you (the user)
 first, then input destination 2nd.

 On Aug 12, 12:15 am, Spica spicaneb...@gmail.com wrote:



  I am developing location based application which uses phone's gps. It
  works fine on my android device when i am not moving but as soon as i
  start moving my application either freezes or error out with option of
  Force close. This application is also consuming web service to send
  location to the server.- Hide quoted text -

 - Show quoted text -

-- 
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 close entire app?

2011-08-12 Thread ndiiie90
Hi again Mark,

I must close the entire app, because my app is a commerce application,
that has its own flow until the payment, and user can't go back to
previous screen, so whenever user has reached the last page, there are
options to exit the app or go back to menu again..have any idea?


Thanks,

Rendy

On Aug 11, 7:49 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Aug 10, 2011 at 10:55 PM, ndiiie 90 rnd...@gmail.com wrote:
  how to close entire app?

 You don't, any more than you close entire Web app. Android will
 terminate your process eventually, just leave it alone.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to Android Development_ Version 3.6 Available!

-- 
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: Sqlite version in all Android platforms

2011-08-12 Thread ndiiie90
Hi Mark,

thanks for your answer.

By the way I just borrowed your book from library.. :D

and thanks also for Peter


Thanks,

Rendy


On Aug 12, 6:13 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Aug 12, 2011 at 7:07 AM, Peter Stacey peterst6...@gmail.com wrote:
  I think it's safe to assume the minimum version is 3.4.0

 Agreed. I think that they just haven't updated the docs. There was an
 extended thread recently on the compatibility issues this can raise,
 particularly if you assume newer capabilities.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
 Available!

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


Re: [android-developers] Re: How to close entire app?

2011-08-12 Thread Mark Murphy
On Fri, Aug 12, 2011 at 11:17 AM, ndiiie90 rnd...@gmail.com wrote:
 I must close the entire app

No, you don't.

 because my app is a commerce application,
 that has its own flow until the payment, and user can't go back to
 previous screen, so whenever user has reached the last page, there are
 options to exit the app or go back to menu again..have any idea?

So, if this were a Web app, you would attempt to reboot the user's PC
to prevent them from pressing the BACK button in their Web browser?

If not, what would you do in the Web app?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

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


Re: [android-developers] Re: Sqlite version in all Android platforms

2011-08-12 Thread Mark Murphy
On Fri, Aug 12, 2011 at 11:18 AM, ndiiie90 rnd...@gmail.com wrote:
 By the way I just borrowed your book from library.. :D

Don't forget to return it on time. :-)

BTW, if the book is _Beginning Android 2_, that is older than the
Creative Commons-licensed Version 3.0 of _The Busy Coder's Guide to
Android Development_ that I have on:

http://commonsware.com/Android/

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

-- 
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] Restarting onPreviewFrame

2011-08-12 Thread esse
when using the Camera.PreviewCallback implementation the
onPreviewFrame is called without problem after initializing camera and
starting preview (Camera.startPrevew()). The problem is if I make a
video recording using MediaRecorder onPreviewFrame stops being called
and cannot be restarted after video recording.

I understand that when using MediaRecorder to record video it stops
the Camera.PreviewCallback, but why can't it be restarted after?

I have tried resetting the camera preview callback
(setPreviewCallback(callback)) and restarting startPreview, but while
I have a preview there is no call to onPreviewFrame.

-- 
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: Force Close Issue

2011-08-12 Thread Spica
Here is the log and at this point i do not have any idea what it
means;
==
CRASH LOG:
0.00)
08-12 10:54:08.908 D/gps_BRCM( 2479): on_location_cb() : location is
missed. flags is 0!
08-12 10:54:08.908 D/GpsLocationProvider( 2479): send an intent to
notify that the GPS is receiving fixes
08-12 10:54:08.943 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
used_in_fix_mask : 0x)
08-12 10:54:08.943 D/GpsLocationProvider( 2479): send an intent to
notify that the GPS is no longer receiving fixes
08-12 10:54:09.900 D/gps_BRCM( 2479): on_location_cb() :
lat(40.734275), lon(-73.596664), flags(0x000c),
accuracy(100.00)
08-12 10:54:09.900 D/gps_BRCM( 2479): on_location_cb() : location is
missed. flags is 0!
08-12 10:54:09.904 D/GpsLocationProvider( 2479): send an intent to
notify that the GPS is receiving fixes
08-12 10:54:09.979 I/wpa_supplicant( 2555): CTRL-EVENT-NO-CONNECTION
08-12 10:54:09.979 I/WifiMonitor( 2479): Event [ SCAN-RESULTS ]
08-12 10:54:09.979 I/WifiMonitor( 2479): Event [CTRL-EVENT-NO-
CONNECTION]
08-12 10:54:10.010 I/NetworkStatusReceiver( 3662): action:
android.net.wifi.SCAN_RESULTS
08-12 10:54:10.022 I/NetworkStatusReceiver( 3662): action:
android.net.wifi.SHOW_AP_LIST_DIALOG
08-12 10:54:10.022 E/WifiManager( 3662): showApDialog
08-12 10:54:10.025 I/WifiService( 2479):
isShowingAccessPointListDialog():false
08-12 10:54:10.025 I/WifiService( 2479):
setShowAccessPointListDialog():false
08-12 10:54:10.041 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 8
used_in_fix_mask : 0x)
08-12 10:54:10.041 D/GpsLocationProvider( 2479): send an intent to
notify that the GPS is no longer receiving fixes
08-12 10:54:10.900 D/gps_BRCM( 2479): on_location_cb() :
lat(40.734275), lon(-73.596664), flags(0x000c),
accuracy(100.00)
08-12 10:54:10.900 D/gps_BRCM( 2479): on_location_cb() : location is
missed. flags is 0!
08-12 10:54:10.900 D/GpsLocationProvider( 2479): send an intent to
notify that the GPS is receiving fixes
08-12 10:54:10.939 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 8
used_in_fix_mask : 0x)
08-12 10:54:10.939 D/GpsLocationProvider( 2479): send an intent to
notify that the GPS is no longer receiving fixes
08-12 10:54:11.893 D/gps_BRCM( 2479): on_location_cb() :
lat(40.734275), lon(-73.596664), flags(0x000c),
accuracy(1500.00)
08-12 10:54:11.893 D/gps_BRCM( 2479): on_location_cb() : location is
missed. flags is 0!
08-12 10:54:11.893 D/GpsLocationProvider( 2479): send an intent to
notify that the GPS is receiving fixes
08-12 10:54:11.908 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 8
used_in_fix_mask : 0x)
08-12 10:54:11.908 D/GpsLocationProvider( 2479): send an intent to
notify that the GPS is no longer receiving fixes
08-12 10:54:12.908 D/gps_BRCM( 2479): on_location_cb() :
lat(40.734275), lon(-73.596664), flags(0x000c),
accuracy(1500.00)
08-12 10:54:12.908 D/gps_BRCM( 2479): on_location_cb() : location is
missed. flags is 0!
08-12 10:54:12.908 D/GpsLocationProvider( 2479): send an intent to
notify that the GPS is receiving fixes
08-12 10:54:12.994 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
used_in_fix_mask : 0x)
08-12 10:54:12.994 D/GpsLocationProvider( 2479): send an intent to
notify that the GPS is no longer receiving fixes
08-12 10:54:13.908 D/gps_BRCM( 2479): on_location_cb() :
lat(40.734275), lon(-73.596664), flags(0x000c),
accuracy(1500.00)
08-12 10:54:13.908 D/gps_BRCM( 2479): on_location_cb() : location is
missed. flags is 0!
08-12 10:54:13.912 D/GpsLocationProvider( 2479): send an intent to
notify that the GPS is receiving fixes
08-12 10:54:13.951 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
used_in_fix_mask : 0x)
08-12 10:54:13.951 D/GpsLocationProvider( 2479): send an intent to
notify that the GPS is no longer receiving fixes
08-12 10:54:14.936 I/GpsLocationProvider( 2479): requestRefLocation:
gsm_cell = [11940,156182206]
08-12 10:54:14.940 I/GpsLocationProvider( 2479): requestRefLocation:
mcc = 310 mnc = 410
08-12 10:54:14.943 D/gps_BRCM( 2479): on_location_cb() :
lat(40.733659), lon(-73.597838), flags(0x001f),
accuracy(100.00)
08-12 10:54:14.947 D/GpsLocationProvider( 2479): send an intent to
notify that the GPS is receiving fixes
08-12 10:54:15.022 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
used_in_fix_mask : 0x50001000)
08-12 10:54:15.904 I/GpsLocationProvider( 2479): requestRefLocation:
gsm_cell = [11940,156182206]
08-12 10:54:15.904 I/GpsLocationProvider( 2479): requestRefLocation:
mcc = 310 mnc = 410
08-12 10:54:15.912 D/gps_BRCM( 2479): on_location_cb() :
lat(40.733659), lon(-73.597838), flags(0x001f),
accuracy(100.00)
08-12 10:54:15.916 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
used_in_fix_mask : 0x50001000)
08-12 10:54:16.912 I/WifiMonitor( 2479): Event [ SCAN-RESULTS ]
08-12 10:54:16.916 I/wpa_supplicant( 2555): CTRL-EVENT-NO-CONNECTION
08-12 10:54:16.916 I/WifiMonitor( 2479): Event [CTRL-EVENT-NO-

Re: [android-developers] Re: Force Close Issue

2011-08-12 Thread Mark Murphy
None of that shows a crash. A Force Close dialog will have a Java
stack trace associated with it.

On Fri, Aug 12, 2011 at 11:29 AM, Spica spicaneb...@gmail.com wrote:
 Here is the log and at this point i do not have any idea what it
 means;
 ==
 CRASH LOG:
 0.00)
 08-12 10:54:08.908 D/gps_BRCM( 2479): on_location_cb() : location is
 missed. flags is 0!
 08-12 10:54:08.908 D/GpsLocationProvider( 2479): send an intent to
 notify that the GPS is receiving fixes
 08-12 10:54:08.943 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
 used_in_fix_mask : 0x)
 08-12 10:54:08.943 D/GpsLocationProvider( 2479): send an intent to
 notify that the GPS is no longer receiving fixes
 08-12 10:54:09.900 D/gps_BRCM( 2479): on_location_cb() :
 lat(40.734275), lon(-73.596664), flags(0x000c),
 accuracy(100.00)
 08-12 10:54:09.900 D/gps_BRCM( 2479): on_location_cb() : location is
 missed. flags is 0!
 08-12 10:54:09.904 D/GpsLocationProvider( 2479): send an intent to
 notify that the GPS is receiving fixes
 08-12 10:54:09.979 I/wpa_supplicant( 2555): CTRL-EVENT-NO-CONNECTION
 08-12 10:54:09.979 I/WifiMonitor( 2479): Event [ SCAN-RESULTS ]
 08-12 10:54:09.979 I/WifiMonitor( 2479): Event [CTRL-EVENT-NO-
 CONNECTION]
 08-12 10:54:10.010 I/NetworkStatusReceiver( 3662): action:
 android.net.wifi.SCAN_RESULTS
 08-12 10:54:10.022 I/NetworkStatusReceiver( 3662): action:
 android.net.wifi.SHOW_AP_LIST_DIALOG
 08-12 10:54:10.022 E/WifiManager( 3662): showApDialog
 08-12 10:54:10.025 I/WifiService( 2479):
 isShowingAccessPointListDialog():false
 08-12 10:54:10.025 I/WifiService( 2479):
 setShowAccessPointListDialog():false
 08-12 10:54:10.041 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 8
 used_in_fix_mask : 0x)
 08-12 10:54:10.041 D/GpsLocationProvider( 2479): send an intent to
 notify that the GPS is no longer receiving fixes
 08-12 10:54:10.900 D/gps_BRCM( 2479): on_location_cb() :
 lat(40.734275), lon(-73.596664), flags(0x000c),
 accuracy(100.00)
 08-12 10:54:10.900 D/gps_BRCM( 2479): on_location_cb() : location is
 missed. flags is 0!
 08-12 10:54:10.900 D/GpsLocationProvider( 2479): send an intent to
 notify that the GPS is receiving fixes
 08-12 10:54:10.939 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 8
 used_in_fix_mask : 0x)
 08-12 10:54:10.939 D/GpsLocationProvider( 2479): send an intent to
 notify that the GPS is no longer receiving fixes
 08-12 10:54:11.893 D/gps_BRCM( 2479): on_location_cb() :
 lat(40.734275), lon(-73.596664), flags(0x000c),
 accuracy(1500.00)
 08-12 10:54:11.893 D/gps_BRCM( 2479): on_location_cb() : location is
 missed. flags is 0!
 08-12 10:54:11.893 D/GpsLocationProvider( 2479): send an intent to
 notify that the GPS is receiving fixes
 08-12 10:54:11.908 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 8
 used_in_fix_mask : 0x)
 08-12 10:54:11.908 D/GpsLocationProvider( 2479): send an intent to
 notify that the GPS is no longer receiving fixes
 08-12 10:54:12.908 D/gps_BRCM( 2479): on_location_cb() :
 lat(40.734275), lon(-73.596664), flags(0x000c),
 accuracy(1500.00)
 08-12 10:54:12.908 D/gps_BRCM( 2479): on_location_cb() : location is
 missed. flags is 0!
 08-12 10:54:12.908 D/GpsLocationProvider( 2479): send an intent to
 notify that the GPS is receiving fixes
 08-12 10:54:12.994 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
 used_in_fix_mask : 0x)
 08-12 10:54:12.994 D/GpsLocationProvider( 2479): send an intent to
 notify that the GPS is no longer receiving fixes
 08-12 10:54:13.908 D/gps_BRCM( 2479): on_location_cb() :
 lat(40.734275), lon(-73.596664), flags(0x000c),
 accuracy(1500.00)
 08-12 10:54:13.908 D/gps_BRCM( 2479): on_location_cb() : location is
 missed. flags is 0!
 08-12 10:54:13.912 D/GpsLocationProvider( 2479): send an intent to
 notify that the GPS is receiving fixes
 08-12 10:54:13.951 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
 used_in_fix_mask : 0x)
 08-12 10:54:13.951 D/GpsLocationProvider( 2479): send an intent to
 notify that the GPS is no longer receiving fixes
 08-12 10:54:14.936 I/GpsLocationProvider( 2479): requestRefLocation:
 gsm_cell = [11940,156182206]
 08-12 10:54:14.940 I/GpsLocationProvider( 2479): requestRefLocation:
 mcc = 310 mnc = 410
 08-12 10:54:14.943 D/gps_BRCM( 2479): on_location_cb() :
 lat(40.733659), lon(-73.597838), flags(0x001f),
 accuracy(100.00)
 08-12 10:54:14.947 D/GpsLocationProvider( 2479): send an intent to
 notify that the GPS is receiving fixes
 08-12 10:54:15.022 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
 used_in_fix_mask : 0x50001000)
 08-12 10:54:15.904 I/GpsLocationProvider( 2479): requestRefLocation:
 gsm_cell = [11940,156182206]
 08-12 10:54:15.904 I/GpsLocationProvider( 2479): requestRefLocation:
 mcc = 310 mnc = 410
 08-12 10:54:15.912 D/gps_BRCM( 2479): on_location_cb() :
 lat(40.733659), lon(-73.597838), flags(0x001f),
 accuracy(100.00)
 08-12 10:54:15.916 D/gps_BRCM( 

[android-developers] How safe to store database in sqlite?

2011-08-12 Thread ndiiie 90
Hi guys,


I wonder how safe to store sensitive data in sqlite in Android?

Because i've researched that rooted Android phone can access the database.
But can the database to be edited? or view only?


Thanks,

Rendy

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

Re: [android-developers] How safe to store database in sqlite?

2011-08-12 Thread Kristopher Micinski
http://developer.android.com/guide/topics/data/data-storage.html#db?

On Fri, Aug 12, 2011 at 11:39 AM, ndiiie 90 rnd...@gmail.com wrote:

 Hi guys,


 I wonder how safe to store sensitive data in sqlite in Android?

 Because i've researched that rooted Android phone can access the database.
 But can the database to be edited? or view only?


 Thanks,

 Rendy

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

-- 
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: enableForegroundNdefPush not working

2011-08-12 Thread musfiq
Normal tag sharing works. But foregroundNDEFPush not working?
Nothing in logcat. By the way, I could not find your apps searchin
ndef push in the market.

On Aug 11, 12:35 pm, nadam a...@anyro.se wrote:
 That description seems to cover everything you need (except holding
 the two phones together back-to-back, but I assume you've done that
 too). You can also check for error messages in logcat.

 I can't think of anything going wrong with uploading the api demo
 example, but just to double check you can try my simple app which you
 find by searching for ndef push on the market.

 Can you use other NFC features of the phones (scan tags etc)? Perhaps
 one of them is broken.

 On 11 Aug, 17:16, musfiq musfiqu...@gmail.com wrote:

  I have 2 Google nexus S phone with android version 2.3.4. I have
  uploaded Api demo example in 
  both.http://developer.android.com/resources/samples/ApiDemos/src/com/examp...

  When I try to run ForegroundDispatch in one mobile and
  ForegroundNdefPush in another, no tag transfer is happening. Both
  mobile have NFC enabled. Am I  missing something?
  /Musfiq

  On Aug 10, 1:11 am, Michael Roland mi.rol...@gmail.com wrote:

   Hallo Musfiq,

   it might help if you posted some of the relevant code.

   br,
   Michael

   On Aug 9, 3:46 am, musfiq musfiqu...@gmail.com wrote:

Hi:
I am trying to share a string between mobile phones using NFC. I want
the same application to send the tag and another to receive the tag in
two different role (Sender and receiver).  I have tried to use
enableForegroundNdefPush in the sender side and 
enableForegroundDispatch in the receiver side. But it isnotworking.
Can anyone please help?
/Musfiq

-- 
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: Service Discovery is not happening when screen is off

2011-08-12 Thread b0b
It is probably related to Wifi Power Save Polling (PSP) mode which can
cause issues like this depending on the device and the WiFi router.
It can also cause stuterring audio, for example for VoIP apps.

See this link for full details:

http://code.google.com/p/android/issues/detail?id=9781

To solve this, you need to create a WiFi lock with mode
WifiManager.WIFI_MODE_FULL_HIGH_PERF.
Although the doc state this constant is only available since API 12,
in
my experience the mode is available since Gingerbread. So you can
create your lock like this:

int wifiMode = WifiManager.WIFI_MODE_FULL;
try {
  Field f = WifiManager.class.getField(WIFI_MODE_FULL_HIGH_PERF);
  wifiMode = f.getInt(null);
} catch (Exception e) {
}


wifiLock = wifiManager.createWifiLock(wifiMode, blargh);


I don't think there's any device running = 2.2 whose WiFi chipset
implements PSP.
But if that's the case,  the only way it to leave the screen on for
those device.




On Aug 12, 12:56 pm, SREEHARI harisre...@gmail.com wrote:
 Hi,

 My application runs a service which can announce the Upnp discovery
 through Wifi. The device is getting discovered in Cling work bench.
 But when the screen is off, the device is not getting discovered. I
 tried Wakelock and Wifilock, but still its not working. I changed the
 sleep policy in Wifi settings also.

 I tried this application in 3 phones. In Samsung galaxy fit with
 Android 2.2, it works fine. In screen off mode also the device is
 getting discovered. in Nexus S and HTC wildfire S with Android 2.3.3
 its not happening. Is this the problem with Wifi state change or
 something else?? Please help me on this.

 Thanks in advance,
 Sreehari

-- 
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: Force Close Issue

2011-08-12 Thread Spica
I grabbed this log using app Log Report. Could you suggest how i can
capture log so it grabs the Java stack trace?
Or suggest better app to capture log.

On Aug 12, 11:31 am, Mark Murphy mmur...@commonsware.com wrote:
 None of that shows a crash. A Force Close dialog will have a Java
 stack trace associated with it.



 On Fri, Aug 12, 2011 at 11:29 AM, Spica spicaneb...@gmail.com wrote:
  Here is the log and at this point i do not have any idea what it
  means;
  ==
  CRASH LOG:
  0.00)
  08-12 10:54:08.908 D/gps_BRCM( 2479): on_location_cb() : location is
  missed. flags is 0!
  08-12 10:54:08.908 D/GpsLocationProvider( 2479): send an intent to
  notify that the GPS is receiving fixes
  08-12 10:54:08.943 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
  used_in_fix_mask : 0x)
  08-12 10:54:08.943 D/GpsLocationProvider( 2479): send an intent to
  notify that the GPS is no longer receiving fixes
  08-12 10:54:09.900 D/gps_BRCM( 2479): on_location_cb() :
  lat(40.734275), lon(-73.596664), flags(0x000c),
  accuracy(100.00)
  08-12 10:54:09.900 D/gps_BRCM( 2479): on_location_cb() : location is
  missed. flags is 0!
  08-12 10:54:09.904 D/GpsLocationProvider( 2479): send an intent to
  notify that the GPS is receiving fixes
  08-12 10:54:09.979 I/wpa_supplicant( 2555): CTRL-EVENT-NO-CONNECTION
  08-12 10:54:09.979 I/WifiMonitor( 2479): Event [ SCAN-RESULTS ]
  08-12 10:54:09.979 I/WifiMonitor( 2479): Event [CTRL-EVENT-NO-
  CONNECTION]
  08-12 10:54:10.010 I/NetworkStatusReceiver( 3662): action:
  android.net.wifi.SCAN_RESULTS
  08-12 10:54:10.022 I/NetworkStatusReceiver( 3662): action:
  android.net.wifi.SHOW_AP_LIST_DIALOG
  08-12 10:54:10.022 E/WifiManager( 3662): showApDialog
  08-12 10:54:10.025 I/WifiService( 2479):
  isShowingAccessPointListDialog():false
  08-12 10:54:10.025 I/WifiService( 2479):
  setShowAccessPointListDialog():false
  08-12 10:54:10.041 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 8
  used_in_fix_mask : 0x)
  08-12 10:54:10.041 D/GpsLocationProvider( 2479): send an intent to
  notify that the GPS is no longer receiving fixes
  08-12 10:54:10.900 D/gps_BRCM( 2479): on_location_cb() :
  lat(40.734275), lon(-73.596664), flags(0x000c),
  accuracy(100.00)
  08-12 10:54:10.900 D/gps_BRCM( 2479): on_location_cb() : location is
  missed. flags is 0!
  08-12 10:54:10.900 D/GpsLocationProvider( 2479): send an intent to
  notify that the GPS is receiving fixes
  08-12 10:54:10.939 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 8
  used_in_fix_mask : 0x)
  08-12 10:54:10.939 D/GpsLocationProvider( 2479): send an intent to
  notify that the GPS is no longer receiving fixes
  08-12 10:54:11.893 D/gps_BRCM( 2479): on_location_cb() :
  lat(40.734275), lon(-73.596664), flags(0x000c),
  accuracy(1500.00)
  08-12 10:54:11.893 D/gps_BRCM( 2479): on_location_cb() : location is
  missed. flags is 0!
  08-12 10:54:11.893 D/GpsLocationProvider( 2479): send an intent to
  notify that the GPS is receiving fixes
  08-12 10:54:11.908 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 8
  used_in_fix_mask : 0x)
  08-12 10:54:11.908 D/GpsLocationProvider( 2479): send an intent to
  notify that the GPS is no longer receiving fixes
  08-12 10:54:12.908 D/gps_BRCM( 2479): on_location_cb() :
  lat(40.734275), lon(-73.596664), flags(0x000c),
  accuracy(1500.00)
  08-12 10:54:12.908 D/gps_BRCM( 2479): on_location_cb() : location is
  missed. flags is 0!
  08-12 10:54:12.908 D/GpsLocationProvider( 2479): send an intent to
  notify that the GPS is receiving fixes
  08-12 10:54:12.994 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
  used_in_fix_mask : 0x)
  08-12 10:54:12.994 D/GpsLocationProvider( 2479): send an intent to
  notify that the GPS is no longer receiving fixes
  08-12 10:54:13.908 D/gps_BRCM( 2479): on_location_cb() :
  lat(40.734275), lon(-73.596664), flags(0x000c),
  accuracy(1500.00)
  08-12 10:54:13.908 D/gps_BRCM( 2479): on_location_cb() : location is
  missed. flags is 0!
  08-12 10:54:13.912 D/GpsLocationProvider( 2479): send an intent to
  notify that the GPS is receiving fixes
  08-12 10:54:13.951 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
  used_in_fix_mask : 0x)
  08-12 10:54:13.951 D/GpsLocationProvider( 2479): send an intent to
  notify that the GPS is no longer receiving fixes
  08-12 10:54:14.936 I/GpsLocationProvider( 2479): requestRefLocation:
  gsm_cell = [11940,156182206]
  08-12 10:54:14.940 I/GpsLocationProvider( 2479): requestRefLocation:
  mcc = 310 mnc = 410
  08-12 10:54:14.943 D/gps_BRCM( 2479): on_location_cb() :
  lat(40.733659), lon(-73.597838), flags(0x001f),
  accuracy(100.00)
  08-12 10:54:14.947 D/GpsLocationProvider( 2479): send an intent to
  notify that the GPS is receiving fixes
  08-12 10:54:15.022 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
  used_in_fix_mask : 0x50001000)
  08-12 10:54:15.904 

[android-developers] Re: newbie: onLocationChanged invoked even in sleep mode

2011-08-12 Thread Marcus
No, the code above is the whole thing. There is no other code than
that. But my cofusion is that I get updates even though phone is
appear to be sleeping.

On 11 Aug, 19:55, lbendlin l...@bendlin.us wrote:
 are you canceling your requests for location updates in the onPause()
 function?

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


Re: [android-developers] Re: Force Close Issue

2011-08-12 Thread Kristopher Micinski
Run a logcat after you force close while you have the device plugged in
(or hooked up in some other way to your debug bridge.)

Logcat can give you some good helpful hints, you can read a bit more about
it.

Kris

On Fri, Aug 12, 2011 at 12:18 PM, Spica spicaneb...@gmail.com wrote:

 I grabbed this log using app Log Report. Could you suggest how i can
 capture log so it grabs the Java stack trace?
 Or suggest better app to capture log.

 On Aug 12, 11:31 am, Mark Murphy mmur...@commonsware.com wrote:
  None of that shows a crash. A Force Close dialog will have a Java
  stack trace associated with it.
 
 
 
  On Fri, Aug 12, 2011 at 11:29 AM, Spica spicaneb...@gmail.com wrote:
   Here is the log and at this point i do not have any idea what it
   means;
   ==
   CRASH LOG:
   0.00)
   08-12 10:54:08.908 D/gps_BRCM( 2479): on_location_cb() : location is
   missed. flags is 0!
   08-12 10:54:08.908 D/GpsLocationProvider( 2479): send an intent to
   notify that the GPS is receiving fixes
   08-12 10:54:08.943 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
   used_in_fix_mask : 0x)
   08-12 10:54:08.943 D/GpsLocationProvider( 2479): send an intent to
   notify that the GPS is no longer receiving fixes
   08-12 10:54:09.900 D/gps_BRCM( 2479): on_location_cb() :
   lat(40.734275), lon(-73.596664), flags(0x000c),
   accuracy(100.00)
   08-12 10:54:09.900 D/gps_BRCM( 2479): on_location_cb() : location is
   missed. flags is 0!
   08-12 10:54:09.904 D/GpsLocationProvider( 2479): send an intent to
   notify that the GPS is receiving fixes
   08-12 10:54:09.979 I/wpa_supplicant( 2555): CTRL-EVENT-NO-CONNECTION
   08-12 10:54:09.979 I/WifiMonitor( 2479): Event [ SCAN-RESULTS ]
   08-12 10:54:09.979 I/WifiMonitor( 2479): Event [CTRL-EVENT-NO-
   CONNECTION]
   08-12 10:54:10.010 I/NetworkStatusReceiver( 3662): action:
   android.net.wifi.SCAN_RESULTS
   08-12 10:54:10.022 I/NetworkStatusReceiver( 3662): action:
   android.net.wifi.SHOW_AP_LIST_DIALOG
   08-12 10:54:10.022 E/WifiManager( 3662): showApDialog
   08-12 10:54:10.025 I/WifiService( 2479):
   isShowingAccessPointListDialog():false
   08-12 10:54:10.025 I/WifiService( 2479):
   setShowAccessPointListDialog():false
   08-12 10:54:10.041 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 8
   used_in_fix_mask : 0x)
   08-12 10:54:10.041 D/GpsLocationProvider( 2479): send an intent to
   notify that the GPS is no longer receiving fixes
   08-12 10:54:10.900 D/gps_BRCM( 2479): on_location_cb() :
   lat(40.734275), lon(-73.596664), flags(0x000c),
   accuracy(100.00)
   08-12 10:54:10.900 D/gps_BRCM( 2479): on_location_cb() : location is
   missed. flags is 0!
   08-12 10:54:10.900 D/GpsLocationProvider( 2479): send an intent to
   notify that the GPS is receiving fixes
   08-12 10:54:10.939 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 8
   used_in_fix_mask : 0x)
   08-12 10:54:10.939 D/GpsLocationProvider( 2479): send an intent to
   notify that the GPS is no longer receiving fixes
   08-12 10:54:11.893 D/gps_BRCM( 2479): on_location_cb() :
   lat(40.734275), lon(-73.596664), flags(0x000c),
   accuracy(1500.00)
   08-12 10:54:11.893 D/gps_BRCM( 2479): on_location_cb() : location is
   missed. flags is 0!
   08-12 10:54:11.893 D/GpsLocationProvider( 2479): send an intent to
   notify that the GPS is receiving fixes
   08-12 10:54:11.908 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 8
   used_in_fix_mask : 0x)
   08-12 10:54:11.908 D/GpsLocationProvider( 2479): send an intent to
   notify that the GPS is no longer receiving fixes
   08-12 10:54:12.908 D/gps_BRCM( 2479): on_location_cb() :
   lat(40.734275), lon(-73.596664), flags(0x000c),
   accuracy(1500.00)
   08-12 10:54:12.908 D/gps_BRCM( 2479): on_location_cb() : location is
   missed. flags is 0!
   08-12 10:54:12.908 D/GpsLocationProvider( 2479): send an intent to
   notify that the GPS is receiving fixes
   08-12 10:54:12.994 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
   used_in_fix_mask : 0x)
   08-12 10:54:12.994 D/GpsLocationProvider( 2479): send an intent to
   notify that the GPS is no longer receiving fixes
   08-12 10:54:13.908 D/gps_BRCM( 2479): on_location_cb() :
   lat(40.734275), lon(-73.596664), flags(0x000c),
   accuracy(1500.00)
   08-12 10:54:13.908 D/gps_BRCM( 2479): on_location_cb() : location is
   missed. flags is 0!
   08-12 10:54:13.912 D/GpsLocationProvider( 2479): send an intent to
   notify that the GPS is receiving fixes
   08-12 10:54:13.951 D/gps_BRCM( 2479): on_satellite_cb(num_svs : 7
   used_in_fix_mask : 0x)
   08-12 10:54:13.951 D/GpsLocationProvider( 2479): send an intent to
   notify that the GPS is no longer receiving fixes
   08-12 10:54:14.936 I/GpsLocationProvider( 2479): requestRefLocation:
   gsm_cell = [11940,156182206]
   08-12 10:54:14.940 I/GpsLocationProvider( 2479): requestRefLocation:
   mcc = 310 mnc = 410
   08-12 

[android-developers] Re: newbie: onLocationChanged invoked even in sleep mode

2011-08-12 Thread Marcus
According to the phone task manager there are no more processes
running. Only the system services are running.


On 11 Aug, 19:17, TreKing treking...@gmail.com wrote:
 On Wed, Aug 10, 2011 at 11:21 AM, Marcus marcussilf...@gmail.com wrote:
  What is going on here?

 Possibly: any of the many apps on your phone requested the device to wake,
 via an alarm for example.

 ---­--
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


Re: [android-developers] Re: newbie: onLocationChanged invoked even in sleep mode

2011-08-12 Thread TreKing
On Fri, Aug 12, 2011 at 11:44 AM, Marcus marcussilf...@gmail.com wrote:

 According to the phone task manager there are no more processes running.
 Only the system services are running.


Have you waded through the full log to see what else is happening around
that time? I'd hope the device waking / sleeping would be something that
gets logged.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: newbie: onLocationChanged invoked even in sleep mode

2011-08-12 Thread Mark Murphy
On Fri, Aug 12, 2011 at 12:44 PM, Marcus marcussilf...@gmail.com wrote:
 According to the phone task manager there are no more processes
 running. Only the system services are running.

Some of those may wake up the phone.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] Need ideas on encrypting h.264 videos on Android

2011-08-12 Thread Peter Taps
These are local files but stored in an encrypted format. The clients obtain
the videos via physical means (not download).

The encryption/decryption itself is not an issue. The problem is how to let
MediaPlayer or VideoView deal with on-the-fly decryption. One way would be
to implement a local RTSP server as I suggested.

Regards,
Peter

On Fri, Aug 12, 2011 at 3:28 AM, Sumedh Jiwane sumed...@gmail.com wrote:

 actually not sure what do you want to do. can you be elaborate more. Do you
 want to play local file or remote file. Do you want to stream or download
 and play?


 On Fri, Aug 12, 2011 at 8:28 AM, Peter Taps ptr...@gmail.com wrote:

 Folks,

 Our application requires that a H.264 video be kept on the disk in an
 encrypted format. One should be able to play this video only through our
 application.

 I am seeking ideas on the best way to achieve this.

 I looked at VideoView class. Looks like it can only take a file, HTTP or
 RTSP uri. One thought I had was to implement a RTSP server on the device as
 part of our application but that may be an overkill.

 I would appreciate your thought..

 Thank you in advance for your help.

 Best regards,
 Peter

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


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

-- 
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] Activity Lifecycle question

2011-08-12 Thread hectordu...@yahoo.com
Hi guys,
My app has two activities with a parcelable object going forward and
back between them, which works fine. The problem comes when user goes
back (from activity 2 to main activity) by using the hardware
keyboard. In that moment the method onStop suppose to be called and
the activity must launch an intent in order  to save results into the
main activity, which doens not work :-(

I wonder what i am  doing wrong? ... i also tried onDestroy without
sucess.

thanks for help

hector

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


Re: [android-developers] Activity Lifecycle question

2011-08-12 Thread Mark Murphy
On Fri, Aug 12, 2011 at 1:02 PM, hectordu...@yahoo.com
hectordu...@yahoo.com wrote:
 Hi guys,
 My app has two activities with a parcelable object going forward and
 back between them, which works fine. The problem comes when user goes
 back (from activity 2 to main activity) by using the hardware
 keyboard. In that moment the method onStop suppose to be called and
 the activity must launch an intent in order  to save results into the
 main activity, which doens not work :-(

 I wonder what i am  doing wrong? ...

Activity 2 should not launch an intent in order to save results into
the main activity.

If Activity 2 feels a bit like a dialog box (e.g., Please pick
something out of this list), have Activity 1 use
startActivityForResult() to start up Activity 2, with Activity 2
sending the result back via setResult(), followed by finish().

If Activity 2 is just some other activity (e.g., Please edit the
thing you picked in Activity 1), then Activity 1 and Activity 2
should be sharing a real data model (database, content provider,
etc.).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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: Activity Lifecycle question

2011-08-12 Thread hectordu...@yahoo.com
have Activity 1 use
startActivityForResult() to start up Activity 2, with Activity 2
sending the result back via setResult(), followed by finish(). 

ok, thats exactly what the activities do; but the result back doesnt
work when the hardware keyboarb (back) is used.

What actvity 2 does is:

public void goBack(){

rit = new Intent();

rit.putExtra(updatedYellowR, yellowR);
rit.putExtra(updatedBlueR, blueR);
rit.putExtra(updatedRedR, redR);

setResult(RESULT_OK, rit);

finish();
}//goBack

yelllowR, blueR and redR are instances of the same class ...
objects

On Aug 12, 12:05 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Aug 12, 2011 at 1:02 PM, hectordu...@yahoo.com

 hectordu...@yahoo.com wrote:
  Hi guys,
  My app has two activities with a parcelable object going forward and
  back between them, which works fine. The problem comes when user goes
  back (from activity 2 to main activity) by using the hardware
  keyboard. In that moment the method onStop suppose to be called and
  the activity must launch an intent in order  to save results into the
  main activity, which doens not work :-(

  I wonder what i am  doing wrong? ...

 Activity 2 should not launch an intent in order to save results into
 the main activity.

 If Activity 2 feels a bit like a dialog box (e.g., Please pick
 something out of this list), have Activity 1 use
 startActivityForResult() to start up Activity 2, with Activity 2
 sending the result back via setResult(), followed by finish().

 If Activity 2 is just some other activity (e.g., Please edit the
 thing you picked in Activity 1), then Activity 1 and Activity 2
 should be sharing a real data model (database, content provider,
 etc.).

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android Training...At Your Office:http://commonsware.com/training

-- 
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 close entire app?

2011-08-12 Thread Kevin TeslaCoil Software
 So, if this were a Web app, you would attempt to reboot the user's PC
 to prevent them from pressing the BACK button in their Web browser?

That is exactly how I handle my web apps! So can you send me reboot
code for the onBackPressed()? It is urgent.




:)

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


Re: [android-developers] Re: How to close entire app?

2011-08-12 Thread TreKing
On Fri, Aug 12, 2011 at 12:18 PM, Kevin TeslaCoil Software 
ke...@teslacoilsw.com wrote:

  So, if this were a Web app, you would attempt to reboot the user's PC
  to prevent them from pressing the BACK button in their Web browser?

 That is exactly how I handle my web apps! So can you send me reboot
 code for the onBackPressed()? It is urgent.


You forgot to say plz.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: Activity Lifecycle question

2011-08-12 Thread Mark Murphy
On Fri, Aug 12, 2011 at 1:16 PM, hectordu...@yahoo.com
hectordu...@yahoo.com wrote:
 have Activity 1 use
 startActivityForResult() to start up Activity 2, with Activity 2
 sending the result back via setResult(), followed by finish(). 

 ok, thats exactly what the activities do; but the result back doesnt
 work when the hardware keyboarb (back) is used.

It's not supposed to. If they press BACK, that means they are not
choosing something.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] Re: How to close entire app?

2011-08-12 Thread Mark Murphy
On Fri, Aug 12, 2011 at 1:18 PM, Kevin TeslaCoil Software
ke...@teslacoilsw.com wrote:
 So, if this were a Web app, you would attempt to reboot the user's PC
 to prevent them from pressing the BACK button in their Web browser?

 That is exactly how I handle my web apps!

So *you're* the $##%)#$(@ guy who keeps %$#)%$(# rebooting my machine!

:: ominously presses large red button ::

 So can you send me reboot
 code for the onBackPressed()? It is urgent.

Um, sure! That code is, er, on its way right now! It's being delivered
air mail, so, um, watch the skies and keep an eye out for it! It'll be
packaged in a long silver tube with tail fins and a contrail.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] How safe to store database in sqlite?

2011-08-12 Thread Chris


On Friday, August 12, 2011 11:49:20 AM UTC-4, Kristopher Micinski wrote:

 http://developer.android.com/guide/topics/data/data-storage.html#db?



Your link doesn't really go into any details about the security and 
integrity of using the database to store sensitive data.

Anyway, they're not all that secure.  Assume anyone with a rooted phone has 
unfettered access to read from  write to your database unless you take 
other steps to ensure data integrity.

-- 
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] Canvas.drawBitmap() different in API 7 vs API 8?

2011-08-12 Thread hacksoft
Hi,

I'm trying to implement pan and zoom across a bitmap and I'm using
Canvas.drawBitmap(bitmap, src, dest, paint) where dest is the
rectangle of the Android device screen.

The difference in implementation I'm seeing is that I can set a src
Rect with negative coordinates and drawBitmap() will return empty
space in API 8.  In a sense this means I'm scaling and translating
from a larger, virtual bitmap (which is what I want).  This helps me
implement panning, for instance if I want to display one edge of the
bitmap in the center of the dest (screen) as a result of the user
panning it there.

However in API 7 my src rect seems clipped to the actual bitmap
boundary and the negative Rect coordinates are ignored.

Any thoughts or comments on how Canvas.drawBitmap() differs under
different API levels or devices?  If I want to pan across a bitmap,
but show the boundary to the user, what would be a good implementation
strategy?

Thanks!

John Roberts

-- 
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 safe to store database in sqlite?

2011-08-12 Thread Kamil
So, if you connect to database you can edit its records. AFAIK SQLite
doesn't have any password set. Connecting to database gives you all
permissions to whole database.

On 12 Sie, 17:39, ndiiie 90 rnd...@gmail.com wrote:
 Hi guys,

 I wonder how safe to store sensitive data in sqlite in Android?

 Because i've researched that rooted Android phone can access the database.
 But can the database to be edited? or view only?

 Thanks,

 Rendy

-- 
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: Save data in file or db

2011-08-12 Thread Kamil
You should definitely use SharedPreferences. It's easy to save/read
data from prefs. Moreover, everything you save into SharedPreferences
will be stored in XML file placed in application directory, so you can
easy check saved value.

On 12 Sie, 12:17, Kristoffer kris.isak.v...@gmail.com wrote:
 Thanks for the answer.

 I need to save the value from sessions to sessions to i need to save
 it.
 so you think that i should go with SharedPreferences instead?

 On 12 Aug, 11:26, Appaholics raghavs...@appaholics.in wrote:







  If you need it only once per run and can afford to throw it away and start
  again from next time then simply increment a variable. Otherwise for
  something like this SharedPreferences would do as well.

  Thanks

  On Fri, Aug 12, 2011 at 2:53 PM, Kristoffer kris.isak.v...@gmail.comwrote:

   Hello.

   This is my first app made in eclipse (have worked with app inventor)

   This is a simple app where i have two buttons and a textview.

   one button will increase 1 to the number that shows in the textview
   and the other button will decrease with 1.

   So the question is whats the best way to handle the number that shows
   in the textView field?

   Is it over kill to use sqlite for this?
   should i save it in i file?

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

  --
  
  Raghav Sood
  CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
  required to have complete 
  control)http://www.raghavsood.com/https://market.android.com/developer?pub=Ap...

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


Re: [android-developers] How safe to store database in sqlite?

2011-08-12 Thread Kristopher Micinski
On Fri, Aug 12, 2011 at 1:55 PM, Chris crehb...@gmail.com wrote:



 On Friday, August 12, 2011 11:49:20 AM UTC-4, Kristopher Micinski wrote:

 http://developer.android.com/**guide/topics/data/data-**storage.html#dbhttp://developer.android.com/guide/topics/data/data-storage.html#db
 ?



 Your link doesn't really go into any details about the security and
 integrity of using the database to store sensitive data.

 Anyway, they're not all that secure.  Assume anyone with a rooted phone has
 unfettered access to read from  write to your database unless you take
 other steps to ensure data integrity.


http://stackoverflow.com/questions/2203987/android-database-encryption?

-- 
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] Saving file causes exception

2011-08-12 Thread Mark Ayers
I'm working on a drawing app, and the code for my file saving routine goes
like this:

case SAVE_MENU_ID:
Config config = Config.ARGB_;
 Bitmap mBitmap = Bitmap.createBitmap(mDrawingPanel.getWidth(),
mDrawingPanel.getHeight(), config);
Canvas canvas = new Canvas(mBitmap);
 mDrawingPanel.draw(canvas);
Handler saveHandler = new Handler(){
@Override
 public void handleMessage(Message msg) {
final AlertDialog alertDialog = new AlertDialog.Builder(_panel).create();
 alertDialog.setTitle(Saved 1);
alertDialog.setMessage(Your drawing had been saved :));
 alertDialog.setButton(OK, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
 return;
}
});
 alertDialog.show();
}
} ;

new ExportBitmapToFile(_panel, saveHandler, mBitmap).execute(null);
return true;
 }



The ExportBitmapToFile class is as follows:

private class ExportBitmapToFile extends AsyncTaskIntent,Void,Boolean {
 private Context mContext;
private Handler mHandler;
private Bitmap nBitmap;

public ExportBitmapToFile(Context context,Handler handler,Bitmap bitmap) {
mContext = context;
 nBitmap = bitmap;
mHandler = handler;
}

@Override
protected Boolean doInBackground(Intent... arg0) {
 try {
if (!APP_FILE_PATH.exists()) {
APP_FILE_PATH.mkdirs();
 }

final FileOutputStream out = new FileOutputStream(new File(APP_FILE_PATH +
/myAwesomeDrawing.png));
 nBitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
out.flush();
 out.close();
return true;
}catch (Exception e) {
 e.printStackTrace();
}
Toast.makeText(_panel, Success!, 5);
 return false;
}


@Override
 protected void onPostExecute(Boolean bool) {
super.onPostExecute(bool);
 if ( bool ){
mHandler.sendEmptyMessage(1);
}
 }
}

The logcat is attached.

-- 
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=en08-12 11:42:20.880: ERROR/AndroidRuntime(12793): FATAL EXCEPTION: AsyncTask #1
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): java.lang.RuntimeException: An 
error occured while executing doInBackground()
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
android.os.AsyncTask$3.done(AsyncTask.java:266)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
java.util.concurrent.FutureTask.setException(FutureTask.java:124)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
java.util.concurrent.FutureTask.run(FutureTask.java:137)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
java.lang.Thread.run(Thread.java:1020)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): Caused by: 
java.lang.RuntimeException: Can't create handler inside thread that has not 
called Looper.prepare()
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
android.os.Handler.init(Handler.java:121)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
android.widget.Toast$TN.init(Toast.java:310)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
android.widget.Toast.init(Toast.java:84)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
android.widget.Toast.makeText(Toast.java:226)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
com.appineering.android.drawingpad.DrawActivity$ExportBitmapToFile.doInBackground(DrawActivity.java:236)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
com.appineering.android.drawingpad.DrawActivity$ExportBitmapToFile.doInBackground(DrawActivity.java:1)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
android.os.AsyncTask$2.call(AsyncTask.java:252)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
08-12 11:42:20.880: ERROR/AndroidRuntime(12793): ... 4 more
08-12 11:42:20.900: WARN/ActivityManager(140):   Force finishing activity 
com.appineering.android.drawingpad/.DrawActivity


Re: [android-developers] Saving file causes exception

2011-08-12 Thread Mark Murphy
You cannot affect the UI from doInBackground(). As the stack trace
illustrates, this includes showing Toasts. Please move your Toast to
onPostExecute().

On Fri, Aug 12, 2011 at 2:51 PM, Mark Ayers markthe...@gmail.com wrote:
 I'm working on a drawing app, and the code for my file saving routine goes
 like this:
 case SAVE_MENU_ID:
 Config config = Config.ARGB_;
 Bitmap mBitmap = Bitmap.createBitmap(mDrawingPanel.getWidth(),
 mDrawingPanel.getHeight(), config);
 Canvas canvas = new Canvas(mBitmap);
 mDrawingPanel.draw(canvas);
 Handler saveHandler = new Handler(){
 @Override
 public void handleMessage(Message msg) {
 final AlertDialog alertDialog = new AlertDialog.Builder(_panel).create();
 alertDialog.setTitle(Saved 1);
 alertDialog.setMessage(Your drawing had been saved :));
 alertDialog.setButton(OK, new DialogInterface.OnClickListener() {
 public void onClick(DialogInterface dialog, int which) {
 return;
 }
 });
 alertDialog.show();
 }
 } ;
 new ExportBitmapToFile(_panel, saveHandler, mBitmap).execute(null);
 return true;
 }


 The ExportBitmapToFile class is as follows:
 private class ExportBitmapToFile extends AsyncTaskIntent,Void,Boolean {
 private Context mContext;
 private Handler mHandler;
 private Bitmap nBitmap;
 public ExportBitmapToFile(Context context,Handler handler,Bitmap bitmap) {
 mContext = context;
 nBitmap = bitmap;
 mHandler = handler;
 }
 @Override
 protected Boolean doInBackground(Intent... arg0) {
 try {
 if (!APP_FILE_PATH.exists()) {
 APP_FILE_PATH.mkdirs();
 }
 final FileOutputStream out = new FileOutputStream(new File(APP_FILE_PATH +
 /myAwesomeDrawing.png));
 nBitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
 out.flush();
 out.close();
 return true;
 }catch (Exception e) {
 e.printStackTrace();
 }
 Toast.makeText(_panel, Success!, 5);
 return false;
 }

 @Override
 protected void onPostExecute(Boolean bool) {
 super.onPostExecute(bool);
 if ( bool ){
 mHandler.sendEmptyMessage(1);
 }
 }
 }
 The logcat is attached.

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



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] Android CL and onRetainNonConfigurationInstance

2011-08-12 Thread Ian
Mark,

On Tuesday, July 19, 2011 7:45:43 AM UTC-5, Mark Murphy (a Commons Guy) 
wrote:

 On Tue, Jul 19, 2011 at 5:32 AM, Zsolt Vasvari zvas...@gmail.com wrote:

  If so,
  what can I do when I have some objects I need to retain, but I cannot
  save them to the activity state?  In particular, I have running tasks
  I need to connect my activities to.

 If the running tasks or other objects more properly belong to a
 fragment, have the fragment manage them and use setRetainInstance() to
 keep those fragment instances between configuration changes.

 Otherwise, I think the expectation is that you create a no-UI fragment
 that manages those objects, which is part of your activity and on
 which you use setRetainInstance().

When you say create a no-UI fragment, do you mean that there needs to be a 
fragment/ element in my layout with the name of a no-UI fragment? Can I 
create it in my FragmentActivity's onCreate()? If so, what do I add it to to 
keep it from getting garbage collected outside of the onCreate()?

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

Re: [android-developers] Saving file causes exception

2011-08-12 Thread Appaholics
Hey Mark (the first one),

Forgot to tell you. I fixed this problem (sort of). I got the force close to
go away but the file doesn't save.

case SAVE_MENU_ID:

mBitmap = Bitmap.createBitmap(mDrawingPanel.getWidth(),
mDrawingPanel.getHeight(), Bitmap.Config.ARGB_);

canvas = new Canvas(mBitmap);

mDrawingPanel.draw(canvas);

saveHandler = new Handler(){

@Override

public void handleMessage(Message msg) {

final AlertDialog alertDialog = new AlertDialog.Builder(_panel).create();

alertDialog.setTitle(Saved 1);

alertDialog.setMessage(Your drawing had been saved :));

alertDialog.setButton(OK, new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int which) {

return;

}

});

alertDialog.show();

}

} ;


 new ExportBitmapToFile(_panel, saveHandler, mBitmap);

return true;

}

return super.onOptionsItemSelected(item);

}

private class ExportBitmapToFile extends AsyncTaskIntent,Void,Boolean {

private Context mContext;

private Handler mHandler;

private Bitmap nBitmap;

private File APP_FILE_PATH = new
File(Environment.getExternalStorageDirectory().toString() + /DrawingPad);


 public ExportBitmapToFile(Context context,Handler handler,Bitmap bitmap) {

mContext = context;

nBitmap = bitmap;

mHandler = handler;

}


 @Override

protected Boolean doInBackground(Intent... arg0) {

try {

if (!APP_FILE_PATH.exists()) {

APP_FILE_PATH.mkdirs();

}


 out = new FileOutputStream(new File(APP_FILE_PATH +
/myAwesomeDrawing.png));

nBitmap.compress(Bitmap.CompressFormat.PNG, 100, out);

out.flush();

out.close();

return true;

}catch (Exception e) {

e.printStackTrace();

}

//mHandler.post(completeRunnable);

return false;

}


And the top of the class needs to be:


public class DrawActivity extends  Activity implements
UberColorPickerDialog.OnColorChangedListener {

private Paint mPaint;

private Context _panel = this;

private int mColor = Color.BLUE;

private DrawingPanel mDrawingPanel;

Bitmap mBitmap;

Config config;

Canvas canvas;

FileOutputStream out;

Handler saveHandler;


See if you can get the file to save.


On Sat, Aug 13, 2011 at 12:25 AM, Mark Murphy mmur...@commonsware.comwrote:

 You cannot affect the UI from doInBackground(). As the stack trace
 illustrates, this includes showing Toasts. Please move your Toast to
 onPostExecute().

 On Fri, Aug 12, 2011 at 2:51 PM, Mark Ayers markthe...@gmail.com wrote:
  I'm working on a drawing app, and the code for my file saving routine
 goes
  like this:
  case SAVE_MENU_ID:
  Config config = Config.ARGB_;
  Bitmap mBitmap = Bitmap.createBitmap(mDrawingPanel.getWidth(),
  mDrawingPanel.getHeight(), config);
  Canvas canvas = new Canvas(mBitmap);
  mDrawingPanel.draw(canvas);
  Handler saveHandler = new Handler(){
  @Override
  public void handleMessage(Message msg) {
  final AlertDialog alertDialog = new AlertDialog.Builder(_panel).create();
  alertDialog.setTitle(Saved 1);
  alertDialog.setMessage(Your drawing had been saved :));
  alertDialog.setButton(OK, new DialogInterface.OnClickListener() {
  public void onClick(DialogInterface dialog, int which) {
  return;
  }
  });
  alertDialog.show();
  }
  } ;
  new ExportBitmapToFile(_panel, saveHandler, mBitmap).execute(null);
  return true;
  }
 
 
  The ExportBitmapToFile class is as follows:
  private class ExportBitmapToFile extends AsyncTaskIntent,Void,Boolean {
  private Context mContext;
  private Handler mHandler;
  private Bitmap nBitmap;
  public ExportBitmapToFile(Context context,Handler handler,Bitmap bitmap)
 {
  mContext = context;
  nBitmap = bitmap;
  mHandler = handler;
  }
  @Override
  protected Boolean doInBackground(Intent... arg0) {
  try {
  if (!APP_FILE_PATH.exists()) {
  APP_FILE_PATH.mkdirs();
  }
  final FileOutputStream out = new FileOutputStream(new File(APP_FILE_PATH
 +
  /myAwesomeDrawing.png));
  nBitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
  out.flush();
  out.close();
  return true;
  }catch (Exception e) {
  e.printStackTrace();
  }
  Toast.makeText(_panel, Success!, 5);
  return false;
  }
 
  @Override
  protected void onPostExecute(Boolean bool) {
  super.onPostExecute(bool);
  if ( bool ){
  mHandler.sendEmptyMessage(1);
  }
  }
  }
  The logcat is attached.
 
  --
  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



 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 Android Training...At Your Office: http://commonsware.com/training

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 

Re: [android-developers] Android CL and onRetainNonConfigurationInstance

2011-08-12 Thread Mark Murphy
On Fri, Aug 12, 2011 at 2:57 PM, Ian ian.d...@gmail.com wrote:
 When you say create a no-UI fragment

I haven't tried this technique, personally. My state tends to be bound
up in fragments that need an actual UI, or is part of a data model
that isn't instance state. Hence, take my advice here with a
decent-sized grain of salt (or salt substitute, if you are on a
low-sodium diet).

 do you mean that there needs to be a
 fragment/ element in my layout with the name of a no-UI fragment?

That's one possibility.

 Can I create it in my FragmentActivity's onCreate()?

That's another possibility.

 If so, what do I add it to to
 keep it from getting garbage collected outside of the onCreate()?

Well, in either case (fragment or a FragmentTransaction in
onCreate()), you would call setRetainInstance(true) on the fragment
itself. This tells Android to hold onto that fragment instance across
configuration changes.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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: Activity Lifecycle question

2011-08-12 Thread hectordu...@yahoo.com
:-(

so, if the user press back, the method setResult(RESULT_OK, rit),
called from onStop() ... does not work?

On Aug 12, 12:35 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Aug 12, 2011 at 1:16 PM, hectordu...@yahoo.com

 hectordu...@yahoo.com wrote:
  have Activity 1 use
  startActivityForResult() to start up Activity 2, with Activity 2
  sending the result back via setResult(), followed by finish(). 

  ok, thats exactly what the activities do; but the result back doesnt
  work when the hardware keyboarb (back) is used.

 It's not supposed to. If they press BACK, that means they are not
 choosing something.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android Training...At Your Office:http://commonsware.com/training

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


Re: [android-developers] Re: Activity Lifecycle question

2011-08-12 Thread Kostya Vasilyev
Try calling setResult from onPause - I believe onStop is too late, due
to how Start/Stop/Pause/Resume are intermingled.

2011/8/12 hectordu...@yahoo.com hectordu...@yahoo.com:
 :-(

 so, if the user press back, the method setResult(RESULT_OK, rit),
 called from onStop() ... does not work?

 On Aug 12, 12:35 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Aug 12, 2011 at 1:16 PM, hectordu...@yahoo.com

 hectordu...@yahoo.com wrote:
  have Activity 1 use
  startActivityForResult() to start up Activity 2, with Activity 2
  sending the result back via setResult(), followed by finish(). 

  ok, thats exactly what the activities do; but the result back doesnt
  work when the hardware keyboarb (back) is used.

 It's not supposed to. If they press BACK, that means they are not
 choosing something.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android Training...At Your Office:http://commonsware.com/training

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

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


Re: [android-developers] Re: Activity Lifecycle question

2011-08-12 Thread TreKing
On Fri, Aug 12, 2011 at 2:12 PM, hectordu...@yahoo.com 
hectordu...@yahoo.com wrote:

 so, if the user press back, the method setResult(RESULT_OK, rit), called
 from onStop() ... does not work?


Yes it does. More than likely you are handling onActivityResult incorrectly.
Are you specifically checking for RESULT_OK? If so, then that's your
problem. On back press, you will get RESULT_CANCELED instead.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: Activity Lifecycle question

2011-08-12 Thread Mark Murphy
On Fri, Aug 12, 2011 at 3:17 PM, Kostya Vasilyev kmans...@gmail.com wrote:
 Try calling setResult from onPause - I believe onStop is too late, due
 to how Start/Stop/Pause/Resume are intermingled.

Last I checked, even onPause() is too late.

Hector:

The idea is that you call setResult() when the user makes a choice
(e.g., from onListItemClick() of a ListActivity). The BACK button is
effectively like hitting Esc on a desktop dialog box, indicating
that you didn't really want to make that choice in the first place. As
TreKing notes in his reply he sent while I was typing this,
onActivityResult() is called with RESULT_CANCELED, so you can detect
this case.

Any activity started via startActivityForResult() must be designed to
allow users to say sorry, never mind. In fact, pretty much
everything in Android needs to support sorry, never mind.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] Service Discovery is not happening when screen is off

2011-08-12 Thread Irfan Sheriff
If it is related to multicast packets getting dropped, try creating a multicast
lockhttp://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html

If needed, use the WIFI_MODE_FULL_HIGH_PERF mode with care to avoid
driver optimizations at screen off.

Thanks
On Fri, Aug 12, 2011 at 3:56 AM, SREEHARI harisre...@gmail.com wrote:

 Hi,

 My application runs a service which can announce the Upnp discovery
 through Wifi. The device is getting discovered in Cling work bench.
 But when the screen is off, the device is not getting discovered. I
 tried Wakelock and Wifilock, but still its not working. I changed the
 sleep policy in Wifi settings also.

 I tried this application in 3 phones. In Samsung galaxy fit with
 Android 2.2, it works fine. In screen off mode also the device is
 getting discovered. in Nexus S and HTC wildfire S with Android 2.3.3
 its not happening. Is this the problem with Wifi state change or
 something else?? Please help me on this.

 Thanks in advance,
 Sreehari

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

-- 
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] xml layout error.

2011-08-12 Thread Goutom
Hi

I have a layout xml file.When I call setContentView(R.layout.xmlname), it
crashes.Logcat shows nothing.

--
?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent android:layout_height=fill_parent
android:fitsSystemWindows=true android:layout_weight=1
android:orientation=vertical

RelativeLayout android:layout_width=fill_parent
android:layout_height=wrap_content android:background=#b4b4b4
android:gravity = center_horizontal

LinearLayout android:orientation=vertical
android:layout_alignParentLeft=true
android:paddingLeft=5dip

TextView android:id=@+id/pio_navi_org_name
android:layout_width=fill_parent android:layout_height=wrap_content
android:textSize=20sp android:textStyle=bold
android:textColor=#00 /

TextView android:id=@+id/pio_navi_org_add
android:layout_width=fill_parent android:layout_height=wrap_content
android:textSize=15sp android:textStyle=bold
android:textColor=#00 /

TextView android:id=@+id/pio_navi_org_website
android:layout_width=fill_parent android:layout_height=wrap_content
android:textSize=15sp android:textStyle=bold
android:textColor=#00 /

/LinearLayout

ImageView
android:layout_alignParentRight=true
android:layout_width=43dip android:layout_height=43dip
android:scaleType=fitXY android:src=@drawable/orgpeople
/ImageView

/RelativeLayout
ListView android:id=@+id/peopleinorglist
android:layout_width=fill_parent
android:layout_height=fill_parent
android:dividerHeight=1dip
android:paddingBottom=1dip
/ListView

/LinearLayout



what to do?
Thanks in advance.

Regards
RiskyCoder

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

Re: [android-developers] xml layout error.

2011-08-12 Thread TreKing
On Fri, Aug 12, 2011 at 3:10 PM, Goutom goutom.sust@gmail.com wrote:

 what to do?


Reinstall Eclipse and the SDK - because if LogCat shows *NOTHING*, you have
a serious problem.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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: Force Close Issue

2011-08-12 Thread Indicator Veritatis
And why can't he debug it while moving? He can run the SDK on a laptop
and carry it with him connected to the phone while he moves both
together.

On Aug 11, 10:13 pm, Sumedh Jiwane sumed...@gmail.com wrote:
 The log is generally what you what you seen in logcat console while
 debugging. But here is the catch since it happens when you are moving and
 you can't debug at that time, you can you Logger application available from
 market. It requires SD/micro SD card to save the logs. You can also choose
 to email if you have synched the account.On Fri, Aug 12, 2011 at 10:10 AM, 
 Spica spicaneb...@gmail.com wrote:
  This my first android application so i am not sure what log i need to
  attach...

  On Aug 12, 12:21 am, Nick Risaro nris...@gmail.com wrote:
   That's so sad :(

   Maybe if you attach some logs we can help you and stop being sad.

   On Fri, Aug 12, 2011 at 1:15 AM, Spica spicaneb...@gmail.com wrote:
I am developing location based application which uses phone's gps. It
works fine on my android device when i am not moving but as soon as i
start moving my application either freezes or error out with option of
Force close. This application is also consuming web service to send
location to the server.

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

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

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


  1   2   >