Re: [android-developers] about intents.

2011-10-01 Thread anik ralhan
http://www.warriorpoint.com/blog/2009/05/24/android-how-to-switch-between-activities/

I think this may help you.


On Wed, Sep 28, 2011 at 6:43 PM, aditi badwe  wrote:

> hi if i am building the basic application for android in main .java
> file in src folder then i have given a button in xml file...after
> clicking on the button how could i go to next screen i.e screen 2??
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this 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




-- 
*
--
Anik Ralhan*
*3rd year Student *
*Chitkara University*

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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] Variable instruction counts of Android applications

2011-10-01 Thread Kristopher Micinski
On Sat, Oct 1, 2011 at 1:08 PM, Jack Harvard  wrote:
> Hi,
>
> I find that the same application running on Android has different
> instruction counts every time it's run, and the difference in
> instruction counts can be 2x or ~10 billion instructions, and I'm
> trying to understand the reasons for that?
>
> Obvious reasons might be JIT and JVM, maybe Android browser has any
> time dependent code as well? The Android source code tree is down for
> some time, I don't have access to the source code.
>

Unsure, trace based JIT, so optimizes based on what code is actually *used*.

Some of it is mirrored on github, but even if you read dalvik, finding
the answer to this question might take a long time (because it's just
plain complicated to understand the source.)

Kris

> Thanks,
> Jack
>

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

2011-10-01 Thread Kristopher Micinski
Unrelated to onPause, that's just for UI threads.  (Well,
specifically, Activity and friends (subclasses))

Do a Thread.sleep()?

http://stackoverflow.com/questions/1520887/how-to-pause-sleep-thread-or-process-in-android

Handlers, and Timers seem to be good (I'd recommend Handler.)

Kris

On Sat, Oct 1, 2011 at 11:42 PM, bob  wrote:
> How do you suspend a Thread on Android?  I have a background thread,
> and I need to write the onPause method.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this 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] suspend a Thread

2011-10-01 Thread bob
How do you suspend a Thread on Android?  I have a background thread,
and I need to write the onPause method.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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] Receive Broadcast when Media Player is open.

2011-10-01 Thread bhaskar Kadam
I want to start my application when user starts the Media player. I
think it may work by receiving Broadcast of the Media player open.
But don't know how exact it will be done.. Anybody have better idea
than this? Please reply... thanx

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: LVL - Checking licence validity from a server

2011-10-01 Thread Ben
For anyone else having this problem, the issue was with the response
data.

Signed data comes in looking like this if it's a TEST EMAIL account:-
0|136040138|com.foo.bar|1|ANlOHQOShF3uJUwv3Ql+fbsgEG9FD35Hag==|
123456789012

if it is a genuine MARKET account
0|136040138|com.foo.bar|1|ANlOHQOShF3uJUwv3Ql+fbsgEG9FD35Hag==|
123456789012:GR=10&VT=0987654321>=1234567890

When the signed data is validated, the data after the ':' is stripped,
so trying to re-validate the data will fail in the case of the market
account, and pass in the case of the test email account.

Regards,
Ben

On Sep 30, 11:37 am, Ben  wrote:
> I have an app that needs to request a key from a remote server. It
> authenticates from the app with lvl, then communicates with the server
> who also checks against the market (a second step in the chain to
> prevent piracy). It authenticates using the responseData and signature
>
> In test this all works a-ok. When I launched my app, this did not
> work:
>
> the app validated with lvl without issue and requested an api key from
> the remote server
>
> the remote server tries to check with lvl and returns false UNLESS the
> email address is in test accounts.
>
> I am testing with the following 
> code:-http://code.google.com/p/android-market-license-verification/
>
> Can anyone shed some light as to why it is not working? Do I need to
> validate using a different key maybe?
>
> Regards,
> Ben

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: Loading soundpool and music in activity A and calling in Activity B

2011-10-01 Thread Doug
You can store data to share between activities in an an object using
the singleton pattern.

Doug

On Sep 30, 7:22 pm, R S  wrote:
> Hi!
>
> Right now I am loading my tiny music clips in the same class that I am using
> it in like this:
> 
> public static final int A1 = 1;
>  public static final int A3 = 3;
> private SoundPool soundPool;
> private HashMap soundPoolMap;
>  soundPool = new SoundPool(5, AudioManager.STREAM_MUSIC, 100);
>  soundPoolMap = new HashMap();
>
> soundPoolMap.put(A1,soundPool.load(GameScreen_bugfix.this, R.raw.a, 1));
>  soundPoolMap.put(A3,soundPool.load(GameScreen_bugfix.this, R.raw.b, 1));
> //etc
>
> AudioManager mgr = (AudioManager)
> GameScreen_bugfix.this.getSystemService(Context.AUDIO_SERVICE);
> float streamVolumeCurrent = mgr.getStreamVolume(AudioManager.STREAM_MUSIC);
>  float streamVolumeMax = mgr.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
> float volume = streamVolumeCurrent / streamVolumeMax;
>
> try {
> soundPool.play(soundPoolMap.get(sound), volume, volume, 1, 0,
>  1f);} catch (Exception e) {
>
> e.printStackTrace();
>  }
> 
>
> Can someone please tell me how I can load all the soundclips in Activity A,
> and then call them in Activity B?
>
> Thanks!
> Ryan

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


[android-developers] Re: Force the whole main activity to redraw

2011-10-01 Thread Doug
On Sep 30, 11:03 am, New Developer  wrote:
> I have an activity which has my own media class which extends ImageView  
> with some special functions.
> I use this to play a video frame by frame using MediaMetadataRetrieve
> The problem is that it only shows the first frame even  though the code
> does step through and collect multiple frames and bitmaps and places
> them on the ImageView.
>
> The code, does but visually only the first frame ever shows.  Show How
> can I force the whole Activity to redraw .

You don't need to draw the whole Activity over.  If you set a bitmap
into an ImageView, Android will render that after your code completes
its current run and allows the UI thread to process that change.  You
need to put each frame into the ImageView followed by some delay.  You
can use a Handler to schedule delays on the UI thread.

Doug

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: Creating database with adb

2011-10-01 Thread Doug
On Sep 30, 12:11 am, Andi  wrote:
> My problem is i have to create a database and put it in the folder off
> my application via adb.

Or you could put it on the sd card, right?  That makes more sense than
trying to inject data into app private space using anything but the
app itself.

> When I try to create the database by the application itself it works
> fine, but I have to create the database via adb, thats important to
> me.

If you have to create your sqlite database outside of Android to use
it inside Android, you have to create the android_metadata table that
it would normally create for you.

Doug

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


Re: [android-developers] Re: How do I report a bug to htc?

2011-10-01 Thread Miguel Morales
You need to use a Lock such as:
http://developer.android.com/reference/java/util/concurrent/locks/ReentrantLock.html
This sounds like a race conditions, as others have pointed out.  These
are usually the hardest to narrow down.

Static variables are not a good idea in general unless you know
exactly what you're doing.

Try adding a lock around your static object, like:

private static Object mMyProtectedVar;
private final Lock mLock = new ReentrantLock();

Then before touching the variable, ALWAYS use the lock like so:

mLock.lock();
mMyProtectedVar.something = something;
mLock.unlock();

Java provides some keywords for making variables and methods thread
safe, although I find a lock to be really clear as to its intended
purpose.


