[android-developers] Re: How to create a sms database table to store inbox messages in Android

2012-02-02 Thread Nitin Sethi
AFAIK, the sqlite sms db has already been created by your stock sms
app
and it's recommended to use the same through the ContentResolver class
for any SMS related app.

On Feb 2, 10:52 am, Ratheesh Valamchuzhy android...@gmail.com wrote:
 you need to store the the message in sqlite db ?
 use the content resolver to get the message details and we can store it on
 a text file or a separate database

-- 
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: Re : SMS application

2012-02-02 Thread Manuel R. Ciosici
You can actually send SMSes without putting in the SMSC. The phone
picks it up from the SIM card.

Manuel

On 2 Feb., 07:07, vivek elangovan elangovan.vi...@gmail.com wrote:
 Hi members,
                       I m developing one application to send SMS,here
 i used sendSMS() function and SmsManager class and it is working fine
 for sending messages between two emulators.I need to send msgs to real
 phones for that i have to mention some SMS gateway.So in SmsManager
 class where i can specify the gateway address and their corresponding
 username and password.

-- 
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] inserting audio clip in another audio file

2012-02-02 Thread Raneez
I have two recorded audio files record1 and record2.
I want to insert the record2 file at a position from where i
pause while playing record1.
for example record1 plays  ONE THREE 
record2 plays  TWO 
so after insertion the record1 should play like  ONE TWO
THREE 
PLS HELP.

-- 
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] H0w to convert monthname to month number

2012-02-02 Thread arun kumar
 I have to convert month name in to month number
(JAN=1,FEB=2,MARCH=3

String month = getIntent().getStringExtra(MONTH);

*

int* x =Integer.parseInt(month);

*if* (month.equals(JAN)) {

*x* = 1;

}

*else* *if* (month.equals(FEB)) {

*x* = 2;

}

*else* *if* (month.equals(MARCH)) {

*x* = 3;

} *else* *if* (month.equals(APRIL)) {

*x* = 4;

} *else* *if* (month.equals(MAY)) {

*x* = 5;.

if i do like this am getting fata close exception...

-- 
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: What do these errors mean (using Eclipse)?

2012-02-02 Thread atcal


On Feb 1, 6:46 pm, Ted Scott t...@hootinholler.com wrote:
 On 2/1/2012 11:01 AM, atcal wrote:



  On Feb 1, 4:25 pm, Ted Scottt...@hootinholler.com  wrote:
  On 2/1/2012 4:11 AM, atcal wrote:

  I'm trying to define my own View subclass.
  public class myView extends View {
        myView(Context context) {
            View(context);
        }
  }
  Eclipse flags the first line of my constructor with an error Implicit
  super conctructor View() is undefined. Must explicitly invoke another
  constructor and the second line is flagged with the error The method
  View(Context context) is undefined for the type myView.
  What does all this mean? The android documentation shows the
  constructor View(Context context) as public. Why can't I use it?
  There are several reasons why View() is not available and will never be
  available.

  It means you don't understand class instantiation and the life cycle of
  a class. This is not an Android issue at all and I suggest that you
  spend some time learning Java fundamentals. These folks are generally
  pretty helpful with thathttp://www.javaranch.com/-Hide quoted text -

  - Show quoted text -
  Ted,

  Thanks. You are probably right. While I have 10 yrs experience of C++
  with Windows and Java looks deceptively similar, things like this are
  tripping me up. I do understand about classes and instantiating
  objects but obviously not the peculiarities of Java. I've tried to
  register at javaranch but the website is not fast at sending back the
  registration activation email. I'll have to learn to be patient.

 I meant that they have tutorials and stuff. Since you have the syntax
 etc from c++ then maybe the O'Riely book Java in a Nutshell would be
 helpful. Oh, and you can forget the evil multiple inheritance and
 pointer stuff. ;)

 Probably a little tedious for you, but there is 
 this:http://docs.oracle.com/javase/tutorial/java/javaOO/index.htmlwhich
 lacks a bit of detail as to why, but does cover the how of fundamentals.- 
 Hide quoted text -

 - Show quoted text -

Tom,

I think I have to disagree with you when you say this is not an
Android issue. I've just double checked the documentation and View is
an Android class so my problems with it as an Android issue, not a
Java issue.

Can anyone answer my initial question? How do I subclass android.View?

-- 
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: What do these errors mean (using Eclipse)?

2012-02-02 Thread atcal


On Feb 1, 10:23 am, sourabh sahu souruit...@gmail.com wrote:
 I think you should write super(context)

 Sourabh



 On Wed, Feb 1, 2012 at 2:41 PM, atcal alan.williams...@ya.com wrote:
  I'm trying to define my own View subclass.

  public class myView extends View {

     myView(Context context) {
         View(context);
     }
  }

  Eclipse flags the first line of my constructor with an error Implicit
  super conctructor View() is undefined. Must explicitly invoke another
  constructor and the second line is flagged with the error The method
  View(Context context) is undefined for the type myView.

  What does all this mean? The android documentation shows the
  constructor View(Context context) as public. Why can't I use it?

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

Well, obviously I tried that but I just get the same error that there
is no implicit constructor for View.

-- 
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: What do these errors mean (using Eclipse)?

2012-02-02 Thread atcal


On Feb 1, 10:23 am, sourabh sahu souruit...@gmail.com wrote:
 I think you should write super(context)

 Sourabh



 On Wed, Feb 1, 2012 at 2:41 PM, atcal alan.williams...@ya.com wrote:
  I'm trying to define my own View subclass.

  public class myView extends View {

     myView(Context context) {
         View(context);
     }
  }

  Eclipse flags the first line of my constructor with an error Implicit
  super conctructor View() is undefined. Must explicitly invoke another
  constructor and the second line is flagged with the error The method
  View(Context context) is undefined for the type myView.

  What does all this mean? The android documentation shows the
  constructor View(Context context) as public. Why can't I use it?

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

Sourabh,

Sorry. Ignore my previous post. I was sure I'd tried that but I must
have put super(). super(context) does work. 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: H0w to convert monthname to month number

2012-02-02 Thread Oli Wright
If you're expecting a string which you're then converting to a number in 
your conditional statements, why are you initialising x with the following?

x =Integer.parseInt(month); 

-- 
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: Encoder???

2012-02-02 Thread skink
On 2 Lut, 08:32, Muhammad UMER muhammad.ume...@hotmail.com wrote:
 Hi pskink,

 I have searched the moov atoms,

 The moov atoms in
 the file (created by mediarecorder VIDEO0002.3GP) is at the end of the file 
 and ftyp at the beginning. As I attached the image VIDEO0002.png
 And the moov atoms
 in the file (created by server) is also at the end of the file along with 
 ftyp.
 As I attached the image VIDEO.png
 The 3gp file consists of ftyp-moov-mdat  or
 ftyp-mdat-moov  order.

 So I realize that my server have to write just  ftyp at
 the beginning of the file. Please correct me if I am wrong.
 Regards,
 umer

as i said before:

as you can see you have to modify first 32 bytes: where bytes
[0..27]
 you can just copy and bytes [28.. 31] should contain the offset
where
 moov atom starts

just copy first 28 bytes without any modifications and bytes [28.. 31]
should contain the offset where moov atom starts - its relative to
mdat atom e.g:

this is after modification my server_file.3gp file:

#grep -aobE ftyp|mdat|moov server_file.3gp
4:ftyp
32:mdat
324042:ftyp
324070:moov

so bytes [28.. 31]  - the relative offset should be:
324070 - 32 == 0x0004f1c6

#hexdump -C server_file.3gp | less
  001c66747970336770340300  |ftyp3gp4|
0010  336770346d703431336770360004f1c6  |3gp4mp413gp6|

see 0004f1c6 at the end - its your offset

pskink

-- 
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: WebView problem with youtube video

2012-02-02 Thread John Purcell
Danielle,

If you look at the src (android-3.2.2_r2 is what I'm looking at), it's
crashing in the custom view. Unless you've implemented the code I
mentioned before, this will be the case.

John

On Jan 31, 3:42 pm, drenda daniele.re...@gmail.com wrote:
 Hi John,
 thanks for your replay.
 I'm usign Honeycomb on a tablet.
 Unfortunally the order of the loading url don't resolve the problem.
 I'm try with this code:

 setContentView(R.layout.video);
 final WebView webView = (WebView) findViewById(R.id.video_webview);
 webView.getSettings().setJavaScriptEnabled(true);
 webView.getSettings().setPluginsEnabled(true);
 webView.loadUrl(getString(R.string.urlYouTube));

 You can test this simple code with some video on youtube and you
 realize that you can see the preview image of the video but when you
 click on play button the video don't start!! Moreover if you click on
 maximise icon of the video the application crash as you can see here:

 01-31 20:41:24.778: E/AndroidRuntime(399): FATAL EXCEPTION: main
 01-31 20:41:24.778: E/AndroidRuntime(399):
 java.lang.NullPointerException
 01-31 20:41:24.778: E/AndroidRuntime(399):      at
 android.webkit.HTML5VideoFullScreen.enterFullScreenVideoState(HTML5VideoFul 
 lScreen.java:
 253)
 01-31 20:41:24.778: E/AndroidRuntime(399):      at
 android.webkit.HTML5VideoViewProxy
 $VideoPlayer.enterFullScreenVideo(HTML5VideoViewProxy.java:161)
 01-31 20:41:24.778: E/AndroidRuntime(399):      at
 android.webkit.HTML5VideoViewProxy.enterFullScreenVideo(HTML5VideoViewProxy 
 .java:
 667)
 01-31 20:41:24.778: E/AndroidRuntime(399):      at android.webkit.WebView
 $PrivateHandler.handleMessage(WebView.java:8017)
 01-31 20:41:24.778: E/AndroidRuntime(399):      at
 android.os.Handler.dispatchMessage(Handler.java:99)
 01-31 20:41:24.778: E/AndroidRuntime(399):      at
 android.os.Looper.loop(Looper.java:132)
 01-31 20:41:24.778: E/AndroidRuntime(399):      at
 android.app.ActivityThread.main(ActivityThread.java:4123)
 01-31 20:41:24.778: E/AndroidRuntime(399):      at
 java.lang.reflect.Method.invokeNative(Native Method)
 01-31 20:41:24.778: E/AndroidRuntime(399):      at
 java.lang.reflect.Method.invoke(Method.java:491)
 01-31 20:41:24.778: E/AndroidRuntime(399):      at
 com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:841)
 01-31 20:41:24.778: E/AndroidRuntime(399):      at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
 01-31 20:41:24.778: E/AndroidRuntime(399):      at
 dalvik.system.NativeStart.main(Native Method)

 Thanks very much

 Best regards

 Daniele

 On Jan 31, 1:02 pm, John Purcell jsp...@gmail.com wrote:







  In general, the loading of the URL should come last (right now you've
  got plugins and Javascript enabled messages being sent to the webcore
  after you send a url request).

  Is this on Honeycomb or ICS? (I'm guessing ICS due to the 'normal'
  errors you posted above). Keep in mind that video needs special
  handling in older versions of android (well, in all versions 
  really).http://code.google.com/p/html5webview/willwork for 2.x, but is out
  of date for 3.x/4.x

  On Jan 30, 3:34 pm, drenda daniele.re...@gmail.com wrote:

   PLease,
   someone has some ideas?

   Thanks!

   On 29 Gen, 22:38, drenda daniele.re...@gmail.com wrote:

Hi,
i made a simple example in order to display in my app some youtube's
video of a playlist.
I created a WebView:

@Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                try {
                        setContentView(R.layout.video);

                        final WebView webView = (WebView) 
findViewById(R.id.video_webview);
                        webView.loadUrl(getString(R.string.urlYouTube));
                        
webView.getSettings().setJavaScriptEnabled(true);
                        webView.getSettings().setPluginsEnabled(true);

                } catch (Exception e) {
                        Log.e(Rubner, e.getMessage());
                        e.printStackTrace();
                }

The webview is render correctly and display the videos of playlist.
When you click on a video is displayed the page of the video with play
button  but if you click on it the video don't start!!!

Are raised these errors:

01-29 22:37:28.714: W/System.err(5963): Error reading from ./org/
apache/harmony/luni/internal/net/www/protocol/data/Handler.class
01-29 22:37:28.934: E/libEGL(5963): call to OpenGL ES API with no
current context (logged once per thread)
01-29 22:37:28.934: D/ShaderProgram(5963): couldn't load the vertex
shader!

Any ideas of the problem??

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] Re: bulk install apps via android market