On Sat, Oct 1, 2011 at 6:42 PM, Doug  wrote:
> On Sep 27, 4:23 pm, sebastian_bugiu
>  wrote:
>> I have an application in android market that does not work on htc
>> desire and I am positive the issue is not in my code. Basically I have
>> a private static final field that is initialized to a reference to an
>> object and yet whenever I access that object from another thread it
>> throws a NullPointerException even though it is initialized.
>
> Are you sure you were really using private static final?  Static
> finals are initialized when the class loads and will never change as
> long as that class remains loaded.  All threads would be seeing the
> same value the entire time.
>
> The other code you showed can have a race condition in that first
> thread that assigns status may not have reconciled its local copy of
> the new Status object by the time the second thread tries to access
> it.  You would need to synchronize both accesses or use volatile to
> keep them in sync.
>
> You are almost certainly not running into an HTC error.
>
> Doug
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this 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



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx

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

2011-10-01 Thread Doug


On Sep 27, 3:44 pm, "daniel_nyb...@hotmail.com"
 wrote:
> Help Me, please !
> I'm pretty new on Android, but I've been struggeling with this code 10
> hours now,  and needs help.
> I am trying to read the data from a web site, (in string format).
> The problem is that, after executed the row "response =
> client.execute(request);" it jumps directly to "}finally{"
> WHY

The line of code threw an exception and you didn't catch it, so it
jumped to the finally block.  After that, the caller of this function
would have to handle the exception because you declared this method as
"throws Exception" (which is usually a bad idea unless you really know
what you're doing).  Try taking out the "throws Exception" and
handling exceptions in the method itself.

Doug

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: Faking Audio Recording from Microphone on Android NDK.

2011-10-01 Thread Doug
On Sep 29, 7:48 am, Ümit Uzun  wrote:
> I want to fake audio recording from main parts on Native Android
> sources. I have looked to AudioRecord.cpp, AudioFlinger.cpp and
> StageFrightRecorder.cpp.
> But I can't find the critical and target code block to change recorded
> audio buffer to silent or mixed meaningless audio buffer.

What do you mean by "fake audio recording"?

You can do real audio recording from the NDK using JNI to instantiate
and operate a java AudioRecord object.  The source code you're looking
at is not part of the exposed NDK API so you are asking for trouble if
you try to dig around in there in your app.

Doug

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


[android-developers] Re: How do I report a bug to htc?

2011-10-01 Thread Doug
On Sep 27, 4:23 pm, sebastian_bugiu
 wrote:
> I have an application in android market that does not work on htc
> desire and I am positive the issue is not in my code. Basically I have
> a private static final field that is initialized to a reference to an
> object and yet whenever I access that object from another thread it
> throws a NullPointerException even though it is initialized.

Are you sure you were really using private static final?  Static
finals are initialized when the class loads and will never change as
long as that class remains loaded.  All threads would be seeing the
same value the entire time.

The other code you showed can have a race condition in that first
thread that assigns status may not have reconciled its local copy of
the new Status object by the time the second thread tries to access
it.  You would need to synchronize both accesses or use volatile to
keep them in sync.

You are almost certainly not running into an HTC error.

Doug

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: XML DOM Parser works in JAVA, Crashes Android App, Now XMLPullParser

2011-10-01 Thread Dancing Fingers
I figured it out.  It was a combination of not accessing the correct
Android resources and faulty data structure.  The correct code follows
(hope this helps someone else):


public void parseCharXmlFile(){
Chars myCh;
String nameTag= "";

try {
Resources res = getResources();
int eventType = parser.getEventType();
boolean done = false;

while (eventType != XmlPullParser.END_DOCUMENT && !done 
){
switch (eventType){
case XmlPullParser.START_DOCUMENT:
chars.clear();
break;
case XmlPullParser.START_TAG:
nameTag = parser.getName();
System.out.println("Reading start tag " + 
nameTag);
if (nameTag.equalsIgnoreCase("ch") ) {
myCh = new Chars(' ',0);

myCh.setTheChar(parser.nextText().charAt(1));
}  else if 
(nameTag.equalsIgnoreCase("count")) {

myCh.setCount(Integer.parseInt(parser.nextText()));
}
 break;
case XmlPullParser.END_TAG:
nameTag = parser.getName();
if (nameTag.equalsIgnoreCase("Chars") ){
done = true;
} else if (nameTag.equalsIgnoreCase("ChPair"))
{
chars.add(myCh);
}
break;
}  // event switch end
eventType = parser.next();
} // end while
} catch (XmlPullParserException ex) {
System.out.println(ex);
} catch (IOException e) {
System.out.println(e);
}
}

Chris

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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] UIToolbar/Menubar for Android - when?

2011-10-01 Thread Anuj Goyal
Will Ice Cream Sandwich have built in menubars?

"Building an Android equivalent to the iPhone toolbar" 
  http://www.cannonade.net/blog.php?id=1521   

http://www.youtube.com/watch?v=M1ZBjlCRfz0&feature=player_detailpage#t=2572s



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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 are peoples' thoughts on developing for Kindle Fire

2011-10-01 Thread Christopher Van Kirk
Their app pricing policy is ridiculous. Last time I looked it was 20% of 
your asking price or 70% of the sale price, whichever is greater.  How 
do you work with that?


On 10/2/2011 5:29 AM, John Coryat wrote:
>From what I understand, the Fire lacks a GPS and has none of the 
usual Google stuff like maps, C2DM and the market. That makes it 
pretty much a dead duck in my book.


If Amazon comes around and can make a deal with Google to become a 
standard device, then things will be different. We won't have to 
develop for the Fire, it will just be. Personally, I like that better 
than developing a fork for a single device.


-John Coryat, USNaviguide LLC
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: What are peoples' thoughts on developing for Kindle Fire

2011-10-01 Thread John Coryat
>From what I understand, the Fire lacks a GPS and has none of the usual 
Google stuff like maps, C2DM and the market. That makes it pretty much a 
dead duck in my book.

If Amazon comes around and can make a deal with Google to become a standard 
device, then things will be different. We won't have to develop for the 
Fire, it will just be. Personally, I like that better than developing a fork 
for a single device.

-John Coryat, USNaviguide LLC

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: LVL and InApp Billing

2011-10-01 Thread John Coryat
You didn't say if you are using managed or unmanaged items. If you're using 
managed, then perhaps LVL might be useful. If you're using unmanaged, then 
you have a server back end to distinguish between real and pirate charges.

-John Coryat

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

2011-10-01 Thread Kristoffer
Thanks so much for the help.

I works great now.

On 1 Okt, 22:37, Kostya Vasilyev  wrote:
> Sure. Toast.makeText(context, int, ...) takes a string resource id as
> its second parameter.
>
> What you want is:
>
> Toast.makeText(context, "The value is: " + String.valueOf(msg.arg1), ... );
>
> Or msg.arg2, or msg.what, depending on what exactly you'd like to log.
>
> And, as a debugging aid, you might as well use logging:
>
> Log.i("MyApp", "The value of x is " + String.valueOf(x));
>
> This will get printed into the logcat, which can be viewed in Eclipse's
> DDMS perspective (or outside: "adb logcat" in your operating system's
> command line window).
>
> -- Kostya
>
> 02.10.2011 0:17, Kristoffer пишет:
>
>
>
>
>
> > Thanks for the reply, but it gives me this error message:
>
> > android.content.res.Resources$NotFoundException:String resource ID
> > #0x1
>
> > Did i do it wrong?
>
> > this is the part i changed
>
> > msg.arg1 = 1;
>
> > - - - - -
>
> > Toast.makeText(getApplicationContext(), msg.arg1 ,
> > Toast.LENGTH_LONG).show();
>
> > On 1 Okt, 21:57, Mark Murphy  wrote:
> >> Don't do:
>
> >> msg.what=1
>
> >> Do:
>
> >> msg.arg1=1
>
> >> Then, on the receiving side, your value will be:
>
> >> msg.arg1
>
> >> On Sat, Oct 1, 2011 at 3:29 PM, Kristoffer  
> >> wrote:
> >>> Hello.
> >>> Iam having some trouble sending message from a thread back to the
> >>> "main" thread.
> >>> I just need to send a integer just so i know what just happend in the
> >>> thread.
> >>> This is what i use right now,
> >>> Message msg = Message.obtain();
> >>> msg.what = 1;
> >>> progressHandler.sendMessage(msg);
> >>> - - - - -
> >>> private Handler progressHandler = new Handler() {
> >>> @Override
> >>> public void handleMessage(Message msg) {
> >>> Toast.makeText(getApplicationContext(), msg.toString(),
> >>> Toast.LENGTH_LONG).show();
> >>> This will show me:
> >>> { what=1 when=somenumbers }
> >>> Is there a way so i just could "grabb" the Int 1 in this case?
> >>> Iam then going to build if statments depends on the integer
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Android Developers" group.
> >>> To post to this group, send email to android-developers@googlegroups.com
> >>> To unsubscribe from this 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.6 Available!
>
> --
> 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] Slidingdrawer hides last element of listview.

2011-10-01 Thread charlie babitt
Yes, I already tried this. Setting this will make the handle of the sliding 
drawer disappear and the list takes the full space. Well, now I see 
everything from the list but the sliding drawer is gone...

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

2011-10-01 Thread Kostya Vasilyev
Sure. Toast.makeText(context, int, ...) takes a string resource id as 
its second parameter.


What you want is:

Toast.makeText(context, "The value is: " + String.valueOf(msg.arg1), ... );

Or msg.arg2, or msg.what, depending on what exactly you'd like to log.

And, as a debugging aid, you might as well use logging:

Log.i("MyApp", "The value of x is " + String.valueOf(x));

This will get printed into the logcat, which can be viewed in Eclipse's 
DDMS perspective (or outside: "adb logcat" in your operating system's 
command line window).


-- Kostya

02.10.2011 0:17, Kristoffer пишет:

Thanks for the reply, but it gives me this error message:

android.content.res.Resources$NotFoundException:String resource ID
#0x1

Did i do it wrong?

this is the part i changed

msg.arg1 = 1;

- - - - -

Toast.makeText(getApplicationContext(), msg.arg1 ,
Toast.LENGTH_LONG).show();

On 1 Okt, 21:57, Mark Murphy  wrote:

Don't do:

msg.what=1

Do:

msg.arg1=1

Then, on the receiving side, your value will be:

msg.arg1





On Sat, Oct 1, 2011 at 3:29 PM, Kristoffer  wrote:

Hello.
Iam having some trouble sending message from a thread back to the
"main" thread.
I just need to send a integer just so i know what just happend in the
thread.
This is what i use right now,
Message msg = Message.obtain();
msg.what = 1;
progressHandler.sendMessage(msg);
- - - - -
private Handler progressHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
Toast.makeText(getApplicationContext(), msg.toString(),
Toast.LENGTH_LONG).show();
This will show me:
{ what=1 when=somenumbers }
Is there a way so i just could "grabb" the Int 1 in this case?
Iam then going to build if statments depends on the integer
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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.6 Available!


--
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] Re: sendMessage and handleMessage

2011-10-01 Thread Kristoffer
Thanks for the reply, but it gives me this error message:

android.content.res.Resources$NotFoundException:String resource ID
#0x1

Did i do it wrong?

this is the part i changed

msg.arg1 = 1;

- - - - -

Toast.makeText(getApplicationContext(), msg.arg1 ,
Toast.LENGTH_LONG).show();

On 1 Okt, 21:57, Mark Murphy  wrote:
> Don't do:
>
> msg.what=1
>
> Do:
>
> msg.arg1=1
>
> Then, on the receiving side, your value will be:
>
> msg.arg1
>
>
>
>
>
> On Sat, Oct 1, 2011 at 3:29 PM, Kristoffer  wrote:
> > Hello.
>
> > Iam having some trouble sending message from a thread back to the
> > "main" thread.
>
> > I just need to send a integer just so i know what just happend in the
> > thread.
>
> > This is what i use right now,
>
> > Message msg = Message.obtain();
> > msg.what = 1;
> > progressHandler.sendMessage(msg);
>
> > - - - - -
>
> > private Handler progressHandler = new Handler() {
> > @Override
> > public void handleMessage(Message msg) {
>
> > Toast.makeText(getApplicationContext(), msg.toString(),
> > Toast.LENGTH_LONG).show();
>
> > This will show me:
> > { what=1 when=somenumbers }
>
> > Is there a way so i just could "grabb" the Int 1 in this case?
>
> > Iam then going to build if statments depends on the integer
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this 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.6 Available!

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


[android-developers] Re: LVL and InApp Billing

2011-10-01 Thread Phil H
The only thing I would say is that, in my recent investigation into
LVL, you can see how many devices are using a single purchased
licence, which may be useful.

On Oct 1, 7:54 pm, androidmediadeveloper 
wrote:
> Have noticed several posts on this issue but no specific resolution,
> so, trying again. We are going to market with a paid app built using
> Google's InApp billing infrastructure. We've secured the purchase
> database with all the security best practices and it seems to be
> working well. Is there anything specific to gain in terms of security
> or performance, or any advantages in general that people see in
> additionally implementing the license verification via LVL ?
>
> At this point I am thinking no, but if people have advice to share,
> I'd appreciate it and will help us make a better informed decision.
>
> 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: LVL, DeviceLimiter and userId

2011-10-01 Thread Phil H
OK after playing with two different accounts across three different
devices... the userId passed to DeviceLimiter is maintained across
devices and between wipes. So, if a user has purchased an LVL licenced
application, DeviceLimiter will always receive the same userId
string.

Therefore, it is possible to tell how many devices an application is
being used across by using, for example, a cookie type approach.

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

2011-10-01 Thread Mark Murphy
Don't do:

msg.what=1

Do:

msg.arg1=1

Then, on the receiving side, your value will be:

msg.arg1

On Sat, Oct 1, 2011 at 3:29 PM, Kristoffer  wrote:
> Hello.
>
> Iam having some trouble sending message from a thread back to the
> "main" thread.
>
> I just need to send a integer just so i know what just happend in the
> thread.
>
> This is what i use right now,
>
> Message msg = Message.obtain();
> msg.what = 1;
> progressHandler.sendMessage(msg);
>
> - - - - -
>
> private Handler progressHandler = new Handler() {
> @Override
> public void handleMessage(Message msg) {
>
> Toast.makeText(getApplicationContext(), msg.toString(),
> Toast.LENGTH_LONG).show();
>
> This will show me:
> { what=1 when=somenumbers }
>
> Is there a way so i just could "grabb" the Int 1 in this case?
>
> Iam then going to build if statments depends on the integer
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this 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.6 Available!

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


Re: [android-developers] What are peoples' thoughts on developing for Kindle Fire

2011-10-01 Thread Joel Witherspoon
Jeff knows the value of the developer community. I'm sure he will be more
open to the community at a later time. Amazon is stepping up its game and
I'm sure he'll make the Kindle more approachable in a few months.

*Joel C. Witherspoon*

(626) 502 - 7201

joel.withersp...@gmail.com
My profiles: [image: LinkedIn]
 [image:
Twitter] 
[image: Twitter] Latest tweet: OK
Android devs. I'm looking to put a Fisheye menu in my app. I can't port it
from Java. I need code. Any ideas? I need your help.
Follow @joelwitherspoon  Reply

Retweet

 19:21 Aug-24
  Get this email app!


Designed with WiseStamp -
Get
yours



On Sat, Oct 1, 2011 at 11:46 AM, androidmediadeveloper <
kamathaj...@gmail.com> wrote:

> It is well known that Kindle Fire is based on a 2.2 Fork of Android.
> However, Amazon has not once mentioned the Android name in all their
> Fire marketing. Wondering how all this is going to bode for Android
> developers such as us. Would be great to be able to port our existing
> apps onto Fire but what I'm sensing is Amazon is not going to make it
> too easy to do so, will have to at least jump thru some Amazon hoops
> to be able to port...
>
> Any thoughts, ideas, concerns ?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Inapp billing question

2011-10-01 Thread androidmediadeveloper
We already have a free app in the market which is doing fairly well.
We now want to offer a newer version of the app, this with the ability
to go Pro via Inapp billing. I've run several tests with the static
requests and they all seem to work well. When I tried to upload the
app to market to test, it does not let me upload with the same package
name and says "you need to upgrade existing app". And, when I try to
see if I can upgrade without publishing the existing app, it has
messaging which says "Clicking 'Save" will make the app live on
Android Market".

I'd like to test the inapp billing piece, not make it live at this
point. I dont want to change package names just to test because it is
a very elaborate process needing sweeping structure and code changes
where there are references to package names.

Any 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] sendMessage and handleMessage

2011-10-01 Thread Kristoffer
Hello.

Iam having some trouble sending message from a thread back to the
"main" thread.

I just need to send a integer just so i know what just happend in the
thread.

This is what i use right now,

Message msg = Message.obtain();
msg.what = 1;
progressHandler.sendMessage(msg);

- - - - -

private Handler progressHandler = new Handler() {
@Override
public void handleMessage(Message msg) {

Toast.makeText(getApplicationContext(), msg.toString(),
Toast.LENGTH_LONG).show();

This will show me:
{ what=1 when=somenumbers }

Is there a way so i just could "grabb" the Int 1 in this case?

Iam then going to build if statments depends on the integer


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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] LVL and InApp Billing

2011-10-01 Thread androidmediadeveloper
Have noticed several posts on this issue but no specific resolution,
so, trying again. We are going to market with a paid app built using
Google's InApp billing infrastructure. We've secured the purchase
database with all the security best practices and it seems to be
working well. Is there anything specific to gain in terms of security
or performance, or any advantages in general that people see in
additionally implementing the license verification via LVL ?

At this point I am thinking no, but if people have advice to share,
I'd appreciate it and will help us make a better informed decision.

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] What are peoples' thoughts on developing for Kindle Fire

2011-10-01 Thread androidmediadeveloper
It is well known that Kindle Fire is based on a 2.2 Fork of Android.
However, Amazon has not once mentioned the Android name in all their
Fire marketing. Wondering how all this is going to bode for Android
developers such as us. Would be great to be able to port our existing
apps onto Fire but what I'm sensing is Amazon is not going to make it
too easy to do so, will have to at least jump thru some Amazon hoops
to be able to port...

Any thoughts, ideas, concerns ?

Thanks

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


Re: [android-developers] Re: hello

2011-10-01 Thread Kristopher Micinski
On Sat, Oct 1, 2011 at 12:59 PM, Erel  wrote:
>> not a watered down version intended to
>> make it easier.
>
> Note that Basic4android is much more than a watered down version of
> the Android SDK. It is a RAD tool for building Android applications.
> Just as an example Basic4android supports many advanced features such
> as USB host, SMTP, POP3, home widgets, services, web services and many
> more.
>

True. However, RAD tools are intended to complement development of
real applications, not serve as a fallback because you don't know the
real development process.  I've got nothing against the use of these
tools for experienced developers, but the point stands:  if you're
learning Android development (or any kind of development) it would be
just plain wrong to recommend a tool other than the official SDK.
This is for multiple reasons: future employment possibilities, a much
larger userbase for the official tools (implies faster response to
questions a newcomer may have), and lots of available source.

So again, nothing against basic4android, but as the first thing you
learn I feel that you would be much better to sticking to the sdk,
possibly supplemented by these tools if they become useful later down
the road.

> The IDE is built from scratch for Android development and is therefore
> much simpler than Eclipse.

Perhaps simpler in terms of less overwhelming with respect to general
language features.  But again, I think this is probably because there
is a lot less to their language than java (where in eclipse you have
lots of popups for documentation, test cases, etc..., most of which
many people never use..)

Again, not bad, but not a clear reason why someone wouldn't want to
use eclipse, especially being a CS major you've probably experienced
something very similar before.

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] NEWBIE needs help with Android Tab Widget tutorial

2011-10-01 Thread Joel Witherspoon
Chris,

You should only add the  into one activity. Intents are
communication channels between the layout and the code (to put it roughly).
When you have an intent in an activity, that activity is the main
communication point of the app.

Here's an example from the Dashboard Demo at this site:
http://blahti.wordpress.com/2011/03/14/build-dashboard-ui-for-android/. The
application then calls the other activities from within the code.


http://schemas.android.com/apk/res/android";
  package="com.wglxy.example.dash1"
  android:versionCode="1"
  android:versionName="1.0">

  
 
 
 
 
  

  
  
  
  
  
  
  
  

  






*Joel C. Witherspoon*

(626) 502 - 7201

joel.withersp...@gmail.com
My profiles: [image: LinkedIn]
 [image:
Twitter] 
[image: Twitter] Latest tweet: OK
Android devs. I'm looking to put a Fisheye menu in my app. I can't port it
from Java. I need code. Any ideas? I need your help.
Follow @joelwitherspoon  Reply

Retweet

 19:21 Aug-24
  Get this email app!


Designed with WiseStamp -
Get
yours



On Wed, Sep 28, 2011 at 9:30 PM, Chris Cullington-Johnson <
chriscj...@gmail.com> wrote:

> I have just joined the Android World and am lovn it, however having a bit
> of trouble with some of the tutorials, in particular the Hello Tab Widget
> one.  Particular part states
> "Notice that this doesn't use a layout file. Just create a TextView, give
> it some text and set that as the content. Duplicate this for each of the
> three activities, and add the corresponding  tags to the Android
> Manifest file."  I think this is where I am going wrong, I don't fully
> understand how to add "the corresponding  tags in manifest
> file".  see below for my code what have I done (or not done).
>
> My app now doen't display errors but will not run it shows the following
> error
>
>  " The appication HelloTabWidget (process Tab.Widget) has stopped
> unexpectedly.."
>
>
>
>
>
>
>  xml version=*"1.0"*
>  encoding=*"utf-8"*?>
>
> <
> manifest xmlns:android=*"http://schemas.android.com/apk/res/android"*
>
> package=*"Tab.Widget"*
>
> android:versionCode=*"1"*
>
> android:versionName=*"1.0"*>
>
> 
>
>  "@string/app_name"*>
>
> 
> android:label=*"@string/app_name"*
>
> android:theme=*"@android:style/Theme.NoTitleBar"*>
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
> android:label=*"@string/app_name"*>
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
> android:label=*"@string/app_name"*>
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
> android:label=*"@string/app_name"*>
>
> 
>
> 
>
> 
>
> 
>
> 
>
>  
>
>  manifest>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this 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: hello

2011-10-01 Thread clark
As Kristopher said, you will be much better off sticking with Java and
the Android SDK.  BASIC is fine for those that don't do a lot of
programming but as a CS major you'll be doing quite a bit and you will
benefit more from using Java than BASIC.  I'm not knocking BASIC, I'm
just letting you know that you will be doing yourself a huge favor by
going the Java/Android SDK route.  It will pay off later on down the
road and you would be doing yourself a disservice by using
Basic4android.


And there you have my $0.02.

On Sep 29, 9:53 am, kuek9118  wrote:
> i am computer science student ...
> now i am going to do my final project is android application...
> hope i can get some help at here...
> any one can suggest some website for newbie(for me)?
> i searched a software that can use vb to do the android application
> which call "basic4android"
> is it good for new learning people?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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] Variable instruction counts of Android applications

2011-10-01 Thread Jack Harvard
Hi,

I find that the same application running on Android has different
instruction counts every time it's run, and the difference in
instruction counts can be 2x or ~10 billion instructions, and I'm
trying to understand the reasons for that?

Obvious reasons might be JIT and JVM, maybe Android browser has any
time dependent code as well? The Android source code tree is down for
some time, I don't have access to the source code.

Thanks,
Jack

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

2011-10-01 Thread Erel
> not a watered down version intended to
> make it easier.

Note that Basic4android is much more than a watered down version of
the Android SDK. It is a RAD tool for building Android applications.
Just as an example Basic4android supports many advanced features such
as USB host, SMTP, POP3, home widgets, services, web services and many
more.

The IDE is built from scratch for Android development and is therefore
much simpler than Eclipse.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: NEWBIE needs help with Android Tab Widget tutorial

2011-10-01 Thread Studio LFP
Make sure to re-read the Appwidget section: 
http://developer.android.com/guide/topics/appwidgets/index.html

There is no widget defined in your manifest.

A widget is a  element and needs a few other supporting files in 
the res/xml and res/layout directories.

Also, you are defining them all with:






which is used to make the activity show up in the launcher. You only want to 
use that on the activities you want the users to launch directly.

Check out: 
http://developer.android.com/guide/topics/manifest/manifest-intro.html

You probably want to post more code and the error for people to help you 
resolve the issues.

Steven
Studio LFP
http://www.studio-lfp.com

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

[android-developers] Re: Always-on GPS: widget or app?

2011-10-01 Thread Studio LFP
I hoping this was fixed along the way and the issue not updated.  I had to 
drop a part of an internal application for a company because of this bug.

And like lbendlin said, you could just check the last known and see if it 
was recent enough to use.

private static final int TIME_WINDOW = 1; // 10 Second window

LocationManager lmMgr = (LocationManager)getSystemService( 
Context.LOCATION_SERVICE );
Location lLast = lmMgr.getLastKnownLocation( LocationManager.GPS_PROVIDER );

if( System.currentTimeMillis() - lLast.getTime() < TIME_WINDOW )
{
// Use last known. 
}

You can always do this first and if something else is using the GPS you 
could get a good fix fairly quickly.  Just know that this can be VERY old 
and you would want to do proper checking on it.

Steven
Studio LFP
http://www.studio-lfp.com

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

[android-developers] Re: When my app force closes, does it also close the associated service?

2011-10-01 Thread Studio LFP
If your app is crashing, I wouldn't worry about how to keep your 
notifications up after a crash, I would worry about figuring out how to 
prevent the crash.

It's not a good experience for your users if the app is going to crash.

If you want to show us the error and where it is crashing in your code, I'm 
sure someone could help you prevent the crash and eliminate the need for you 
to figure out how to keep a notification up after a crash.

Steven
Studio LFP
http://www.studio-lfp.com

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

[android-developers] Re: Always-on GPS: widget or app?

2011-10-01 Thread lbendlin
I haven't seen the issues with concurrent GPS access that you describe.  
nevertheless you may want to anticipate a situation when another program is 
currently actively using the GPS. In such a case you could ask the passive 
provider first, and only if that location is too old or to imprecise then 
you would fire up your own locationlistener.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: real time gps tracking

2011-10-01 Thread Studio LFP
Google has a application like this in most Android phones. Check out Google 
Latitude.

It will give you an idea of how they use their servers to keep up with 
people. It allows you to check-in at places and send faster updates to 
certain people if you want to let them follow you more actively.

Steven
Studio LFP
http://www.studio-lfp.com

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

[android-developers] Re: Hide few fields of database OR hide a table in the database from being accessed from other applications

2011-10-01 Thread Studio LFP
If you implement a CotentProvider, you control what data you pass to the 
requesting application.

Just filter the data before you pass it back to the requesting application.

Steven
Studio LFP
http://www.studio-lfp.com

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

[android-developers] Re: Hide few fields of database OR hide a table in the database from being accessed from other applications

2011-10-01 Thread elham
Yes I am using content provider . So all the fields in the table will
get accessed from the other application .
.   I want to hide few fields from being accessed by other apps . Is
this poosible ?




On Sep 27, 9:54 am, Zsolt Vasvari  wrote:
> Other applications cannot read yorudatabase.  If you want to give
> access to your data, you could create a ContentProvider and expose
> whatever you want.
>
> PS: Do NOT e-mail or chat request me.
>
> On Sep 27, 8:51 am, elham  wrote:
>
> > Dear All,
>
> > I want to allow only one table from thedatabaseto be accessed from
> > other applications.
>
> > I am also wondering if i can deny access to  few fields from outside
> > the application. Is this possible ?
>
> > Thanks and Regards,

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: Hide few fields of database OR hide a table in the database from being accessed from other applications

2011-10-01 Thread elham
Yes I am using content provider . So all the fields in the table will
get accessed from the other application .
.   I want to hide few fields from being accessed by other apps . Is
this poosible ?




On Sep 27, 9:54 am, Zsolt Vasvari  wrote:
> Other applications cannot read yorudatabase.  If you want to give
> access to your data, you could create a ContentProvider and expose
> whatever you want.
>
> PS: Do NOT e-mail or chat request me.
>
> On Sep 27, 8:51 am, elham  wrote:
>
> > Dear All,
>
> > I want to allow only one table from thedatabaseto be accessed from
> > other applications.
>
> > I am also wondering if i can deny access to  few fields from outside
> > the application. Is this possible ?
>
> > Thanks and Regards,

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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] Trying to play around with ContentResolver, but stuck with weird issue

2011-10-01 Thread KK
Hi Kostya,
Thank you very much, You're a life saver !

Thanks,
KK

On Sat, Oct 1, 2011 at 8:59 PM, Kostya Vasilyev  wrote:

> Take out this:
>
> 01.10.2011 19:26, KK пишет:
>
>>
>> import android.R;
>>
>
> Then press Ctrl+Shift+O to "resolve imports", and choose your project's R
> file this time.
>
> --
> 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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: Thanks, Android Developers are the BEST! Another question about databases?

2011-10-01 Thread Studio LFP
Android, along with most mobile OSes, don't excel at printing quite yet. I'm 
seeing movement toward more printing functions, but I doubt we'll see an all 
out print manager style functionality any time soon. I guess they might 
surprise us with it in the next version, but we'll have to wait and find out 
there.

That being said, do you have a support infrastructure planned with your 
application? Or are you planning on it being stand-alone on the 
phone/tablet?

I ask that because there are a lot of good ways to get files into certain 
formats if you have a server planned. Pushing the data to the server and 
asking it to format and print would produce significantly better results in 
speed and ease of use.

If not, a quick and easy way to get "pretty" formatted output would be a 
bitmap backed canvas. You could just toss text, lines and images all over 
and save it to a JPG or PNG.  It wouldn't produce the best printing results, 
but it would be a start.

Canvas: http://developer.android.com/reference/android/graphics/Canvas.html
Bitmap: http://developer.android.com/reference/android/graphics/Bitmap.html
Bitmap Factory: 
http://developer.android.com/reference/android/graphics/BitmapFactory.html

For nicer printed output, you could also look up the PDF spec and implement 
a slimmed down version of it in your code. Also, SVG may be an option as it 
is something that more and more browsers are supporting. You could then use 
a browser on a desktop to view and print them.

PDF: http://www.adobe.com/devnet/pdf/pdf_reference.html
SVG: http://www.w3.org/Graphics/SVG/

Hope that helps.

Steven
Studio LFP
http://www.studio-lfp.com

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

Re: [android-developers] How can capture and transmit IR signal?

2011-10-01 Thread Kristopher Micinski
On Sat, Oct 1, 2011 at 8:06 AM, shubh  wrote:
> I am trying to build an IR app , in which i am able to capture IR
> signal but not able to transmit same signal.
>
> can any one have idea how can transmit same signal.
>
> thanks
>

http://androidforums.com/android-applications/62128-bluetooth-ir-software-remote-control.html

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

2011-10-01 Thread Kristopher Micinski
On Sat, Oct 1, 2011 at 8:08 AM, Erel  wrote:
>
>> is it good for new learning people?
>
> Basic4android is much simpler than Eclipse / Java in almost all cases.
> Especially for programmers with less experience.
>

However it should be noted that this group is concerned explicitly
with the SDK, which is based on Java code.

If you want to learn how to program (for real) then you should learn
Java and the Android SDK.  If you are a computer science student, this
shouldn't be difficult, and is very typical of the workload expected
throughout an undergraduate course.

Using a basic variant for Android would have a number of drawbacks,
perhaps the biggest being: if you want to learn a skill that you can
use in a professional (or even hobbyist) manner, you're going to want
to use the actual framework, not a watered down version intended to
make it easier.

So go through the examples, and learn it for real, like I said, it
shouldn't be too difficult if you're a CS student already :-).

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] Trying to play around with ContentResolver, but stuck with weird issue

2011-10-01 Thread Kostya Vasilyev

Take out this:

01.10.2011 19:26, KK пишет:


import android.R;


Then press Ctrl+Shift+O to "resolve imports", and choose your project's 
R file this time.


--
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] Trying to play around with ContentResolver, but stuck with weird issue

2011-10-01 Thread KK
Hi All,
I just copied this code from the web and trying to run it in Eclipse gives
me errors, the R.id.listView and R.layout.main are not getting resolved. No
idea whats going wrong here.
Please find the code for Java and mail.xml file as below:
---MyContentResolver .java
file is below:
package com.sailo.contentresolverdemo;

import java.util.ArrayList;

import android.R;
import android.app.Activity;
import android.content.ContentResolver;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.provider.ContactsContract.PhoneLookup;
import android.util.Log;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class MyContentResolver extends Activity {
 private static final String TAG = "MyContentResolver";
private ArrayList list;

/** Called when the activity is first created. */
@Override
 public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
 setContentView(R.layout.main);

// Get content provider and cursor
 ContentResolver r = getContentResolver();
Cursor cursor = r.query(ContactsContract.Contacts.CONTENT_URI, null,
 null, null, null);

// Let activity manage the cursor
startManagingCursor(cursor);
 Log.d(TAG, "cursor.getCount()=" + cursor.getCount());

// Get value from content provider
 int nameIndex = cursor.getColumnIndexOrThrow(PhoneLookup.DISPLAY_NAME);
int numberIndex = cursor
 .getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.NUMBER);