2012-02-02 Thread madlymad
Thanks for answering!

checking out AppBrain App I found out that the install function also
opens Android Market App!

So the only way to work with android market is, the unfriendly one to
install 1 by 1 the apps!

If I switch to the solution of downloading apps from my server and
creating a queue of manual installing (http://stackoverflow.com/a/
4969421/944070) do you know if the user has the ability in future to
get app updates from android market service?

My server app  market app are going to be exactly the same files (key
signature  version). And also the user is prompted to enable Unknown
sources in my server install app.


On Feb 1, 4:47 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Feb 1, 2012 at 9:18 AM, TreKing treking...@gmail.com wrote:
  On Wed, Feb 1, 2012 at 6:44 AM, Mark Murphy mmur...@commonsware.com wrote:

   but
   still that is not so convenient, so I am looking if there is a way to
   check all wanted apps and then enqueue them in order to download one
   after the other (user accepting terms may also exist if you cannot
   avoid them).

  No, sorry.

  Actually, AppBrain seems capable of this - you can choose apps toinstall
  via their site and it triggers an automaticinstall(no prompt) on the
  device, just like the official Market site. I'm not seeing an option to
  queue up a bunch of apps andbulkinstall, but I don't see why it wouldn't
  be possible.

 They are exploiting security holes in the Android Market, then. This
 is not advisable.

 --
 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.4
 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: Re : SMS application

2012-02-02 Thread vivek elangovan
Hi Manuel,
thanks for ur suggestion,i already tried that one its
working fine.

Vivek

On Feb 2, 1:02 pm, Manuel R. Ciosici manuelrcios...@gmail.com
wrote:
 You can actually send SMSes without putting in the SMSC. The phone
 picks it up from the SIM card.

 Manuel

 On 2 Feb., 07:07, vivek elangovan elangovan.vi...@gmail.com wrote:

  Hi members,
                        I m developing one application to send SMS,here
  i used sendSMS() function and SmsManager class and it is working fine
  for sending messages between two emulators.I need to send msgs to real
  phones for that i have to mention some SMS gateway.So in SmsManager
  class where i can specify the gateway address and their corresponding
  username and password.

-- 
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] Any way to add online form to android app?

2012-02-02 Thread Harpreet Singh
HI, I am developing an App which is having some Online Services.
I am using soap services to use the online service in my app.


I want to know that if I click at any Icon in App, I want a to fetch
an online form from the server's database and to show it in my app and
it shud work as the way it is on browser.

Till now I am facing problem that on sending ServiceID(int), I get the
response as ResponseLoadForm(string). This string has the html code of
the Online form.
If I use Webview using onLoadData or onLoadDataBaseUrl method, I just
get the form as a static view, Its features don't work e.g. Non of the
buttons work to submit and to cancel the form.

Do I have to use something else in place of Webview?
Or I had to implement something to get the form?
Or I should create something for myself to get as response and add
that thing to Server?

By the way that server is of dotnet based website.

Thanks in advance for any ideas.
Harpreet.

-- 
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] Maps with GPS indicator in status bar..?

2012-02-02 Thread Abhilash baddam
Hi,

If we open Maps application(in built) in the device it will show the
GPS indicator on the status bar already if GPS is enabled in  the
device and If we come out from the maps application then that
indicator will dismissed from status bar.

Similarly how in my application if i am using GPS yhen i want to show
GPS indicator on the status bar and whwnever i come out from my
application i want to dismiss that indicator from staus bar. How can i
achieve this...? can anybody give me some idea to get this...

How can I display in my application that will use the GPS for
something on the status bar. For example just open up Google Maps. If
you want to know if you left the GPS activated, just slide the
notification panel and at the top you will have the toggle buttons,
one of them is the GPS.

-- 
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: Unable to execute Bluetooth HDP Demo

2012-02-02 Thread jfernandez
Hi all,

I have observed a strange and undesirable behaviour that I'm going to
describe. When an HDP channel is stablished, the Android system starts
a long proccess of freeing memory (I have lots of Logcat messages like
dalvikm - GC_CONCURRENT freed 494K ...), even in some occasions, the
system crashes and the smartphone is rebooted. I don't know if this is
a problem of my ROM/smartphone (I'm using Android 4.0.3 ICS). Does
anybody has the same problem?

Thanks and regards!

On 15 dic 2011, 18:30, jfernandez jorge.fernandez.gonza...@gmail.com
wrote:
 Hi all,

 I'm executing the BluetoothHDPDemo [1]  (offered from Android 4.0
 Ice Cream Sandwich) in my Android smartphone. When I have registered
 the application in order to receive data, and I have paired the
 biomedical device with the smartphone, I try to open the channel
 connection and I can see that the device starts sending data to the
 smartphone. However, the smartphone isunableto open the channel
 connectionHDP.

 At the end of this message you can see the output obtained in the
 LogCat.

 Has anybody achieved to run successfully this sample about the use of
 the Bluetooth Health Profile API? Any ideas?

 Thanks. Regards.

 [1]http://developer.android.com/resources/samples/BluetoothHDP/index.html

 This is the log that I obtain:

 12-15 16:40:54.048: I/BluetoothHDPService(1105): connectChannel()
 12-15 16:40:54.068: D/BluetoothService(147): CONNECTION_STATE_CHANGE:
 00:80:25:14:A1:BC: 0 - 1
 12-15 16:40:55.169: D/ConnectivityService(147):
 handleInetConditionHoldEnd: net=1, condition=0, published condition=0
 12-15 16:40:59.393: D/BluetoothEventLoop(147): Device property
 changed: 00:80:25:14:A1:BC property: Connected value: true
 12-15 16:41:00.024: D/BluetoothEventLoop(147): Health Device :
 devicePath: /org/bluez/278/hci0/dev_00_80_25_14_A1_BC:channelPath:/org/
 bluez/278/hci0/dev_00_80_25_14_A1_BC/chan3115:existstrue
 12-15 16:41:00.034: E/BluetoothService.cpp(147):
 getChannelApplicationNative
 12-15 16:41:00.044: E/bluetooth_common.cpp(147):
 dbus_func_args_timeout_valist: D-Bus error in Acquire:
 org.bluez.Error.HealthError (Cannot reconnect: MDL is not closed)
 12-15 16:41:00.044: E/BluetoothHealthProfileHandler(147): Error
 obtaining fd for channel:/org/bluez/278/hci0/dev_00_80_25_14_A1_BC/
 chan3115
 12-15 16:41:00.074: E/BluetoothService.cpp(147): destroyChannelNative
 12-15 16:41:00.074: E/BluetoothEventLoop.cpp(147):
 onHealthDeviceConnectionResult: D-Bus error:
 org.bluez.Error.HealthError (Mdl is not created)
 12-15 16:41:00.074: D/BluetoothEventLoop(147):
 onHealthDeviceConnectionResult 2 6001
 12-15 16:41:00.214: D/BluetoothEventLoop(147):
 onHealthDeviceConnectionResult 2 6000
 12-15 16:41:00.214: D/BluetoothEventLoop(147): Health Device : Name of
 Property is: MainChannel Value:/org/bluez/278/hci0/
 dev_00_80_25_14_A1_BC/chan3115

-- 
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: bulk install apps via android market

2012-02-02 Thread Kostya Vasilyev
My users have seen Market pick up updates when the app was initially 
installed without Market.


So yes, it seems possible, although I'm not sure if you can rely on this.

Things to note:

1) Both initial and Market .apks are signed with the same key
2) Same package name (obviously)
3) Same version code sequence
4) The app is free

-- K

02.02.2012 13:54, madlymad пишет:

If I switch to the solution of downloading apps from my server and
creating a queue of manual installing (http://stackoverflow.com/a/
4969421/944070) do you know if the user has the ability in future to
get app updates from android market service?


--
Kostya Vasilyev

--
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 do I analysis native crash log

2012-02-02 Thread chenyu xu
I have got a crash log, I can locate the source of call stack like
below:

01-19 17:48:56.580 I/DEBUG   (  683):  #00  pc 00011dee  /
system/lib/libc.so
01-19 17:48:56.580 I/DEBUG   (  683):  #01  pc be1c  /
system/lib/libc.so

I use addr2line to identify that it was memory operating error:

_libc_android_abort
dlfree

But I dont't know who invoke dlfree function, I can see some
informations after the keyowrd stack:

01-19 17:48:56.590 I/DEBUG   (  683): stack:
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcb0  0718
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcb4  afd1455b  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcb8  afd405a0  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcbc  afd4054c  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcc0  
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcc4  afd154e1  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcc8  0071
01-19 17:48:56.590 I/DEBUG   (  683): 100ffccc  afd1452d  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcd0  
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcd4  afd40328  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcd8  
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcdc  1728
01-19 17:48:56.590 I/DEBUG   (  683): 100ffce0  
01-19 17:48:56.590 I/DEBUG   (  683): 100ffce4  afd147cb  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffce8  df002777
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcec  e3a070ad
01-19 17:48:56.590 I/DEBUG   (  683): #00 100ffcf0  b4e8  [heap]
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcf4  c000
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcf8  afd418dc  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcfc  afd10538  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffd00  afd40328  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffd04  fbdf
01-19 17:48:56.590 I/DEBUG   (  683): 100ffd08  afd40328  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffd0c  afd41724  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffd10  b000  [heap]
01-19 17:48:56.590 I/DEBUG   (  683): 100ffd14  afd0be21  /system/
lib/libc.so
01-19 17:48:56.600 I/DEBUG   (  683): #01 100ffd18  afd40328  /system/
lib/libc.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd1c  afd0be21  /system/
lib/libc.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd20  0002
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd24  b4ee  [heap]
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd28  c574  [heap]
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd2c  b4e8  [heap]
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd30  c574  [heap]
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd34  0006
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd38  13fc
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd3c  af9059ff  /system/
lib/libcutils.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd40  b4e8  [heap]
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd44  800056b5  /system/
lib/libaugusta-ril.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd48  100ffd6c
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd4c  b438  [heap]
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd50  ae6089bc  /system/
lib/libril.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd54  afd0cd81  /system/
lib/libc.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd58  800056b5  /system/
lib/libaugusta-ril.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd5c  ae6042a3  /system/
lib/libril.so

I think it will be helpful to locate the problem, I don't know how to
use these data? Any one can tell me
how to calculate the location of call stack? Thanks very much!

-- 
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] Finishing ActivityGroup which combine Top and Bottom tabs together in same activity ??

2012-02-02 Thread Kostya Vasilyev