cursor.moveToFirst();
 list = new ArrayList();
do {
String name = cursor.getString(nameIndex);
 String number = cursor.getString(numberIndex);
list.add(name + ": " + number);
 } while (cursor.moveToNext());

// Get the list view
ListView listView = (ListView) findViewById(R.id.listView);
 ArrayAdapter aa = new ArrayAdapter(this,
android.R.layout.simple_list_item_1, list);
 listView.setAdapter(aa);
}
}

 main.xml is given
below:

http://schemas.android.com/apk/res/android";
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>



---



Thanks in advance.

Thanks,
KK

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: Extracting RGB data from Bitmap

2011-10-01 Thread New Developer

Curious

ByteArrayOutputStream bos = new ByteArrayOutputStream(); 
bmp.compress(CompressFormat.JPEG, 100 , bos);

bos.toString();

and also

ByteArrayOutputStream bos = new ByteArrayOutputStream(); 
bmp.compress(CompressFormat.PNG, 100 , bos);

bos.toString();


the string result from bos.toString();   is this the raw or encoded 
version of the  image ?  I would guess encode because bos.size()  is 
much less than  bmp.getWidth() * bmp.getHeight().



So my question then is what is the encoding method used ?   and  to 
which  PDF filter do they correspond ?



Thanks in advance


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

[android-developers] Re: Samsung Galaxy S2 (2.3.4) and Arduino ADK

2011-10-01 Thread hudvin
Also, do you know any official articles/notifications/messages about
SG2 and ADK?
Maybe they will add ADK support in android 4 rom
Have you tried to use cyanogenMod? Looks like they have adk support.


On 29 сен, 00:52, tecnosys98  wrote:
> I get the [INSTALL_FAILED_MISSING_SHARED_LIBRARY] with the shipped
> version of 2.3.3 which is expected
>
> With this version of v2.3.4 I9100XXKH3, the app compiles and deploys.
> But crashes
>
> any later version seems support has been removed
>
> [INSTALL_FAILED_MISSING_SHARED_LIBRARY]
> with these
>
> I9100XWKI4  v2.3.4
> I9100CEKI2  v2.3.5
>
> Jason

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: Samsung Galaxy S2 (2.3.4) and Arduino ADK

2011-10-01 Thread hudvin
I have 2.3.4.
But nothing happens when I connect Arduino ADK board to my phone.
Demo app does not get any intents.

On 29 сен, 00:52, tecnosys98  wrote:
> I get the [INSTALL_FAILED_MISSING_SHARED_LIBRARY] with the shipped
> version of 2.3.3 which is expected
>
> With this version of v2.3.4 I9100XXKH3, the app compiles and deploys.
> But crashes
>
> any later version seems support has been removed
>
> [INSTALL_FAILED_MISSING_SHARED_LIBRARY]
> with these
>
> I9100XWKI4  v2.3.4
> I9100CEKI2  v2.3.5
>
> Jason

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