Perhaps it would be a better idea to use fragments instead.

02.02.2012 4:48, AndroidGirl8 пишет:


I made ActivityGroup which combined two activities one activity for
TOP tab and second one for BOTTOM tab and it works fine BUT when I
click in any activity on tab both tabs (top and bottom) still there
however this activity don't have them.

My question now how I finish this ActivityGroup how I get rid of it
when I click on any activity in this tabs i tried using finish() but i
throws exception . may be this a stupid question but i still beginner
in android and really appreciate any help

Here is my code :

  public class Multi extends ActivityGroup{
LinearLayout layout;
LinearLayout layout_s1;
LinearLayout layout_s2;


@Override
protected void onCreate(Bundle savedInstanceState) {
 // TODO Auto-generated method stub
 super.onCreate(savedInstanceState);

 setContentView(R.layout.multiview);

 layout = (LinearLayout) findViewById(R.id.multiview_layout);
 layout_s1 = (LinearLayout) findViewById(R.id.my_view_1);
 layout_s2 = (LinearLayout) findViewById(R.id.my_view_2);

 LocalActivityManager mgr = getLocalActivityManager();

 layout_s1.addView((mgr.startActivity(MyOtherActivityInstance1,
new Intent(this, Tab1.class))).getDecorView());
 layout_s2.addView((mgr.startActivity(MyOtherActivityInstance2,
new Intent(this, Tab2.class))).getDecorView());


 }
}



--
Kostya Vasilyev

--
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: What do these errors mean (using Eclipse)?

2012-02-02 Thread Kostya Vasilyev

It's not an Android issue.

It's not even a Java issue.

The issue is: trying to use C++ syntax in Java.

Inheritance is one of the things where Java is not quite the same as C++ 
(putting it mildly) - and the syntax differs too.


I'd recommend spending a couple hours on a Java crash course, they can 
be easily found with Google Search.


-- Kostya

02.02.2012 12:27, atcal пишет:

my problems with it as an Android issue, not a
Java issue


--
Kostya Vasilyev

--
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] MS SQL connection

2012-02-02 Thread anand jh
can u give a sample code web service for accessing database

-- 
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] Maps with GPS indicator in status bar..?

2012-02-02 Thread Mark Murphy
On Thu, Feb 2, 2012 at 5:59 AM, Abhilash baddam
abhilash.androiddevelo...@gmail.com wrote:
 Similarly how in my application if i am using GPS yhen i want to show
 GPS indicator on the status bar and whwnever i come out from my
 application i want to dismiss that indicator from staus bar. How can i
 achieve this...? can anybody give me some idea to get this...

On production hardware, the indicator appears when somebody has
registered for location updates and goes away when nobody has
registered for location updates.

-- 
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.4
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] EditText selectAll() does not work in ICS

2012-02-02 Thread Mark Murphy
On Wed, Feb 1, 2012 at 11:12 PM, Stéphane Bruno
mysubscripti...@websystems.ht wrote:
 I am trying to programmatically select all the text in an EditText field
 when a user touches the field so that when the user starts typing it
 replaces the existing text (I cannot use settings in the XML file because
 this field is programmatically added to the screen).

setHint() is an available method, used to set the hint text from Java.

-- 
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.4
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] Exist's someting like execSQL() but for select sentences?

2012-02-02 Thread saex
I like execSQL because i can do this:

db.execSQL(INSERT INTO Usuarios (codigo, nombre) VALUES (1,
'pedro'));

exist's something similar (wich only needs a string as parameter) but
to do SELECT sentences and returns a Cursor with the results

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: WebView problem with youtube video

2012-02-02 Thread drenda
Hi John,
I don't understand the meaning of video needs special handling. Is
there a tutorial or some examples that work with youtube's videos?

Thanks!

Best regards

Daniele

On 2 Feb, 10:40, John Purcell jsp...@gmail.com wrote:
 Danielle,

 If you look at the src (android-3.2.2_r2 is what I'm looking at), it's
 crashing in the custom view. Unless you've implemented the code I
 mentioned before, this will be the case.

 John

 On Jan 31, 3:42 pm, drenda daniele.re...@gmail.com wrote:







  Hi John,
  thanks for your replay.
  I'm usign Honeycomb on a tablet.
  Unfortunally the order of the loading url don't resolve the problem.
  I'm try with this code:

  setContentView(R.layout.video);
  final WebView webView = (WebView) findViewById(R.id.video_webview);
  webView.getSettings().setJavaScriptEnabled(true);
  webView.getSettings().setPluginsEnabled(true);
  webView.loadUrl(getString(R.string.urlYouTube));

  You can test this simple code with some video on youtube and you
  realize that you can see the preview image of the video but when you
  click on play button the video don't start!! Moreover if you click on
  maximise icon of the video the application crash as you can see here:

  01-31 20:41:24.778: E/AndroidRuntime(399): FATAL EXCEPTION: main
  01-31 20:41:24.778: E/AndroidRuntime(399):
  java.lang.NullPointerException
  01-31 20:41:24.778: E/AndroidRuntime(399):      at
  android.webkit.HTML5VideoFullScreen.enterFullScreenVideoState(HTML5VideoFul 
  lScreen.java:
  253)
  01-31 20:41:24.778: E/AndroidRuntime(399):      at
  android.webkit.HTML5VideoViewProxy
  $VideoPlayer.enterFullScreenVideo(HTML5VideoViewProxy.java:161)
  01-31 20:41:24.778: E/AndroidRuntime(399):      at
  android.webkit.HTML5VideoViewProxy.enterFullScreenVideo(HTML5VideoViewProxy 
  .java:
  667)
  01-31 20:41:24.778: E/AndroidRuntime(399):      at android.webkit.WebView
  $PrivateHandler.handleMessage(WebView.java:8017)
  01-31 20:41:24.778: E/AndroidRuntime(399):      at
  android.os.Handler.dispatchMessage(Handler.java:99)
  01-31 20:41:24.778: E/AndroidRuntime(399):      at
  android.os.Looper.loop(Looper.java:132)
  01-31 20:41:24.778: E/AndroidRuntime(399):      at
  android.app.ActivityThread.main(ActivityThread.java:4123)
  01-31 20:41:24.778: E/AndroidRuntime(399):      at
  java.lang.reflect.Method.invokeNative(Native Method)
  01-31 20:41:24.778: E/AndroidRuntime(399):      at
  java.lang.reflect.Method.invoke(Method.java:491)
  01-31 20:41:24.778: E/AndroidRuntime(399):      at
  com.android.internal.os.ZygoteInit
  $MethodAndArgsCaller.run(ZygoteInit.java:841)
  01-31 20:41:24.778: E/AndroidRuntime(399):      at
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
  01-31 20:41:24.778: E/AndroidRuntime(399):      at
  dalvik.system.NativeStart.main(Native Method)

  Thanks very much

  Best regards

  Daniele

  On Jan 31, 1:02 pm, John Purcell jsp...@gmail.com wrote:

   In general, the loading of the URL should come last (right now you've
   got plugins and Javascript enabled messages being sent to the webcore
   after you send a url request).

   Is this on Honeycomb or ICS? (I'm guessing ICS due to the 'normal'
   errors you posted above). Keep in mind that video needs special
   handling in older versions of android (well, in all versions 
   really).http://code.google.com/p/html5webview/willworkfor 2.x, but is out
   of date for 3.x/4.x

   On Jan 30, 3:34 pm, drenda daniele.re...@gmail.com wrote:

PLease,
someone has some ideas?

Thanks!

On 29 Gen, 22:38, drenda daniele.re...@gmail.com wrote:

 Hi,
 i made a simple example in order to display in my app some youtube's
 video of a playlist.
 I created a WebView:

 @Override
         public void onCreate(Bundle savedInstanceState) {
                 super.onCreate(savedInstanceState);
                 try {
                         setContentView(R.layout.video);

                         final WebView webView = (WebView) 
 findViewById(R.id.video_webview);
                         
 webView.loadUrl(getString(R.string.urlYouTube));
                         
 webView.getSettings().setJavaScriptEnabled(true);
                         webView.getSettings().setPluginsEnabled(true);

                 } catch (Exception e) {
                         Log.e(Rubner, e.getMessage());
                         e.printStackTrace();
                 }

 The webview is render correctly and display the videos of playlist.
 When you click on a video is displayed the page of the video with play
 button  but if you click on it the video don't start!!!

 Are raised these errors:

 01-29 22:37:28.714: W/System.err(5963): Error reading from ./org/
 apache/harmony/luni/internal/net/www/protocol/data/Handler.class
 01-29 22:37:28.934: E/libEGL(5963): call to OpenGL ES API with no
 current context (logged once per thread)
 01-29 

Re: [android-developers] Exist's someting like execSQL() but for select sentences?

2012-02-02 Thread Mark Murphy
rawQuery()

On Thu, Feb 2, 2012 at 7:53 AM, saex elpablos...@gmail.com wrote:
 I like execSQL because i can do this:

 db.execSQL(INSERT INTO Usuarios (codigo, nombre) VALUES (1,
 'pedro'));

 exist's something similar (wich only needs a string as parameter) but
 to do SELECT sentences and returns a Cursor with the results

 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



-- 
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.4
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] EditText selectAll() does not work in ICS

2012-02-02 Thread Kostya Vasilyev

On 02/02/2012 04:42 PM, Mark Murphy wrote:

On Wed, Feb 1, 2012 at 11:12 PM, Stéphane Bruno
mysubscripti...@websystems.ht  wrote:

I am trying to programmatically select all the text in an EditText field
when a user touches the field so that when the user starts typing it
replaces the existing text (I cannot use settings in the XML file because
this field is programmatically added to the screen).

setHint() is an available method, used to set the hint text from Java.



It's worth noting that the hint can also be  specified in XML, as 
android:hint.




--
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] Exist's someting like execSQL() but for select sentences?

2012-02-02 Thread Kostya Vasilyev

On 02/02/2012 04:53 PM, saex wrote:

I like execSQL because i can do this:

db.execSQL(INSERT INTO Usuarios (codigo, nombre) VALUES (1,
'pedro'));

exist's something similar (wich only needs a string as parameter) but
to do SELECT sentences and returns a Cursor with the results

Thanks

http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery(java.lang.String, 
java.lang.String[]) 
http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery%28java.lang.String,%20java.lang.String[]%29


But I'd think twice before using this too much :)

--
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] EditText selectAll() does not work in ICS

2012-02-02 Thread Stéphane Bruno
No. The hint method does not suit what I want to do. The text in the 
EditText field is valid text, not a hint about what the user should enter. 
In fact it is a Quantity field in an order entry system. I want the user to 
just enter a new number over the number that is already there instead of 
deleting the existing and reenter a new one.

The way to do this is to make text selected/highlighted automatically when 
the user touches the field so that what he types replaces what is already 
there. There is an option for that in the XML layout, but I cannot use it 
because this field is constructed programmatically (as users enter new line 
items). The above code works fine on Android 2.x, but it just does not work 
in ICS.

That is why I am wondering if it is not a bug introduced in ICS, or if I am 
doing something wrong...

-- 
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] Stream issues

2012-02-02 Thread darrinps
I have a Bluetooth application based on BluetoothChat. In fact, I've
seen the same issue running that application as a test.

The app communicates with another Bluetooth device (not Android). That
device doesn't always send all the data in one chunk to Android
(although supposedly it does to other Bluetooth phones...like
Blackberry).

Sometimes the data comes over as one byte, followed by 9, followed by
the final 9. I never see this when talking Android phone to Android
phone, just Android phone to this device.