Re: [android-developers] Fwd: how to get screen coordinates by using OnClickListener????

2011-10-01 Thread satheesh thinagaran
Thank you..

On Fri, Sep 30, 2011 at 8:16 PM, Mark Murphy wrote:

> AFAIK, you cannot get screen coordinates from OnClickListener. You
> probably want OnTouchListener:
>
>
> http://developer.android.com/reference/android/view/View.OnTouchListener.html
>
> On Fri, Sep 30, 2011 at 4:06 AM, satheesh thinagaran
>  wrote:
> >
> >
> >
> > hi,
> >  I want to retrieve screen coordinates at runtime using
> OnClickListener
> > plz help 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
>
>
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
> Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: LVL, DeviceLimiter and userId

2011-10-01 Thread Phil H
In the developer console "active installs" is supposed to be the
number of devices that the software is currently installed on. I know
how many successful sales have gone through Google Checkout (this is
lower than the "total installs" on the developer console which I think
includes purchases cancelled inside the 15 minute returns window) and
the active installs figure is 40% higher than the total of successful
sales.

My conclusion, given that most of my sales are in the USA, is that
couples/families where at least a couple of people have an Android
phone may be sharing a generic Google Checkout account so that they
can buy an app once and share it around for free.

That's ok-ish when there is no ongoing cost of running a back end
server. It's going to destroy my business model if I need a back end
server though. I'm considering using the Google Order Number as a
licence key, thereby allowing multiple installations, but no
simultaneous use on different devices. And I'll write up a licence to
reflect that.

On Oct 1, 7:17 am, Zsolt Vasvari  wrote:
> I didn't read the rest of your question when I saw this:
>
> "40% of users have my application installed on more than one
> device."
>
> How do you know this?  If you go by the numbers given to you on the
> Developer Console, those numbers are at least misleading, and probably
> completely wrong.   I have very, very hard to believe that 40% of
> Android users have multiple devices with the same Google Id tied to
> the,
>
> On Oct 1, 7:41 am, Phil H  wrote:
>
>
>
>
>
>
>
> > I'm looking at the LVL code and had a question about user identity and
> > the DeviceLimiter interface. I've one app in the Android Market that
> > uses LVL in its recommended form, so users can install the application
> > on any device they have set up their account on. Early indications are
> > that the software is being repeat-installed at a higher rate than I'd
> > expect - 40% of users have my application installed on more than one
> > device. That seems a bit high but, for that application in particular,
> > it is no more significant than some lost sales - there are no ongoing
> > running costs for me to support.
>
> > It is enough to make me concerned about my next app though, which
> > requires a server in the cloud. Application sales should cover the
> > cost of this but if the repeat installation rate is high, my
> > application may not be sustainable in the medium to long term - server
> > costs will eat into income and I could end up running at a significant
> > loss - and the more popular the app becomes, the bigger that problem
> > is. So this got me thinking. Repeat installations by one used are not
> > a problem, but one core function will account for the majority of
> > server load - both processing and bandwidth. So, my tentative thought
> > is that if a user is currently using that core function on one of
> > their devices, they will not be able to use that function on any other
> > until they are done with it on the first device.
>
> > To be able to implement this I need access to a piece of data that is
> > common to all the installations, which brings me round to the
> > DeviceLimiter interface. Is the userId supplied here the same for a
> > given application, purchased by a single user, regardless of the
> > device it is installed on? Or is it the ANDROID_ID for the device? I
> > don't want any identifying information (like an email address), I just
> > want to be able to spot, from my server code, when multiple instances
> > of a single purchase are using my (relatively) expensive resources
> > simultaneously.
>
> > A fall back solution would involve the user putting in their Google
> > Checkout order number to activate the application - is there a service
> > exposed to securely obtain details about an order that my server could
> > make use of? All I really need is to know is the application
> > purchased.
>
> > A bit rambling I know, but any suggestions on ways of tackling this
> > issue are most welcome.

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

2011-10-01 Thread Erel

> is it good for new learning people?

Basic4android is much simpler than Eclipse / Java in almost all cases.
Especially for programmers with less experience.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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] Slidingdrawer hides last element of listview.

2011-10-01 Thread Francisco Dalla Rosa soares
have you tried adding

android:layout_below="@id/listfragment

to your slidingdrawer element?

2011/10/1 charlie babitt 

> Hallo!
>
> In my activity I have a list view and I want to have a sliding drawer
> at the bottom of the screen. The handle of the sliding drawer has a
> solid image and the size of the whole screen width. The problem now
> is, that the last row of the list is not visible anymore, since it is
> below the sliding drawer's handle. What is the best solution to solve
> it.
> My layout looks as follows:
>
> Activity layout:
> android:layout_height="fill_parent" xmlns:android="http://
> schemas.android.com/apk/res/android">
>
>android:name="test.sample.ListFragment"
>android:layout_width="wrap_content"
> android:layout_height="wrap_content"
>android:id="@+id/listfragment" />
>
>
>android:layout_width="fill_parent"
> android:layout_height="fill_parent"
>android:handle="@+id/slidingdrawer.handle"
> android:content="@+id/
> slidingdrawer.content">
>android:id="@+id/slidingdrawer.handle"
> layout="@layout/
> slidingdrawerhandle" />
>layout="@layout/slidingdrawercontent"
>android:layout_width="fill_parent"
> android:layout_height="fill_parent" />
>
> 
>
> My Handle Layout:
>
> 
> android:layout_width="fill_parent"
> android:layout_height="wrap_content"
>xmlns:android="http://schemas.android.com/apk/res/android";>
>android:orientation="horizontal"
> android:layout_width="wrap_content"
>android:layout_height="wrap_content"
> android:layout_centerInParent="true">
>android:textColor="@android:color/white"
> android:layout_gravity="center_vertical"
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"
> android:text="News"
>android:singleLine="true"
> android:shadowColor="@android:color/
> black"
>android:shadowRadius="2.0" />
>
> 
>
> Do you have any idea how I could fix this?
> Thanks
> Charlie
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this 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




-- 
株式会社アルゴ ARGO Inc.
〒130-0012
東京都墨田区太平3-11-10
NTKオオノビル8階

ソアレス フランシスコ ( Soares Francisco )
Mail : soa...@argo.bz HP : http://www.argo.bz/
TEL:03-5619-4511 FAX:03-5619-4512

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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 can capture and transmit IR signal?

2011-10-01 Thread shubh
I am trying to build an IR app , in which i am able to capture IR
signal but not able to transmit same signal.

can any one have idea how can transmit same signal.

thanks

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


Re: [android-developers] Re: Not able to access custom content provider.

2011-10-01 Thread Mark Murphy
On Sat, Oct 1, 2011 at 12:08 AM, Pradeep  wrote:
> How would other application know about the URI of this content
> provider.

Through the advanced techniques of "typing" and "documentation".

> So, I thought this Content_URI was introduced as a concept
> for content provider, as done for other providers like contacts etc.

That is a convenience, not a requirement. The reason it works for
"other providers like contacts etc." is because those "other
providers" are part of the OS and classes with these symbols are made
part of the 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.6 Available!

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


[android-developers] Slidingdrawer hides last element of listview.

2011-10-01 Thread charlie babitt
Hallo!

In my activity I have a list view and I want to have a sliding drawer
at the bottom of the screen. The handle of the sliding drawer has a
solid image and the size of the whole screen width. The problem now
is, that the last row of the list is not visible anymore, since it is
below the sliding drawer's handle. What is the best solution to solve
it.
My layout looks as follows:

Activity layout:











My Handle Layout:


http://schemas.android.com/apk/res/android";>





Do you have any idea how I could fix this?
Thanks
Charlie

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