Looking at the BluetoothChat application, there is no checking to see
if the stream is complete. It just has a run that stays alive putting
data into a buffer then sends that buffer to a Handler. Here is the
exact code:

public void run() {
Log.i(TAG, BEGIN mConnectedThread);
byte[] buffer = new byte[1024];
int bytes;

// Keep listening to the InputStream while connected
while (true) {
try {
// Read from the InputStream
bytes = mmInStream.read(buffer);

// Send the obtained bytes to the UI Activity
mHandler.obtainMessage(BluetoothChat.MESSAGE_READ,
bytes, -1, buffer).sendToTarget();
} catch (IOException e) {
Log.e(TAG, disconnected, e);
connectionLost();
break;
}
}
}

Since the buffer never gets cleared, I would think that longer
messages that come before shorter ones would show partly in the
buffer. Also, there is no check to see if all of the data has been
transmitted (doesn't read return a -1 when the end of the stream is
hit and shouldn't that be checked?).

Just curious if others have run into similar issues on Android and how
they got around it.

BTW, there is a BIG difference in Bluetooth connection ability between
Android phones. I have one phone almost never connects while other
phones do almost always.

-- 
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: bulk install apps via android market

2012-02-02 Thread TreKing
On Thu, Feb 2, 2012 at 3:54 AM, madlymad mando7s...@gmail.com wrote:

 checking out AppBrain App I found out that the install function also opens
 Android Market App!


On the device, yes. Via the site, it starts an automatic download. I'm
surprised they don't use the same mechanism from the device.


 So the only way to work with android market is, the unfriendly one
 to install 1 by 1 the apps!


It seems possible to do what you want, observing AppBrain, but I don't know
what more to tell you about how.


 If I switch to the solution of downloading apps from my server and
 creating a queue of manual installing (http://stackoverflow.com/a/
 4969421/944070) do you know if the user has the ability in future to
 get app updates from android market service?


I think so.

-
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] EditText selectAll() does not work in ICS

2012-02-02 Thread Mark Murphy
On Thu, Feb 2, 2012 at 8:09 AM, Stéphane Bruno
mysubscripti...@websystems.ht wrote:
 No. The hint method does not suit what I want to do. The text in the
 EditText field is valid text, not a hint about what the user should enter.
 In fact it is a Quantity field in an order entry system. I want the user to
 just enter a new number over the number that is already there instead of
 deleting the existing and reenter a new one.

You can still use hint. If the field is blank, use the hint text as the value.

 There is an option for that in the XML layout, but I cannot use it
 because this field is constructed programmatically (as users enter new line
 items).

Then create an XML layout that contains just the EditText and inflate
that, rather than adding it through Java directly.

-- 
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.4
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: What do these errors mean (using Eclipse)?

2012-02-02 Thread atcal


On Feb 2, 12:51 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 It's not an Android issue.

 It's not even a Java issue.

 The issue is: trying to use C++ syntax in Java.

 Inheritance is one of the things where Java is not quite the same as C++
 (putting it mildly) - and the syntax differs too.

 I'd recommend spending a couple hours on a Java crash course, they can
 be easily found with Google Search.

 -- Kostya

 02.02.2012 12:27, atcal пишет:

  my problems with it as an Android issue, not a
  Java issue

 --
 Kostya Vasilyev

OK. So why is the documentation so misleading? View() is shown as a
public method in teh android documentation. Why is it not available to
a subclass? Are you seriously telling me that the explanation for this
is that I don't understand Java inheritance?

(  super(context) passes the compiler but then crashes out at run
time. Can anyone tell me the statement(s) I need to put in rather than
refer me to a crash course. I've already spent several hours reading
the Oracle java course, so unless you have a specific course and
chapter in mind the suggestion isn't very helpful. )

-- 
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] Exist's someting like execSQL() but for select sentences?

2012-02-02 Thread Bhaumik Thaker
you can use the raw query or query or content Provider for this.
execSQL will not work in case of Select Clause and it must returns the
cursor don't forget this

On Thu, Feb 2, 2012 at 6:31 PM, Kostya Vasilyev kmans...@gmail.com wrote:

  On 02/02/2012 04:53 PM, saex wrote:

 I like execSQL because i can do this:

 db.execSQL(INSERT INTO Usuarios (codigo, nombre) VALUES (1,
 'pedro'));

 exist's something similar (wich only needs a string as parameter) but
 to do SELECT sentences and returns a Cursor with the results

 Thanks


  
 http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery(java.lang.String,
 java.lang.String[])http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery%28java.lang.String,%20java.lang.String[]%29

 But I'd think twice before using this too much :)

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




-- 
Bhaumik Thaker

-- 
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: What do these errors mean (using Eclipse)?

2012-02-02 Thread Mark Murphy
On Thu, Feb 2, 2012 at 8:27 AM, atcal alan.williams...@ya.com wrote:
 OK. So why is the documentation so misleading?

It is not misleading. It is following the same JavaDocs structure that
has been used for a decade-plus for Java development. It is understood
by hundreds of thousands of Java developers, including tens of
thousands of Android developers.

 View() is shown as a
 public method in teh android documentation.

No, it is not. It is listed in the Public Constructors section, not
the Public Methods section.

 Are you seriously telling me that the explanation for this
 is that I don't understand Java inheritance?

It would appear that you do not understand Java programming. I suggest
that you spend time, outside of Android, learning Java programming,
before returning to Android development. Here is a blog post of mine
from a ways back outlining the key Java language bits that an Android
developer would need to be comfortable with:

http://commonsware.com/blog/2010/08/02/java-good-parts-version.html

 (  super(context) passes the compiler but then crashes out at run
 time.

Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
LogCat and look at the stack trace associated with your crash.

-- 
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.4
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] EditText selectAll() does not work in ICS

2012-02-02 Thread Stéphane Bruno


 Then create an XML layout that contains just the EditText and inflate
 that, rather than adding it through Java directly.

 I am going to try that, but can you explain why the above method does not 
work? Is it a bug?

Stéphane



-- 
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] EditText selectAll() does not work in ICS

2012-02-02 Thread Mark Murphy
On Thu, Feb 2, 2012 at 8:52 AM, Stéphane Bruno
mysubscripti...@websystems.ht wrote:

 Then create an XML layout that contains just the EditText and inflate
 that, rather than adding it through Java directly.

  I am going to try that, but can you explain why the above method does not
 work? Is it a bug?

If I knew that, I would have mentioned it by now... :-)

-- 
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.4
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: partition UI

2012-02-02 Thread awtDroid

On Feb 1, 6:28 pm, Kristopher Micinski krismicin...@gmail.com wrote:
 Is it that you want to have multiple
 processes communicating to display stuff on the screen?

 kris

Yes, we would like to have multiple processes communicating to display
stuff on the screen.

We would like to be able to release these processes independent of
each other.  Imagine process A manages the left side of the screen,
and process B manages the right side of the screen.  We need to be
able to make a change to process A which affects the widgets it owns
on the left side of the screen without affecting process B which has
already been released.




-- 
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] Maps with GPS indicator in status bar..?

2012-02-02 Thread Abhilash baddam
Hi Mark,

Thanks for the reply, so it's depends on the settings of the user on
the mobile thats what you are saying right.It's not related to
programming am i right...? That setting we can find under settings and
Location right..?

On 2/2/12, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Feb 2, 2012 at 5:59 AM, Abhilash baddam
 abhilash.androiddevelo...@gmail.com wrote:
 Similarly how in my application if i am using GPS yhen i want to show
 GPS indicator on the status bar and whwnever i come out from my
 application i want to dismiss that indicator from staus bar. How can i
 achieve this...? can anybody give me some idea to get this...

 On production hardware, the indicator appears when somebody has
 registered for location updates and goes away when nobody has
 registered for location updates.

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

-- 
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] EditText selectAll() does not work in ICS

2012-02-02 Thread dmon
Hmmm i just saw there's a 
selectAllOnFocushttp://developer.android.com/reference/android/widget/TextView.html#attr_android:selectAllOnFocusattribute.
 I've never tried it though. 

-- 
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] Maps with GPS indicator in status bar..?

2012-02-02 Thread Mark Murphy
On Thu, Feb 2, 2012 at 9:14 AM, Abhilash baddam
abhilash.androiddevelo...@gmail.com wrote:
 Thanks for the reply, so it's depends on the settings of the user on
 the mobile thats what you are saying right.It's not related to
 programming am i right...? That setting we can find under settings and
 Location right..?

No.

Rephrasing my previous reply:

On production hardware, the indicator appears when some app has
registered for location updates and goes away when no app has
registered for location updates.

-- 
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.4
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: What do these errors mean (using Eclipse)?

2012-02-02 Thread Kostya Vasilyev

On 02/02/2012 05:27 PM, atcal wrote:

OK. So why is the documentation so misleading? View() is shown as a
public method in teh android documentation.


Not for me:

http://developer.android.com/reference/android/view/View.html

Public Constructors
	View 
http://developer.android.com/reference/android/view/View.html#View%28android.content.Context%29(Context 
http://developer.android.com/reference/android/content/Context.htmlcontext) 


Simple constructor to use when creating a view from code.
	View 
http://developer.android.com/reference/android/view/View.html#View%28android.content.Context,%20android.util.AttributeSet%29(Context 
http://developer.android.com/reference/android/content/Context.htmlcontext,AttributeSet 
http://developer.android.com/reference/android/util/AttributeSet.htmlattrs) 


Constructor that is called when inflating a view from XML.
	View 
http://developer.android.com/reference/android/view/View.html#View%28android.content.Context,%20android.util.AttributeSet,%20int%29(Context 
http://developer.android.com/reference/android/content/Context.htmlcontext,AttributeSet 
http://developer.android.com/reference/android/util/AttributeSet.htmlattrs, 
int defStyle)

Perform inflation from XML and apply a class-specific base style.


I don't see an argument-less View() here.

There is an argument-less constructor in the source:

https://github.com/android/platform_frameworks_base/blob/master/core/java/android/view/View.java#L3127

but it's access level is package, not public or protected, so 
application code won't be able to use it.




Why is it not available to
a subclass? Are you seriously telling me that the explanation for this
is that I don't understand Java inheritance?


I'm seriously telling you that the snippet in your original email looked 
like you used C++ constructor syntax, or something similar, and not Java 
syntax.





(  super(context) passes the compiler but then crashes out at run
time.


If you're trying to create a custom view, please refer to this:

http://developer.android.com/guide/topics/ui/custom-components.html

In particular, it says:

There is a form of the constructor that are called when the view is 
created from code and a form that is called when the view is inflated 
from a layout file. The second form should parse and apply any 
attributes defined in the layout file.


The former is YourView(Context), the latter is YourView(Context, 
AttributeSet)



Can anyone tell me the statement(s) I need to put in rather than
refer me to a crash course.


The link above should be a good start.


I've already spent several hours reading
the Oracle java course, so unless you have a specific course and
chapter in mind the suggestion isn't very helpful. )


I'll just put it here then:

The syntax for calling the base class constructor from a derived class 
constructor, in Java, is:


class Derived extends Base {

public Derived(.. args here...)
{
super(... args here);
}
}

and not:

class Derived extends Base {

public Derived(.. args here...)
{
Base(... args here);
}
}

or:

class Derived extends Base {

public Derived(.. args here...) : Base (... args here... )
{
}
}


Why is this? Java doesn't have MI like C++, so it's not necessary to 
explicitly specify which of the base classes you're referring to - just 
super is unambiguous.


And actually, in C++, your original code snippet would be creating a 
temporary View object on the stack, rather than initializing the base class.


-- Kostya

--
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 can i get the payment from amazon earning

2012-02-02 Thread a a
i don't know how can i contaction Amazon

2012/1/12 TreKing treking...@gmail.com

 On Wed, Jan 11, 2012 at 10:58 PM, a a harvey.a...@gmail.com wrote:

 How can i get the payment from amazon earning


 Have you considered contacting Amazon ?

 .
 ...
 .

 *shakes head*


 -
 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

-- 
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] EditText selectAll() does not work in ICS

2012-02-02 Thread Stéphane Bruno
I applied Mark Murphy's suggestion. It works now. I am going to file a
bug for the method I tried though...

Thanks, guys!

On Thu, Feb 2, 2012 at 9:15 AM, dmon david...@gmail.com wrote:
 Hmmm i just saw there's a selectAllOnFocus attribute. I've never tried it
 though.

 --
 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] Kindle Fire and Permissions

2012-02-02 Thread iñaki
Hi, I submitted an app to Amazon Store, Amazon approved for Amazon store
but not for kindle fire.
After read https://developer.amazon.com/help/faq.html#KindleFire I check my
manifest but I don't know what is the problem, I have removed all
references of phone/gps features...
Only I have permissions like:

android.permission.GET_TASKS, android.permission.WRITE_EXTERNAL_STORAGE,
android.permission.INTERNET, android.permission.READ_CONTACTS,
android.permission.ACCESS_NETWORK_STATE,
android.permission.KILL_BACKGROUND_PROCESSES


READ_CONTACTS is allowed ?


Regards



Iñaki

-- 
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] Kindle Fire and Permissions

2012-02-02 Thread Mark Murphy
That would be a question for Amazon.

On Thu, Feb 2, 2012 at 9:57 AM, iñaki inaki.s...@gmail.com wrote:
 Hi, I submitted an app to Amazon Store, Amazon approved for Amazon store but
 not for kindle fire.
 After read https://developer.amazon.com/help/faq.html#KindleFire I check my
 manifest but I don't know what is the problem, I have removed all references
 of phone/gps features...
 Only I have permissions like:

 android.permission.GET_TASKS, android.permission.WRITE_EXTERNAL_STORAGE,
 android.permission.INTERNET, android.permission.READ_CONTACTS,
 android.permission.ACCESS_NETWORK_STATE,
 android.permission.KILL_BACKGROUND_PROCESSES


 READ_CONTACTS is allowed ?


 Regards



 Iñaki

 --
 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 Android Development_ Version 3.7 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 can i get the payment from amazon earning

2012-02-02 Thread TreKing
On Thu, Feb 2, 2012 at 8:50 AM, a a harvey.a...@gmail.com wrote:

 i don't know how can i contaction Amazon


I don't know what contaction is, but if you try looking around your
amazon developer account, or use Google, you should be able to figure this
out.

-
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] Kindle Fire and Permissions

2012-02-02 Thread iñaki
Ok Mark, I´ll try with Amazon


Iñaki

On 2 February 2012 15:59, Mark Murphy mmur...@commonsware.com wrote:

 That would be a question for Amazon.

 On Thu, Feb 2, 2012 at 9:57 AM, iñaki inaki.s...@gmail.com wrote:
  Hi, I submitted an app to Amazon Store, Amazon approved for Amazon store
 but
  not for kindle fire.
  After read https://developer.amazon.com/help/faq.html#KindleFire I
 check my
  manifest but I don't know what is the problem, I have removed all
 references
  of phone/gps features...
  Only I have permissions like:
 
  android.permission.GET_TASKS, android.permission.WRITE_EXTERNAL_STORAGE,
  android.permission.INTERNET, android.permission.READ_CONTACTS,
  android.permission.ACCESS_NETWORK_STATE,
  android.permission.KILL_BACKGROUND_PROCESSES
 
 
  READ_CONTACTS is allowed ?
 
 
  Regards
 
 
 
  Iñaki
 
  --
  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 Android Development_ Version 3.7 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

-- 
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] Error while implementing fragments.

2012-02-02 Thread Satyajit Sarangi
This is my ExampleFragment.java


package com.test.methods;

import android.support.v4.app.Fragment;
import android.support.v4.app.ListFragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;

import com.crumbin.main.R;

public class ExampleFragment extends ListFragment {

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup
container,
 Bundle savedInstanceState) {
// Inflate the layout for this fragment



setListAdapter(new ArrayAdapterString(getActivity(),
R.layout.example_fragment,
Shakespeare.TITLES));
return inflater.inflate(R.layout.example_fragment, container,
false);
}
}




This is my Acitivity:

package com.test.methods;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;


public class DemoUserActivity extends FragmentActivity{

protected void OnCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);

if (savedInstanceState == null)
{
ExampleFragment details = new ExampleFragment();
details.setArguments(getIntent().getExtras());
getSupportFragmentManager().beginTransaction().add(
android.R.id.content,details).commit();

}

}
}

This is my Shakesphere class:


package com.test.methods;

public class Shakespeare {

public static final String[] TITLES = null;
String [] TILES = {hello,hi};
}


This is my xml:

LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:id=@+id/example_fragment
android:orientation=horizontal
android:layout_width=match_parent
android:layout_height=match_parent

fragment class=com.test.methods.ExampleFragment
android:id=@+id/list_example
android:layout_weight=1
android:layout_width=0px
android:layout_height=match_parent /

FrameLayout android:id=@+id/details android:layout_weight=1
android:layout_width=0px
android:layout_height=match_parent /

/LinearLayout

I'm getting a blank page on my emulator. No data of Shakesphere class
is getting displayed. What might be the error in my code? I'm guessing
I've gone wrong with the layout.

-- 
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] EditText with bitmaps

2012-02-02 Thread Robert Slama
Hi guys,

is any way how make edittext custumized as is on attached image?

r^

-- 
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=enattachment: edittext.png

Re: [android-developers] Maps with GPS indicator in status bar..?

2012-02-02 Thread Kristopher Micinski
On Thu, Feb 2, 2012 at 5:59 AM, Abhilash baddam
abhilash.androiddevelo...@gmail.com wrote:
 Hi,

 If we open Maps application(in built) in the device it will show the
 GPS indicator on the status bar already if GPS is enabled in  the
 device and If we come out from the maps application then that
 indicator will dismissed from status bar.

 Similarly how in my application if i am using GPS yhen i want to show
 GPS indicator on the status bar and whwnever i come out from my
 application i want to dismiss that indicator from staus bar. How can i
 achieve this...? can anybody give me some idea to get this...

 How can I display in my application that will use the GPS for
 something on the status bar. For example just open up Google Maps. If
 you want to know if you left the GPS activated, just slide the
 notification panel and at the top you will have the toggle buttons,
 one of them is the GPS.


I guess what Mark's response is trying to say is: if you're trying to
change he behavior of the GPS status indicator, you can't..

kris

-- 
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: partition UI

2012-02-02 Thread awtDroid

RemoteView seems to be very close to what we need.

http://mylifewithandroid.blogspot.com/2010/01/remoteviews-as-hypertext-document.html

Only it seems there are some limitations on exactly which UI elements
can be serialized.

-- 
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: partition UI

2012-02-02 Thread Mark Murphy
On Thu, Feb 2, 2012 at 11:14 AM, awtDroid andyturne...@gmail.com wrote:
 RemoteView seems to be very close to what we need.

 http://mylifewithandroid.blogspot.com/2010/01/remoteviews-as-hypertext-document.html

 Only it seems there are some limitations on exactly which UI elements
 can be serialized.

Saying that RemoteViews has some limitations is akin to saying _War
and Peace_ has some words. :-)

Now, you mentioned that this is a large OEM app running on a custom
tablet-like display. You are welcome, therefore, to modify the
Android firmware, cooking up your own mechanism for what you are
trying to accomplish from scratch. If you are not intending on using
third-party apps, anyway, compatibility with such apps is not an
issue. However, this list is for developers sticking with the Android
SDK, so we cannot help you much here on what that would entail. It is
also probably substantially more work than sticking with the SDK and
adjusting your plans to fit within the bounds of that SDK.

-- 
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 Android Development_ Version 3.7 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: ICS Recent apps thumbnails

2012-02-02 Thread ocallaghan.do...@gmail.com
Overriding onCreateThumbnail in your activity will allow you to supply
a blank bitmap (or padlock etc) instead of a screenshot. Be sure to
return true to tell the system you've overridden the bitmap.

On Jan 20, 9:33 pm, tegbird tegb...@gmail.com wrote:
 Hi Daz,
 I am facing the same problem. Did you find any solution. It would be
 great help if you can provide any guidance.
 Thanks in advance.
 Tegbir

 On Dec 17 2011, 10:55 am, Daz kuffs2...@gmail.com wrote:







  Hi Diane,

  Sorry I should have been more specific but this was my 3rd attempt at
  asking the question, the previous 2 not making it past the New member
  moderation. I didn't want to waste too much time as I was unsure the post
  would appear.

  Basically it is exactly as Zsolt says. My app should not have its contents
  visible unless a valid password has been entered. I understand that
  physical access to the phone is required to see the thumbnails but the fact
  is that the data should not be accessible outside the app at all.

  As a user as well as a dev, I may pass my phone to another person to show a
  photo, web page etc and tablets in my household tend to be partly communal
  for looking up web sites etc. At present I have to ensure that the app has
  been swiped away from the recent apps list before I allow anybody else
  access.

  So back to the original question. Is there a way to prevent the screen grab
  or at the very least, an override I can use to hide the sensitive data
  manually before the screen grab is taken?

  Thanks for any help anybody can give.

  Daz

  p.s After my first post I am now being spammed. We saw your post on google
  groups, would you like to .  Any tips to prevent 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] Remote Service + Async Calls + Activity + Callbacks... oh my!

2012-02-02 Thread Bsweet
I'm building an Android application that will provide some helpful
services to other android applications.

Activities will remotely bind to my service to interact with it.

Per feedback and requests from developers using my services, I have
been asked to handle some of the UI flow.

This requires us to handle a case where I need to get input from the
user.

Since some of the services I give access to use web service calls, the
calls to my service are asynchronous.  I use handlers to callback to
applications that have made request to my service.

So in launching an activity to help handle the UI Flow this I have run
into a problem.

It appears I need my service to continue running from the point it was
when it prompts the user to choose an action.  So if I don't block the
service thread, my handlers have to finish and lose context to the
message.

I didn't like this approach, so to get around this I tried to launch
an intent with the original message passed to my service in the extras
of an intent.  But it doesn't look like it retains the replyTo to
respond to the eventual action chosen by the user.

Am I doing something fundamentally flawed?  Is there an *Android Way*
of doing 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] ant build not detecting changes

2012-02-02 Thread aaron
I've recently updated to the latest android sdk but it's been a while
since I did a build with ant so not sure if that's related.  The issue
that I'm having is the when I change source files it's not building a
new apk.  It looks like the problem is:

-compile:
[javac] Compiling 1 source file to /home/bricea/workspace/
myproject/bin/classes

-post-compile:

-obfuscate:

-dex:
  [dex] No new compiled code. No need to convert bytecode to
dalvik format.

Why is dex not finding the new classes?  I checked and there's .class
files in bin/classes with newer timestamps than the bin/classes.dex
file, what method does the dex step of the build use to determine if
there's new compiled code?  This is happening on multiple projects..

Thanks,
Aaron