2011-10-01 Thread arun kumar
 DefaultHttpClient httpclient = new DefaultHttpClient();
 scope = new AuthScope("
http://76.10.226.133:8000/sap/bc/srt/rfc/sap/zemptrack_overview/800/zemptrack_overview/zemptrack_overview
",8000);

 String   Username = "user1";
 String  Password = "pass1";

myCredentials = new
UsernamePasswordCredentials( Username, Password );
provider = new BasicCredentialsProvider();
provider.setCredentials(scope, credentials);
httpclient.setCredentialsProvider( provider
);
10-01 16:11:08.614: ERROR/HTTPStatus(548): Referral_Request ResponseHTTP/1.1
401 Unauthorized
i have to connct to the sap server

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

[android-developers] Re: How to get pure UTC time?

2011-10-01 Thread RLScott


On Oct 1, 5:43 am, Daniel Drozdzewski 
wrote:
> On 1 October 2011 00:11, RLScott  wrote:
> .  The accuracy I am looking for
> > is 1 part in 200,000.
>
> I am not sure what kind of instruments are you tuning, but since basic
> crystal oscillator accuracy is in between 10^(-5) and 10^(-4) for
> audible frequencies this seems as accurate as one would need.

  http://www.reyburn.com/irct.html

This page from a competitor's website cites an accuracy of 0.01 cents
(which is musical terminology for 0.057).  This is the industry
standard for professional piano tuning devices.  So an uncorrected
10^(-5) would not be competitive.  That web page also mentions
automatic calibration through something he calls the "CyberCloud"
which I assumed was an NTP function through his server.  I can't
imagine how else he would do it.  Of course his product is on the
iPhone which does not have GC, so maybe that is the difference.

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


Re: [android-developers] Re: How to get pure UTC time?

2011-10-01 Thread Daniel Drozdzewski
On 1 October 2011 00:11, RLScott  wrote:
> I also have a need for accurate NTP embedded into my app.  I am
> writing a very accurate musical instrument tuner.  One of the things
> that such an app needs to do is to calibrate the device to compensate
> for variations in the sound system's quartz crystal time base.  On
> another platform I did this by having the user call up the NIST's free
> time and frequency standard service on a wired phone and let my app
> listen to the 500 Hz or 600 Hz reference tones.  But that is a pain
> for the user.  I would like to offer a alternative NTP method of doing
> this for devices that have occasional broadband internet connection..
> My idea is to sample NTP time at the same time that I start counting
> audio packets coming in from the sound API.  Then after some time
> (maybe 10 minutes) sample NTP again.  By knowing the difference in NTP
> time and the number of audio packets processed I can find the
> necessary calibration for that device.  The accuracy I am looking for
> is 1 part in 200,000.

I am not sure what kind of instruments are you tuning, but since basic
crystal oscillator accuracy is in between 10^(-5) and 10^(-4) for
audible frequencies this seems as accurate as one would need.

> For a 10-minute sample interval that translates
> to a total time accuracy of 3 msec.

Please keep in mind that A/C conversion delay and application jitter
caused by Garbage Collection will have effects of magnitude of tens of
milliseconds.


> If that is difficult to do with
> NTP then I could extend my sample time to 100 minutes.  Then I would
> only need 30 msec. time accuracy.  But the longer I make the sample
> period the more of a pain it becomes for the user, even if he only has
> to do this once when the app is first installed.  Can anyone tell me
> if embedding NTP into my app is likely to serve this purpose?

NTP over public networks will give you at most 10s of milliseconds
accuracy too and its main use is time synchronisation (making sure
that 2 timestamps by distributed machines are as close as possible),
rather than establishing how accurate your internal time source is.

I don't want to discredit your solution and as I said above, I don't
know much about the problem that you are trying to solve, but I simply
think that modern quartz oscillators will offer you as much accuracy
as you need for audio tuning.


Daniel



>
> On Sep 30, 2:48 pm, Jim Graham  wrote:
>> On Wed, Sep 28, 2011 at 11:52:18AM -0700, cool_zack wrote:
>>
>> > I want to get UTC time. It should not change except for tiny
>> > adjustments that happen from Network. User modifications to the time
>> > on the device must not affect it.
>>
>> What you're asking for is SNTP (often abbreviated as NTP).  If all you
>> need is an app, search in the market for NTP.  Most of the NTP apps
>> will set your device's clock (requires root).
>>
>> There's an app, called "UTC Time" which displays local time and UTC
>> side by side.  With a rooted device, it will also keep your device's
>> time set to whichever SNTP server you have it configured for.
>>
>> If you need this for an app you're writing, let me know what you find,
>> as I have some ideas along that line, myself..
>>
>> Later,
>>    --jim
>>
>> --
>> THE SCORE:  ME:  2  CANCER:  0
>> 73 DE N5IAL (/4)        | Remember your spelling rules, including:
>> spooky1...@gmail.com    |   I before E except after C
>> < Running FreeBSD 7.0 > |
>> ICBM / Hurricane:       |   BEING a native-born American, I don't
>>    30.44406N 86.59909W  |   always notice our WEIRD spelling
>>
>> Android Apps Listing athttp://www.jstrack.org/barcodes.html
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this 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
>



-- 
Daniel Drozdzewski

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


[android-developers] authentication to the server

2011-10-01 Thread arun kumar
i want to connect to the sap server.
am posting my code


UsernamePasswordCredentials creds = *new* UsernamePasswordCredentials(
"username", "password");

AbstractHttpClient httpclient = *null*;

((AbstractHttpClient) httpclient).getCredentialsProvider().setCredentials(*
new* AuthScope(AuthScope.*ANY_HOST*, AuthScope.*ANY_PORT*),creds);



but it is not connecting ..can any one suggest me how to authenticate to the
serer

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

[android-developers] Re: How to get pure UTC time?

2011-10-01 Thread gjs
Hi,

Get UTC from GPS Location or NMEA.

Regards

On Oct 1, 9:11 am, RLScott  wrote:
> I also have a need for accurate NTP embedded into my app.  I am
> writing a very accurate musical instrument tuner.  One of the things
> that such an app needs to do is to calibrate the device to compensate
> for variations in the sound system's quartz crystal time base.  On
> another platform I did this by having the user call up the NIST's free
> time and frequency standard service on a wired phone and let my app
> listen to the 500 Hz or 600 Hz reference tones.  But that is a pain
> for the user.  I would like to offer a alternative NTP method of doing
> this for devices that have occasional broadband internet connection..
> My idea is to sample NTP time at the same time that I start counting
> audio packets coming in from the sound API.  Then after some time
> (maybe 10 minutes) sample NTP again.  By knowing the difference in NTP
> time and the number of audio packets processed I can find the
> necessary calibration for that device.  The accuracy I am looking for
> is 1 part in 200,000.  For a 10-minute sample interval that translates
> to a total time accuracy of 3 msec.  If that is difficult to do with
> NTP then I could extend my sample time to 100 minutes.  Then I would
> only need 30 msec. time accuracy.  But the longer I make the sample
> period the more of a pain it becomes for the user, even if he only has
> to do this once when the app is first installed.  Can anyone tell me
> if embedding NTP into my app is likely to serve this purpose?
>
> On Sep 30, 2:48 pm, Jim Graham  wrote:
>
>
>
>
>
>
>
> > On Wed, Sep 28, 2011 at 11:52:18AM -0700, cool_zack wrote:
>
> > > I want to get UTC time. It should not change except for tiny
> > > adjustments that happen from Network. User modifications to the time
> > > on the device must not affect it.
>
> > What you're asking for is SNTP (often abbreviated as NTP).  If all you
> > need is an app, search in the market for NTP.  Most of the NTP apps
> > will set your device's clock (requires root).
>
> > There's an app, called "UTC Time" which displays local time and UTC
> > side by side.  With a rooted device, it will also keep your device's
> > time set to whichever SNTP server you have it configured for.
>
> > If you need this for an app you're writing, let me know what you find,
> > as I have some ideas along that line, myself..
>
> > Later,
> >    --jim
>
> > --
> > THE SCORE:  ME:  2  CANCER:  0
> > 73 DE N5IAL (/4)        | Remember your spelling rules, including:
> > spooky1...@gmail.com    |   I before E except after C
> > < Running FreeBSD 7.0 > |
> > ICBM / Hurricane:       |   BEING a native-born American, I don't
> >    30.44406N 86.59909W  |   always notice our WEIRD spelling
>
> > Android Apps Listing athttp://www.jstrack.org/barcodes.html

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this 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: Embedding Activity from different Application, both applications using same library causing ClassCastException on inflating views

2011-10-01 Thread smill
Thanks Mark,
Using fragments would require to rewrite lot of code so for me it's
not a solution. I'll try to reproduce this problem with fragments
anyway.

I'm still waiting for an answer about the LayoutInflater job. It seems
my problem and the other refered in my previous post are related. If
we run 2 apps and use same library from both apps, only the first
app's layout resources inflated from library have view instantiated
correctly. The second activity gets the views from library
instantiated by the first app's classloader.

br,
smill

On 30 sep., 20:15, Mark Murphy  wrote:
> On Fri, Sep 30, 2011 at 10:00 AM, smill  wrote:
> > I'm on Gingerbread so I don't have Fragments
>
> Sure you do, via the Android Compatibility Library:
>
> http://android-developers.blogspot.com/2011/03/fragments-for-all.html
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
> Available!

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