-- 
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] Remote Service + Async Calls + Activity + Callbacks... oh my!

2012-02-02 Thread Kristopher Micinski
On Thu, Feb 2, 2012 at 11:56 AM, Bsweet tony.sa...@gmail.com wrote:
 I'm building an Android application that will provide some helpful
 services to other android applications.


What kind of services?


 Activities will remotely bind to my service to interact with it.

 Per feedback and requests from developers using my services, I have
 been asked to handle some of the UI flow.

 This requires us to handle a case where I need to get input from the
 user.

 Since some of the services I give access to use web service calls, the
 calls to my service are asynchronous.  I use handlers to callback to
 applications that have made request to my service.

 So in launching an activity to help handle the UI Flow this I have run
 into a problem.

 It appears I need my service to continue running from the point it was
 when it prompts the user to choose an action.  So if I don't block the
 service thread, my handlers have to finish and lose context to the
 message.

 I didn't like this approach, so to get around this I tried to launch
 an intent with the original message passed to my service in the extras
 of an intent.  But it doesn't look like it retains the replyTo to
 respond to the eventual action chosen by the user.

 Am I doing something fundamentally flawed?  Is there an *Android Way*
 of doing this?


I don't get how you're mixing the service and UI.  A service doesn't
really have anything to do with UI, any UI will be done in an
Activity, and then that activity will communicate with the service to
talk to it...,

So what do you mean by handling UI stuff in your service?

I'm assuming you're providing a utility service that other apps can
bind to and then use for things like decoupled communication with a
web client or something like that...

kris

-- 
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] ant build not detecting changes

2012-02-02 Thread Kostya Vasilyev

On 02/02/2012 09:11 PM, aaron wrote:

I've recently updated to the latest android sdk but it's been a while
since I did a build with ant so not sure if that's related.  The issue
that I'm having is the when I change source files it's not building a
new apk.  It looks like the problem is:

-compile:
 [javac] Compiling 1 source file to /home/bricea/workspace/
myproject/bin/classes

-post-compile:

-obfuscate:

-dex:
   [dex] No new compiled code. No need to convert bytecode to
dalvik format.

Why is dex not finding the new classes?  I checked and there's .class
files in bin/classes with newer timestamps than the bin/classes.dex
file, what method does the dex step of the build use to determine if
there's new compiled code?  This is happening on multiple projects..

Thanks,
Aaron



Yep, same here, on Linux.

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

Looks like it's scheduled for ADT 17 (?)

-- K

--
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: ant build not detecting changes

2012-02-02 Thread aaron
On Feb 2, 10:21 am, Kostya Vasilyev kmans...@gmail.com wrote:
 Yep, same here, on Linux.

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

 Looks like it's scheduled for ADT 17 (?)

 -- K

Thanks.  I guess no one on the SDK team builds with ant..

Aaron

-- 
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] Strange Cipher Result Java SE vs Android

2012-02-02 Thread Jan Burse

Dear All,

I see a strange cipher result. I am using the
following code with a public RSA key:

System.err.println(res =  + toHex(res, p, RSA_OUTPUT));
byte[] temp = cipher.doFinal(res, p, RSA_OUTPUT);
System.err.println(temp =  + toHex(temp, 0, temp.length));

When I run the code on Java SE, I get:

res =  - cipher 64 bytes - 
temp =  - plain 32 bytes - 

When I run the code on Android, I get:

res =  - cipher 64 bytes - 
temp = 01ff00
    - plain 32 bytes - 

Where does the 01ff...ff00 come from? Can I get rid of it?

Bye

--
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: Remote Service + Async Calls + Activity + Callbacks... oh my!

2012-02-02 Thread Streets Of Boston
If i'm understanding correctly, your service needs a user-response (a user 
supplied value) to continue. 
Make this asynchronous by handling the request twice:

- Make the request to the service from your UI (using intents)
- The service goes out on the web to do the actual request.
- The service gets a negative reply from the web-service; it needs some 
extra info.
- The service will send a broadcast out requesting for this info (from 
broadcast-receiver that knows the answer). If necessary, add some extra 
Info in the broadcast intent to help the receiver.
- Your UI will have registered as a receiver for this broadcast and your UI 
will now receive this broadcast: It will prompt the user for extra info.
- After the user has provided the extra info, your  UI will re-do the 
initial request including the extra info that was requested by the service. 
- The service gets the request, with the extra info, goes out to the web to 
get the actual results.
- If the web-service is still not happy, rinse and repeat or bail out.

If this request is a login issue (authentication issue), i suggest using 
authentication services instead.

-- 
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: Strange Cipher Result Java SE vs Android

2012-02-02 Thread Jan Burse

Problem resolved:
http://stackoverflow.com/questions/8885261/is-it-possible-for-android-application-to-implement-rsa-none-pkcs1padding-rsa

Jan Burse schrieb:

Dear All,

I see a strange cipher result. I am using the
following code with a public RSA key:

System.err.println(res =  + toHex(res, p, RSA_OUTPUT));
byte[] temp = cipher.doFinal(res, p, RSA_OUTPUT);
System.err.println(temp =  + toHex(temp, 0, temp.length));

When I run the code on Java SE, I get:

res =  - cipher 64 bytes - 
temp =  - plain 32 bytes - 

When I run the code on Android, I get:

res =  - cipher 64 bytes - 
temp = 01ff00
 - plain 32 bytes - 

Where does the 01ff...ff00 come from? Can I get rid of it?

Bye




--
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] Tethering two android phones

2012-02-02 Thread John-Marc Desmarais
Hi,

Does anyone know of a method to tether two phones via USB so that one
phone can communicate with the other using an intermediate PC?

Or, a method to change the default gateway given when tethering on one
of the phones from 192.168.42.129 to something else.

It seems that if I connect two android phones to the PC both are given
the same gateway address, it is possible to send/receive data from one
phone to the other? is there an address on the other side of the
gateway address that can be used? Can I configure the address on one
of the phones so that the gateway addresses are unique?

Thanks,
John-Marc Desmarais

-- 
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] onUpdateSelection not called in OS 2.3 and earlier

2012-02-02 Thread Saied
Hello,

I have a soft keyboard that uses onUpdateSelection to manage changing
of the text and its related functions (word prediction).

This works pretty well, except that when the text box is on a webpage,
Android OS 2.3 and earlier do not call onUpdateSelection. OS 3.x and
4.x have no problem doing so.

So they questions:

Why?

Is there a  work around? Can I make OS 2.3 and earlier to recognize
this and call onUpdateSelection?

I appreciate any pointer you can provide me on 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] Is BitmapRegionDecoder fast enough?

2012-02-02 Thread sebastian_bugiu
I would like to use decodeRegion method in my game to only open a
region covering the screen from a larger bitmap. The idea is that I
would like to roam the map using the direction buttons and decode only
the part that is visible every frame. Is the BitmapRegionDecoder class
fast enough for decoding a bitmap 20 times per second? Or will I get
bad framerate?

I am asking this since I don't have a real android device right now
and I only work in the emulator, which is slow anyway. Did any of you
tried this thing? Does it work?

-- 
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: Multiple APKs installed to the same location

2012-02-02 Thread BT
 I'd still be skeptical from a security perspective
Multiple jurisdictal authorities have approved our file authentication
technology.

 What kind of code do you need?
It's game display logic -- take commands from the game server 
display appropriately.  There are hundreds of games and they will not
all fit on a cell phone.  Players must be able to selectively download
them.  An individual game consists of code (Game.so) and assets, all
contained within a .zip file.

 It's not something you could encode into some bytecode like instruction 
language or dsl?
It doesn't matter that it's C++ code because it's running in a walled-
off sandbox anyway.  The worst-case scenario is someone else's app
tries to load  run our game code, but that will fail because they
cannot authenticate with our servers.

That doesn't mean Google will let me do it, just that it's not the
problem many think it is.

-BT

-- 
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: Multiple APKs installed to the same location

2012-02-02 Thread Kristopher Micinski
On Thu, Feb 2, 2012 at 2:52 PM, BT bunglestwan...@gmail.com wrote:
 I'd still be skeptical from a security perspective
 Multiple jurisdictal authorities have approved our file authentication
 technology.


Wow!  Very impressive!  There are certainly no problems, you shouldn't
have even bothered asking!

kris

-- 
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: Multiple APKs installed to the same location

2012-02-02 Thread Harri Smått
On Feb 2, 2012, at 9:52 PM, BT wrote:
 There are hundreds of games and they will not
 all fit on a cell phone.  Players must be able to selectively download
 them.  An individual game consists of code (Game.so) and assets, all
 contained within a .zip file.

So your goal is to create a separate market within one .apk file? AFAIK this 
might be doable using your main application's internal storage for example. 
But assuming this is doable, I'd guess it's easiest done without introducing 
multiple .apks but creating your own logics for dynamic game addition.

--
H

-- 
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] Eclipse: Switch between devices for testing

2012-02-02 Thread dev0708
I have several AVDs and one external phone (usb). I want to run apps
on all for testing.

I can't find in Eclipse where to set the device to use for a given
run. The first time I run an app it asks. But now I want to change.  I
see Run/Configure but that seems to only be for the target version,
not the device.

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] is there any open source gesture libraries in android

2012-02-02 Thread Sundi
Hi I have defined my own gestures in an android app.is this is the
only way to define gestures. are there any standard opensource
libraries which will already has the gestures raw 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


[android-developers] Re: Multiple APKs installed to the same location

2012-02-02 Thread Jan Burse

BT schrieb:

Can I create multiple .apk's that install ADDITIVELY to the same /data/
apps/MyApp location?

In my particular case I have add-on modules that are built as C++ NDK
share objects:  Feature1.so, Feature2.so, Feature3.so, etc.  I don't
know what these will be ahead of time and the user must be able to
selectively install only those features they want.

I'm pretty sure iOS does this with in-app purchases, but not sure how
to do it on Android?

Thanks,
BT



Theoretically:

android:sharedUserId
The name of a Linux user ID that will be shared with other 
applications. By default, Android assigns each application its own 
unique user ID. However, if this attribute is set to the same value for 
two or more applications, they will all share the same ID — provided 
that they are also signed by the same certificate. Application with the 
same user ID can access each other's data and, if desired, run in the 
same process.


http://developer.android.com/guide/topics/manifest/manifest-element.html#uid

android:process
The name of a process where all components of the application 
should run. Each component can override this default by setting its own 
process attribute.


By default, Android creates a process for an application when the 
first of its components needs to run. All components then run in that 
process. The name of the default process matches the package name set by 
the manifest element.


By setting this attribute to a process name that's shared with 
another application, you can arrange for components of both applications 
to run in the same process — but only if the two applications also share 
a user ID and be signed with the same certificate.


If the name assigned to this attribute begins with a colon (':'), a 
new process, private to the application, is created when it's needed. If 
the process name begins with a lowercase character, a global process of 
that name is created. A global process can be shared with other 
applications, reducing resource usage.


http://developer.android.com/guide/topics/manifest/application-element.html#proc

I didn't try (yet) ...

--
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] Eclipse: Switch between devices for testing

2012-02-02 Thread Harri Smått

On Feb 2, 2012, at 11:30 PM, dev0708 wrote:
 I can't find in Eclipse where to set the device to use for a given
 run. The first time I run an app it asks. But now I want to change.  I
 see Run/Configure but that seems to only be for the target version,
 not the device.

If you right-click on Eclipse project, select Run As -- Run 
Configurations.., you should find Target -tab where you can set deployment 
target as Manual. Using this setting there ought to be target device dialog 
every time you execute your application - including connected device if there's 
one.

--
H

-- 
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: Kindle Fire and Permissions

2012-02-02 Thread jtoolsdev
Does the app use the Google API instead of the Android API?  The Kindle 
Fire only has the Android API so if you built with the Google API it won't 
run or even install on a Kindle Fire or other tablets and devices that have 
on the Android API.

-- 
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: Eclipse: Switch between devices for testing

2012-02-02 Thread dev0708
Perfect, much thanks. I wish I could put back that hair I pulled out
over that problem.

-- 
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: Eclipse: Switch between devices for testing

2012-02-02 Thread dev0708
Worked perfect. Thank you much.

On Feb 2, 4:53 pm, Harri Smått har...@gmail.com wrote:

-- 
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: What do these errors mean (using Eclipse)?

2012-02-02 Thread atcal


On Feb 2, 3:41 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 On 02/02/2012 05:27 PM, atcal wrote:

  OK. So why is the documentation so misleading? View() is shown as a
  public method in teh android documentation.

 Not for me:

 http://developer.android.com/reference/android/view/View.html

 Public Constructors
         View
 http://developer.android.com/reference/android/view/View.html#View%28...(Context
 http://developer.android.com/reference/android/content/Context.htmlcontext)

 Simple constructor to use when creating a view from code.
         View
 http://developer.android.com/reference/android/view/View.html#View%28...(Context
 http://developer.android.com/reference/android/content/Context.htmlcontext,AttributeSet
 http://developer.android.com/reference/android/util/AttributeSet.htmlattrs)

 Constructor that is called when inflating a view from XML.
         View
 http://developer.android.com/reference/android/view/View.html#View%28...(Context
 http://developer.android.com/reference/android/content/Context.htmlcontext,AttributeSet
 http://developer.android.com/reference/android/util/AttributeSet.htmlattrs,
 int defStyle)
 Perform inflation from XML and apply a class-specific base style.

 I don't see an argument-less View() here.

 There is an argument-less constructor in the source:

 https://github.com/android/platform_frameworks_base/blob/master/core/...

 but it's access level is package, not public or protected, so
 application code won't be able to use it.

  Why is it not available to
  a subclass? Are you seriously telling me that the explanation for this
  is that I don't understand Java inheritance?

 I'm seriously telling you that the snippet in your original email looked
 like you used C++ constructor syntax, or something similar, and not Java
 syntax.



  (  super(context) passes the compiler but then crashes out at run
  time.

 If you're trying to create a custom view, please refer to this:

 http://developer.android.com/guide/topics/ui/custom-components.html

 In particular, it says:

 There is a form of the constructor that are called when the view is
 created from code and a form that is called when the view is inflated
 from a layout file. The second form should parse and apply any
 attributes defined in the layout file.

 The former is YourView(Context), the latter is YourView(Context,
 AttributeSet)

  Can anyone tell me the statement(s) I need to put in rather than
  refer me to a crash course.

 The link above should be a good start.

  I've already spent several hours reading
  the Oracle java course, so unless you have a specific course and
  chapter in mind the suggestion isn't very helpful. )

 I'll just put it here then:

 The syntax for calling the base class constructor from a derived class
 constructor, in Java, is:

 class Derived extends Base {

      public Derived(.. args here...)
      {
          super(... args here);
      }

 }

 and not:

 class Derived extends Base {

      public Derived(.. args here...)
      {
          Base(... args here);
      }

 }

 or:

 class Derived extends Base {

      public Derived(.. args here...) : Base (... args here... )
      {
      }

 }

 Why is this? Java doesn't have MI like C++, so it's not necessary to
 explicitly specify which of the base classes you're referring to - just
 super is unambiguous.

 And actually, in C++, your original code snippet would be creating a
 temporary View object on the stack, rather than initializing the base class.

 -- Kostya

Kostya,

Thanks for all this. I will follow up the links because I'm sure they
will be useful for my next step.

Just to put the record straight, I've resolved the problem I was
having and it was nothing to do with a misunderstanding of Java - it
was an android issue. My view subclass was being used in an activity
subclass and the class loader was failing when my activity class tried
to instantiate the view. When I added the activity to the xml manifest
that error went away. I hadn't previously edited the manifest because
I did not expect to intent the activity to create a separate thread
at this stage of development and testing, but obviously that was a
mistake. An android mistake.

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

2012-02-02 Thread Franzi Roesner
Hi,

I'm wondering about the Java SecurityManager within Android. I
understand that it doesn't provide the isolation/security required by
Android (and that java.lang.System throws an exception if you try to
setSecurityManager), but I'm wondering what the consequences of using
it (in addition to existing mechanisms) would be. In particular, I'm
modifying Android for some research
purposes and I'd like to be able to prevent the use of reflection to
access non-public methods, which can usually be done with a
SecurityManager. Is there another way to do this?

Thanks!
Franzi

-- 
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: What do these errors mean (using Eclipse)?

2012-02-02 Thread Kostya Vasilyev

On 02/03/2012 02:34 AM, atcal wrote:

Kostya,

Thanks for all this. I will follow up the links because I'm sure they
will be useful for my next step.


You're wellcome.



Just to put the record straight, I've resolved the problem I was
having and it was nothing to do with a misunderstanding of Java


Ok, my apologies if I was wrong.

-- Kostya

--
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: Newly installed widgets are not runnable on Honeycomb

2012-02-02 Thread phoku
Is there anything new about this bug? I am developing a widget-only app, 
i.e. I do not have any activity to present to the user. How can I allow him 
to add my widget without rebooting?

-- 
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: Newly installed widgets are not runnable on Honeycomb

2012-02-02 Thread Mark Murphy
On Thu, Feb 2, 2012 at 6:01 PM, phoku mboeh...@fh-muenster.de wrote:
 Is there anything new about this bug?

It is not a bug.

 I am developing a widget-only app,

You can no longer do that.

 i.e. I do not have any activity to present to the user. How can I allow him
 to add my widget without rebooting?

Put in an activity to present to the user. This is unavoidable,
AFAICT, on Android 3.1+. You will need it at first install, and you
will need it if the user elects to force-stop your application.

-- 
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 Android Development_ Version 3.7 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: In-app purchase charged credit card multiple times

2012-02-02 Thread Keith Johnston
The 1 dollar charge finally resolved to 99 cents. So all is well.

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

2012-02-02 Thread Mark Murphy
Probably not at the SDK level. You may have better luck inquiring on
one of the Google Groups for the open source project
(http://source.android.com).

On Thu, Feb 2, 2012 at 5:38 PM, Franzi Roesner franzi.roes...@gmail.com wrote:
 Hi,

 I'm wondering about the Java SecurityManager within Android. I
 understand that it doesn't provide the isolation/security required by
 Android (and that java.lang.System throws an exception if you try to
 setSecurityManager), but I'm wondering what the consequences of using
 it (in addition to existing mechanisms) would be. In particular, I'm
 modifying Android for some research
 purposes and I'd like to be able to prevent the use of reflection to
 access non-public methods, which can usually be done with a
 SecurityManager. Is there another way to do this?

 Thanks!
 Franzi

 --
 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 Android Development_ Version 3.7 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] android how to visit those files on pc server by wifi

2012-02-02 Thread James Black
Call a server on a PC, or look at iCloud and copy their approach.
On Feb 2, 2012 2:03 AM, silvan_liu silvanliuandr...@gmail.com wrote:

 android how to visit those files on pc server by wifi?

 --
 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] MS SQL connection

2012-02-02 Thread James Black
MS should have examples using soap, but you may want to use REST instead.

Look for WCF and MSSQL on Google.
On Feb 2, 2012 7:40 AM, anand jh jhanan...@gmail.com wrote:

 can u give a sample code web service for accessing database

 --
 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: NFC Secure Element

2012-02-02 Thread mickae1
theoritacally is it possible to change the chip with one that we know
the key ? Will it be difficult to access to the chip ?

On Feb 2, 7:19 am, Fernando Miguélez fernando.migue...@gmail.com
wrote:
 Keys are used in raw communication through APDUs







 On Wed, Feb 1, 2012 at 7:46 PM, malls masubha...@gmail.com wrote:
  I don't see any interface of passing the keys to open secure element in
  the android code. I am not sure how many people claims that you need google
  Keys to open SecureElement. May be I am missing something.

   --
  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: Waypoints with Google Maps API

2012-02-02 Thread alexslx
I'll take a look on MyTracks source code.

Thanks!

On Jan 30, 6:16 pm, Spiral123 cumis...@gmail.com wrote:
 study the MyTracks source.

 On Jan 29, 3:29 pm, alexslx alex_...@msn.com wrote:







  Hi folks,

  I'm searching in the web how to trace route with multiple waypoints,
  but i just found how to do it using Google Maps API for web
  (javascript). I also looked for gmaps android api, but didn't found
  nothing.

  I want to trace an route that my device is going, via GPS.

  Someone knows where i can find some tech details how to do it, or some
  example?

-- 
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: Waypoints with Google Maps API

2012-02-02 Thread alexslx
It means show with a line or something between multiple waypoints,
like when you trace a destination on GPS.

On Jan 30, 4:58 pm, James Black planiturth...@gmail.com wrote:
 What do you mean by tracing a route?

 To handle multiple way points I keep data in an array and let the user know
 when they are near the waypoint.
 On Jan 30, 2012 11:38 AM, alexslx alex_...@msn.com wrote:







  Hi folks,

  I'm searching in the web how to trace route with multiple waypoints,
  but i just found how to do it using Google Maps API for web
  (javascript). I also looked for gmaps android api, but didn't found
  nothing.

  I want to trace an route that my device is going, via GPS.

  Someone knows where i can find some tech details how to do it, or some
  example?

  --
  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: Newly installed widgets are not runnable on Honeycomb

2012-02-02 Thread David Ross
In my Widget I have a dummy configuration App that does as the
earlier poster said, it just runs, does some internal housekeeping
like setting up default preferences and returns the provided
AppWidgetId and RESULT_OK:

Intent resultValue = new Intent();
resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
appWidgetId);
setResult(RESULT_OK, resultValue);

It does not even inflate a layout, after setting the result it does a
finish(). It is an invisible configuration activity so that the user
gets the effect of the Widget appearing instantly after selecting it
for installation.

Are you saying that does not work?


On Feb 3, 7:06 am, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Feb 2, 2012 at 6:01 PM, phoku mboeh...@fh-muenster.de wrote:
  Is there anything new about this bug?

 It is not a bug.

  I am developing a widget-only app,

 You can no longer do that.

  i.e. I do not have any activity to present to the user. How can I allow him
  to add my widget without rebooting?

 Put in an activity to present to the user. This is unavoidable,
 AFAICT, on Android 3.1+. You will need it at first install, and you
 will need it if the user elects to force-stop your application.

 --
 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.7 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: Newly installed widgets are not runnable on Honeycomb

2012-02-02 Thread David Ross
By the way, I went the invisible instant Activity path for the
Widget configuration because there are a number of horrible use-cases
with the Widget installation process that Android does not handle
properly and spending any time in the config activity can result in
bad things like ghost widgets (two types of ghost, one is where the OS
thinks the widget is there but it is not, the other is where my App
thinks the widget is there but is it not). These can be caused by
things like not enough home screen space or unintented power down (eg
battery fail) before the config activity returns the RESULT_OK. It
took quite some time to nut out these rare use-cases.

On Feb 3, 8:32 am, David Ross grand...@vacuumpunk.com wrote:
 In my Widget I have a dummy configuration App that does as the
 earlier poster said, it just runs, does some internal housekeeping
 like setting up default preferences and returns the provided
 AppWidgetId and RESULT_OK:

         Intent resultValue = new Intent();
         resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
 appWidgetId);
         setResult(RESULT_OK, resultValue);

 It does not even inflate a layout, after setting the result it does a
 finish(). It is an invisible configuration activity so that the user
 gets the effect of the Widget appearing instantly after selecting it
 for installation.

 Are you saying that does not work?

 On Feb 3, 7:06 am, Mark Murphy mmur...@commonsware.com wrote:

  On Thu, Feb 2, 2012 at 6:01 PM, phoku mboeh...@fh-muenster.de wrote:
   Is there anything new about this bug?

  It is not a bug.

   I am developing a widget-only app,

  You can no longer do that.

   i.e. I do not have any activity to present to the user. How can I allow 
   him
   to add my widget without rebooting?

  Put in an activity to present to the user. This is unavoidable,
  AFAICT, on Android 3.1+. You will need it at first install, and you
  will need it if the user elects to force-stop your application.

  --
  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.7 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: Newly installed widgets are not runnable on Honeycomb

2012-02-02 Thread Mark Murphy
On Thu, Feb 2, 2012 at 7:32 PM, David Ross grand...@vacuumpunk.com wrote:
 Are you saying that does not work?

It should not work, because the user can't add the app widget to bring
up the configuration activity in the first place. The app widget does
not appear in the launcher until the user has done something to bring
your app out of the stopped state, such as launching an activity of
yours from the launcher.

It appears as though a reboot might also allow the app widget to show
in the launcher, though I have not played with this scenario. A reboot
definitely does not generally allow stopped apps to respond to
broadcasts, though.

-- 
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.4
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: r16 and eclipse - debugger and relaunch is hosed

2012-02-02 Thread Paul Shirley
I created a dummy AVD with minimum RAM size, then launch it from a command 
line. On my XP system that never manages to start *but* I can then launch 
another AVD that does. It's important to do this from a CLI because you can 
Ctrl-C to kill both emulator instances, from Eclipse it's not possible to 
kill the dummy instance and *bad things* happen.

It might help with your problem.

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

2012-02-02 Thread Franzi Roesner
I'll try that, thanks!


Franzi

On Feb 2, 3:07 pm, Mark Murphy mmur...@commonsware.com wrote:
 Probably not at the SDK level. You may have better luck inquiring on
 one of the Google Groups for the open source project
 (http://source.android.com).









 On Thu, Feb 2, 2012 at 5:38 PM, Franzi Roesner franzi.roes...@gmail.com 
 wrote:
  Hi,

  I'm wondering about the Java SecurityManager within Android. I
  understand that it doesn't provide the isolation/security required by
  Android (and that java.lang.System throws an exception if you try to
  setSecurityManager), but I'm wondering what the consequences of using
  it (in addition to existing mechanisms) would be. In particular, I'm
  modifying Android for some research
  purposes and I'd like to be able to prevent the use of reflection to
  access non-public methods, which can usually be done with a
  SecurityManager. Is there another way to do this?

  Thanks!
  Franzi

  --
  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 Android Development_ Version 3.7 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] Unable to open database file?

2012-02-02 Thread Zsolt Vasvari
Hi, I am using ACRA and get an average of one report of this kind a day:
 
android.database.sqlite.SQLiteException: unable to open database file
at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
at android.database.sqlite.SQLiteDatabase.init(SQLiteDatabase.java:1956)
at 
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:902)
 
This is a one time error, if the user tries again, it works.  It seems to 
come from all kinds of users on all kinds of devices on different SDK 
levels.
 
I open my database once and I store the connection in a static object.  
 
I suspect a bug in my code somehow, but I am at a loss.  Anybody with any 
ideas, or seen this error happen?
 
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: Newly installed widgets are not runnable on Honeycomb

2012-02-02 Thread David Ross
Not sure I understand that. My manifest has three activities:

activity
android:label=@string/app_name
android:name=.WidgetDummyConfiguration
intent-filter
action
android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
 /activity
activity
android:label=@string/app_name
android:name=.WidgetConfiguration
intent-filter
action android:name=android.intent.action.MAIN/
data android:scheme=com.vacuumpunk.CDTBD2012 /
category
android:name=android.intent.category.DEFAULT /
/intent-filter
 /activity
activity
android:label=@string/app_name
android:name=.WidgetInstall
intent-filter
action
 
android:name=android.appwidget.action.APPWIDGET_CONFIGURE /
category
android:name=android.intent.category.DEFAULT /
/intent-filter
/activity

The Activity WidgetDummyConfiguration is called when the APK has been
downloaded from the market and run. It does nothing (literally) - the
onCreate() method has only two lines of code:

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
finish();
}

The .WidgetInstall Activity is referenced in the widget config file
pointed to in the Manifest:

appwidget-provider
xmlns:android=http://schemas.android.com/apk/res/android;
android:minWidth=294dp
android:minHeight=146dp
android:initialLayout=@layout/widget
android:configure= com.vacuumpunk.CDTBD2012.WidgetInstall
/

When the user installs the Widget on the home screen, the
Activity .WidgetInstall is used and again it is invisible, but it does
do some setting up of default preferences and then just calls
finish(). That's to handle the bad use-cases that Android doesn't
handle so well.

My AppWidgetProvider then registers a PendingIntent on the click
listener for the RemoteView which fires up the third activity
(.WidgetConfiguration) which is the business part of the UI behind the
widget.

I guess what you mean is that the system must first run the invisible
do-nothing activity of .WidgetDummyInstall in order for the manifest
contents to be registered with the system which then means the Widget
will be entered into the list of available Widgets?

In my production code I actually present a basic dialog when the App
is run that explains how to install the Widget and then exits. The
user can only access my App's functionality via a home screen Widget.


On Feb 3, 8:42 am, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Feb 2, 2012 at 7:32 PM, David Ross grand...@vacuumpunk.com wrote:
  Are you saying that does not work?

 It should not work, because the user can't add the app widget to bring
 up the configuration activity in the first place. The app widget does
 not appear in the launcher until the user has done something to bring
 your app out of the stopped state, such as launching an activity of
 yours from the launcher.

 It appears as though a reboot might also allow the app widget to show
 in the launcher, though I have not played with this scenario. A reboot
 definitely does not generally allow stopped apps to respond to
 broadcasts, though.

 --
 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.4
 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 compile .aidl file that references a class in an android library

2012-02-02 Thread James Black
I have a library that my application uses.

In one version of my program I am going to have an Android Service, and I
am trying to compile the .aidl file, but, it references a class in my
android library, and now I am getting an error that it can't find the file.

I am using Eclipse for the compilation.

This is what my .aidl file looks like:

package com.myproject;

import com.mylibrary.model.Road;   //  == I am getting the error on this
line
import android.location.Location;

interface MyService {
java.util.ListRoad retrieveNewPath();

Location retrieveCurrentLocation();
}

-- 
I know that you believe you understand what you think I said, but I'm not
sure you realize that what you heard is not what I meant.
- Robert McCloskey

-- 
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] App activation by Voice

2012-02-02 Thread Dhaval Varia
I am having two questoons

1 . Is there any way to call my application by voice?

2. How to update my software,which is already there on market? Actually i
wanted to understand,how the software update taking place?

-- 
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] hi all

2012-02-02 Thread chowdary nani
Hi All,
I am working on xml parsing.
Here i am able to parse the xml page which is on server when i have given
the url directly.
but i need for dynamically created url
following is my code.
String tod = IPH;
final Random myRandom = new Random();
String procod = String.valueOf(myRandom
.nextInt( -  + 1));

shopapi = 
http://api.shopvisible.com/ProductService.asmx/CreateBasicProduct?ClientName=IncipioBespokeguid=fa63b21c-115a-e011-96ff-0026b95352bbInboundProductXML=
;
shopapi = shopapi.concat(Product);
shopapi = shopapi.concat(ProductPartNoBCC-);
shopapi = shopapi.concat(tod);
shopapi = shopapi.concat(-);
shopapi = shopapi.concat(procod);
shopapi = shopapi.concat(/ProductPartNo);
shopapi = shopapi.concat(ProductUPCbespoke/ProductUPC);
shopapi = shopapi
.concat(ProductCodebespoke Custom Case/ProductCode);
shopapi = shopapi
.concat(NameCustomized
Case/NameBrand23/BrandSubCategory1/SubCategory);
shopapi = shopapi.concat(ImageName);
shopapi = shopapi.concat(the_string_response1);
shopapi = shopapi.concat(/ImageName);
shopapi = shopapi.concat(Price29.99/Price);
shopapi = shopapi
.concat(Orderabletrue/OrderableQuantity50/QuantityWeight0.0/WeightSubWeight3/SubWeight);

shopapi = shopapi.concat(CustomText/CustomText);
shopapi = shopapi.concat(Xtra2/Xtra2);
shopapi = shopapi.concat(/Product);

SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser sp = spf.newSAXParser();
XMLReader xr = sp.getXMLReader();

/** Send URL to parse XML Tags */
// String a =
// 
http://api.shopvisible.com/ProductService.asmx/CreateBasicProduct?ClientName=IncipioBespokeguid=fa63b21c-115a-e011-96ff-0026b95352bbInboundProductXML=%3CProduct%3E%3CProductPartNo%3EBCC-IPH-9809%3C/ProductPartNo%3E%3CProductUPC%3Ebespoke%3C/ProductUPC%3E%3CProductCode%3Ebespoke%20Custom%20Case%3C/ProductCode%3E%3CName%3ECustomized%20Case%3C/Name%3E%3CBrand%3E23%3C/Brand%3E%3CSubCategory%3E1%3C/SubCategory%3E%3CImageName%3Ehttp://ncpo.cc/android/bespokecaseimages/553005.jpg%3C/ImageName%3E%3CPrice%3E29.99%3C/Price%3E%3COrderable%3Etrue%3C/Orderable%3E%3CQuantity%3E50%3C/Quantity%3E%3CWeight%3E0.0%3C/Weight%3E%3CSubWeight%3E3%3C/SubWeight%3E%3CCustomText%3E%3C/CustomText%3E%3CXtra2%3E%3C/Xtra2%3E%3C/Product%3E
;
// URL sourceUrl = new URL(a);
URL sourceUrl = new URL(shopapi);

/** Create handler to handle XML Tags ( extends DefaultHandler ) */
try {
XmlhandlerForShopapi myXMLHandler = new XmlhandlerForShopapi();
xr.setContentHandler(myXMLHandler);
xr.parse(new InputSource(sourceUrl.openStream()));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ParserConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

please help me.

Thanks
Naveen.

-- 
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] MS SQL connection

2012-02-02 Thread Jagruti Sangani
use the php for connecting mysql database and android.

-- 
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] Eclipse: Switch between devices for testing

2012-02-02 Thread Jagruti Sangani
Once you connect your device and pc then run your android application from
start.Then it will automatically detect the your device instead of avd
version.Select your device and continue.

-- 
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 : SMS application

2012-02-02 Thread Jagruti Sangani
HI,
Can you send me your application full code?Because I really want that
application for my project training.
Thanks in advance.

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

Re: [android-developers] ACTION_SCREEN_ON when phone call comes in

2012-02-02 Thread Jagruti Sangani
hello,
I have same like problem.I want the notification when the call will come.lI
am using the SIP demo application from net.if anybody have idea then plz
inform  me.

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