Re: [android-developers] Re: OpenJDK on Android

2011-02-04 Thread Kostya Vasilyev

Yes, it would be really convenient if Android supported Java EE spec.

It would also be really great if it supported all the other Java specs, 
like Java 3D, Swing, AWT, RMI...


And .Net applications. And native Windows x86 applications (including 64 
bit executables). And MacOS applications (including the old "System x" 
ones built for the PowerPC architecture, nah, make that Motorola 68K). 
And if it had support for X11 with hardware accelerated 3D.


Oh, and don't forget being able to run iPhone applications, natively, at 
twice the speed of the latest iPhone.


All working seamlessly in a unified workspace.

That would be the ultimate mobile device operating system.



Seriously, EJBs is probably not a good choice for a mobile application, 
Android or not.


You can look at delivering a web/intranet application, or use JSON / 
XML, or, if you're feeling adventurous, SOAP, to break up your 
application into tiers. Those are good choices for a mobile application, 
are available on Android, and will probably make your application a 
better one in the end.


-- Kostya

04.02.2011 10:05, koala пишет:

What about for tablet users?

would that be such a nightmare too?

So, If we have to develop an enterprise application are android
devices so unable to deliver such?

would it not be handy if android supported all Java SE functionality?
including rmi, swing, etc?

The fact that it supports it does not mean everyone has to use it.







On Jan 21, 1:41 am, Jake Basile  wrote:

It would be very convenient for developers, and a nightmare for phone users.



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: api used for connecting to the exchange sever on android

2011-02-04 Thread JAlexoid (Aleksandr Panzin)
The default email app is in the sources. Start there.
http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=summary

On 28 дек 2010, 09:40, kampy  wrote:
> hi
>
> i found an email app on the emulator by which we can synchronize our
> mail and exchange accounts to the mobile . can anyone help me that
> what is the api that used for this .
>
> thanking you ,

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


[android-developers] Re: Rooting internals

2011-02-04 Thread JAlexoid (Aleksandr Panzin)
www.xda-developers.com
Android doesn't use exploits for rooting, it's not iPhone jalibreak.

On 29 янв, 00:52, Eknath Venkataramani  wrote:
> All,
>
> Could someone explain how rooting occurs in detail?
> right from the stage of detecting an exploit on a particular firmware on a
> particular device. All the way till the final user guides on the wikis.
>
> --
> Eknath Venkataramani

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

2011-02-04 Thread JAlexoid (Aleksandr Panzin)
It does render with the new version of maps.

On 3 фев, 21:11, ip332  wrote:
> Google does not render maps on the device but gets the bitmaps from
> the server.
>
> Honestly speaking, I don't see any reason to do your own map
> application unless you are going to make a turn-by-turn navigation.
> But navigation is a very complicated task you cannot handle alone,
> especially when you have no idea about what are you doing.
> You better to do a search on Google "Android offline maps" and you
> will find maps applications as well as navigation solutions and some
> open projects too.
>
> On Feb 2, 10:42 pm, sajjoo  wrote:
>
> > hi guys,
> >      i am developing a map application and i have binary map files in
> > which i have to read data and make the map tiles and display them on
> > canvas. and for displaying the map i am using ImageView Class which
> > extends the View class.
> > i have large bitmaps which takes alot of memory and my movement of map
> > is also too slow.
> > so if any one who knows what mechanism or logic has used by google
> > team when developing map application for android.
> > i,ll be really thankful if anybody can help me about this matter.
>
> > thanks alot.

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

2011-02-04 Thread String
On Friday, February 4, 2011 1:03:26 AM UTC, Mark Carter wrote:

I can't see a nice way to do it. The best way I can think of is to introduce 
> in-app billing to the Lite version and convert the Pro version into some 
> kind of "pro key" token app. The Lite version would check for existence of 
> this "pro key" app (and validate) if the in-app-upgrade had not been 
> purchased.
>
> Does that work?
>

I'm not sure it does, actually. Consider your existing Pro users, most of 
whom presumably don't have the Lite version installed. When you convert Pro 
into (in your words) "just a marker app", all these users will lose the 
functionality until they go download the app formerly know as Lite. They'll 
also end up with both items in their app list unless you go through some 
shenanigans with hiding the Pro token app; I say "shenanigans" because you 
can't afford to hide it for users who *don't* have Lite installed. That's a 
PITA, I know, I've done that kind of thing. And in any case, you're likely 
to annoy and confuse a good percentage of your existing paid users.

String

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

2011-02-04 Thread Kostya Vasilyev
An AppWidgetProvider is transient. It's only instantiated as needed, and 
is destroyed soon after that.


That's why you can't use an API that requires a long-lasting reference 
to the app widget provider (or receiver). This includes binding to a 
service (but you can start one, though) or registering a receiver (but 
you can get the most recent value of a sticky broadcast, as Mark showed).


-- Kostya

04.02.2011 9:13, Jeffrey пишет:

Okay, figured it out. I guess I can't have anything from the
AppWidgetProvider class activate a registerReceiver so I have to make
a service to do it. I don't keep it running, just launch it to update
everything then it dies.

Thanks for your help and patience.

On Feb 3, 10:56 pm, Jeffrey  wrote:

Also the only thing that changes is the Context, is that where the
problem is? Because if it's not that then I have absolutely no clue as
to what it could be.

On Feb 3, 10:45 pm, Jeffrey  wrote:








Am I doing something wrong? The first time my app runs this code it
runs it from the Configuration page and it works just fine, the second
time it comes up with a nullpointerexception, the code is this:
IntentFilter batteryLevelFilter = new
IntentFilter(Intent.ACTION_BATTERY_CHANGED);
rawlevel = registerReceiver(null,
batteryLevelFilter).getIntExtra("level", -1);
I know that registerReceiver doesn't like to run from the
AppWidgetProvider, so is it something to do with the class being
called by the onUpdate()? I don't know if I need to do anything
special but I can't seem to get it to run this line of code to save my
life.
Also as a side note I tried using this
int rawlevel = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
and it can't resolve BatteryManager.EXTRA_LEVEL even after importing
BatteryManager and setting the minSDK to 8.
On Feb 3, 8:30 pm, AndroidDevTime  wrote:

what are the power battery performance implications of maintaining a
service? Will this drain the battery more to keep a service up and
running?  Especially if you bind to the service from the widget to
call service functions?
On Feb 3, 3:39 pm, Mark Murphy  wrote:

2011/2/3 Jeffrey:

Thank you, one last issue that I'm having, you said to get the battery
level to call registerReceiver with a null broadcast receiver, but
when I try the following code I get a nullpointerexception:
int rawlevel = registerReceiver(null,
batteryLevelFilter).getIntExtra("level", -1);
I'm not sure if thats right or not. When I was running a broadcast
receiver it grabbed the context and the code was as such:
  int rawlevel = intent.getIntExtra("level", -1);
which worked but since I no longer use the broadcast receiver to grab
the intent I can't seem to figure out how to get it into a manageable
variable.

There are two possibilities:
1. Your batteryLevelFilter is incorrect
2. Your code is being called before an ACTION_BATTERY_CHANGED
broadcast has been sent
Since #2 is conceivable, depending on when you are setting up your
alarms, be sure to handle a null response to registerReceiver().
Also, I would use BatteryManager.EXTRA_LEVEL instead of "level".
That's a change I need to make in one of my own examples, one of these
days...
--
Mark Murphy (a Commons 
Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
Android Training...At Your Office:http://commonsware.com/training



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Post on Facebook wall post for beginner

2011-02-04 Thread Robin Talwar
ok i got it i think there is a problem with the facebook application whose
api key i am using.
It should be mobile facebook application and the code which i am using now
is :-
  parameters.putString("attachment", "{\"name\":\"My Test Image\","
+"\"href\":\""+"http://www.google.com"+"\",";
+"\"media\":[{\"type\":\"image\",\"src\":\""+"
http://www.google.com/logos/mucha10-hp.jpg"+"\",\"href\":\""+";
http://www.google.com"+"\"}]";
+"}");

On Fri, Feb 4, 2011 at 11:55 AM, Robin Talwar
wrote:

> Thanks for the gr8 code but i am already running the application and i am
> able to login to the facebook account
> and add a status message but what i actually want is to also show a link
> option and an image.
> I think adding this peice of code should work :-
> parameters.putString("link", "http://www.hungama.com";);
>
> But apparently it does on one application and not on another application.
> Plus i had to send the build to my friend but the build he got didnt have
> the library in it so should i export it and then mail the jar??
>
> On Wed, Feb 2, 2011 at 8:49 PM, Mozart Petter wrote:
>
>> There's a good example that comes with the Facebook SDK. The only thing
>> that I've changed on that code, is to publish a message on the users wall
>> without using the webview. Here's the code:
>>
>> https://gist.github.com/807825
>>
>> Regards
>>
>> Mozart Petter
>> http://www.mozartpetter.com/
>>
>>
>>
>> On Wed, Feb 2, 2011 at 5:16 PM, Abhishek Talwar <
>> r.o.b.i.n.abhis...@gmail.com> wrote:
>>
>>> I am new to the world of sharing stuff on facebook.
>>> My target for today is to make a simple application which has a "Post
>>> to FB" button .
>>> When the user clicks on it then a hard coded String from java file is
>>> displayed on the user's profile ; after logint to the facebook account
>>> and creating a session.
>>> Is there any simple beginner tutorial for this cause what i find on
>>> net is quite complex.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

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

Re: [android-developers] TimerTask

2011-02-04 Thread Kostya Vasilyev
Take a look at AlarmManager, use it with a manifest-declared broadcast 
receiver.


-- Kostya

04.02.2011 10:05, A N K ! T пишет:
nO I dont want to add background Service...so i started it from 
Outgoing  Call Receiver.. but after certain number of times it goes 
stopeed


On Thu, Feb 3, 2011 at 6:18 PM, Kostya Vasilyev > wrote:


Is this in a background service?

03.02.2011 15:40, A N K ! T пишет:

i am Starting a TimerTask but after few runs it got stops...is
there a way to know task is running or i shud start it again

-- 


A N K ! T..


-- 
You received this message because you are subscribed to the Google

Groups "Android Developers" group.
To post to this group, send email to
android-developers@googlegroups.com

To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



-- 
Kostya Vasilyev -- WiFi Manager + pretty widget --

http://kmansoft.wordpress.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




--

 A N K ! T..


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



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] In app billing...

2011-02-04 Thread Kostya Vasilyev
In this lite/pro conversion scenario, can the user cancel his purchase 
of Pro key to revert back to the Lite version (for whatever reason)?


There is a 15 minute window for refunds with the current scheme 
(separate Lite / Pro applications) - is there one for in-app purchases?


The middle screenshot here says "This in-app purchase cannot be 
refunded", is that always the case for in-app items?


http://developer.android.com/guide/market/billing/index.html

-- Kostya

04.02.2011 11:17, String ?:

On Friday, February 4, 2011 1:03:26 AM UTC, Mark Carter wrote:

I can't see a nice way to do it. The best way I can think of is to
introduce in-app billing to the Lite version and convert the Pro
version into some kind of "pro key" token app. The Lite version
would check for existence of this "pro key" app (and validate) if
the in-app-upgrade had not been purchased.

Does that work?


I'm not sure it does, actually. Consider your existing Pro users, most 
of whom presumably don't have the Lite version installed. When you 
convert Pro into (in your words) "just a marker app", all these users 
will lose the functionality until they go download the app formerly 
know as Lite. They'll also end up with both items in their app list 
unless you go through some shenanigans with hiding the Pro token app; 
I say "shenanigans" because you can't afford to hide it for users who 
/don't/ have Lite installed. That's a PITA, I know, I've done that 
kind of thing. And in any case, you're likely to annoy and confuse a 
good percentage of your existing paid users.


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



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Re: Question about bug reports

2011-02-04 Thread fourhend...@gmail.com
May I ask, what's the "one line of code" to send a report?
On Feb 3, 2011 2:01 PM, "String"  wrote:
> On Tuesday, February 1, 2011 11:10:00 PM UTC, Thomas wrote:
>
>
>> About your log debug option, it is recommended to disable it just
>> before releasing (http://developer.android.com/guide/publishing/
>> preparing.html<
http://developer.android.com/guide/publishing/preparing.html>).
>>
>>
>
> Yes, whoever posted "log.d() gets stripped at runtime" was wrong. It's up
to
> you to do so.
>
> If you doubt this, install the Evernote client and run it with ADB
attached
> to your device. You'll see a bunch of logging active, including D-level.
> Note also that under Menu > Settings they have an item for "Send log";
> presumably the logging they leave enabled in production is to make these
> sent logs more useful.
>
> String
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Diacritics/international characters in AutoCompleteTextView

2011-02-04 Thread svebee
Can you post some basic example how could I integrate it into my case?

On Feb 2, 9:30 am, Kostya Vasilyev  wrote:
> You could implement your own filter, by overriding getFilter() in your
> adapter, and implementing a Filter that does what you want.
>
> http://developer.android.com/reference/android/widget/Filterable.html...()
>
> (various adapter classes implement Filterable)
>
> http://developer.android.com/reference/android/widget/Filter.html
>
> (this is what does the filtering)
>
> -- Kostya
>
> 02.02.2011 10:50, svebee пишет:
>
>
>
>
>
>
>
>
>
> > I have a (array) list
>
> > Car
> > Something
> > Šibica
> > Čavao
> > Cavao
>
> > Is there a way to "force" AutoCompleteTextView so if user type in
> > letter "c" it would show
>
> > Car
> > Čavao
> > Cavao
>
> > so it would show standard letter and international letter (C and Č/Ć,
> > S and Š, Z and Ž, D and Đ).
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget 
> --http://kmansoft.wordpress.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] Re: Diacritics/international characters in AutoCompleteTextView

2011-02-04 Thread Kostya Vasilyev
I don't have an example exactly for this case, but you can see the 
interaction between a MultiAutoCompleteTextView and the adapter, in the 
platform's email application.


http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=summary

The file you want is EmailAddressAdapter:

http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=blob;f=src/com/android/email/EmailAddressAdapter.java;h=ec11717bcbadd403751e99925195dabe75dd7605;hb=refs/heads/froyo

The Donut version is a bit easier to read:

http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=blob;f=src/com/android/email/EmailAddressAdapter.java;h=45636c0b9307f01bee87118457844c3f6792abd7;hb=refs/heads/donut

Here is another example:

http://thinkandroid.wordpress.com/2010/02/08/writing-your-own-autocompletetextview/

-- Kostya

04.02.2011 11:40, svebee пишет:

Can you post some basic example how could I integrate it into my case?

On Feb 2, 9:30 am, Kostya Vasilyev  wrote:

You could implement your own filter, by overriding getFilter() in your
adapter, and implementing a Filter that does what you want.

http://developer.android.com/reference/android/widget/Filterable.html...()

(various adapter classes implement Filterable)

http://developer.android.com/reference/android/widget/Filter.html

(this is what does the filtering)

-- Kostya

02.02.2011 10:50, svebee пишет:










I have a (array) list
Car
Something
Šibica
Čavao
Cavao
Is there a way to "force" AutoCompleteTextView so if user type in
letter "c" it would show
Car
Čavao
Cavao
so it would show standard letter and international letter (C and Č/Ć,
S and Š, Z and Ž, D and Đ).

--
Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Video play resume on Activity Switching

2011-02-04 Thread Amit
HI All,

Waiting for any response!

Thanks & Best Regards
Amit

On Feb 1, 5:53 pm, Amit  wrote:
> Hi All,
>
> I have created an activity( VideoViewActivity) having a VideoView and
> some Buttons. These buttons are used to perform "Share Video"  on
> various social channels. On click of these buttons i launch another
> activity and share the video link.
>
> When I start the VideoViewActivity, after initial buffering the video
> start playing. While the video is getting played, If I click on any of
> the share buttons, i switch to the respective share
> activity(FacebookActivity, TwitterActivity). When i come back to
> VideoViewActivity, what i observe is that the video play has been
> stopped.
>
> If i see the logcat, video's buffering start from beginning and also I
> have to manually click on the VideoView's play button to start the
> play.
>
> My questions is-
> How can I avoid the Video's buffering to happen from starting after
> coming back to VideoViewActivity, i.e. the video should start playing
> from the point where it got paused.
>
> Thanks & Best Regards
> Amit

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

2011-02-04 Thread Yahel
A little up on this. No one really ?

Yahel

On 3 fév, 19:49, Yahel  wrote:
> Hi all,
>
> I'm starting to implement a lazy image loader for the listview in my
> new project so I was gathering informations and came across Romain Guy
> full featured implementation in the project Android Shelves 
> :http://code.google.com/p/shelves/source/browse/trunk/Shelves/src/org/...
>
> While reading I found this piece of code I cannot understand
> (FLAG_DECODE_BITMAP_WITH_SKIA is set to false above in the code) :
>
>                     if (FLAG_DECODE_BITMAP_WITH_SKIA) {
>                         expiring.bitmap =
> BitmapFactory.decodeStream(in);
>                     } else {
>                         final ByteArrayOutputStream dataStream = new
> ByteArrayOutputStream();
>                         out = new BufferedOutputStream(dataStream,
> IOUtilities.IO_BUFFER_SIZE);
>                         IOUtilities.copy(in, out);
>                         out.flush();
>
>                         final byte[] data = dataStream.toByteArray();
>                         expiring.bitmap =
> BitmapFactory.decodeByteArray(data, 0, data.length);
>                     }
>
> I think SKIA is the Image library written by google, at least used by
> google.
>
> What I don't get is why is he doing a test here and what is the
> difference between the two types of loading ? They both are decoded by
> BitmapFactory. Why would the result be different ?
>
> Any insight ?

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

2011-02-04 Thread Yahel
My problem is that I don't choose the file I want to use, they are
picked by the user from internet.

I'm wondering if the way Romain Guy handles things in my other
question is not about that kind of problem. I'll give it a shot.

Yahel

On 21 jan, 16:33, nagarjuna lingala 
wrote:
> Internally there is difference between bitmap and jpg . You try to use
>  bmp file . Or try to convert  that jpg to bmp by using mspaint.
>  Dont hesitate me. it is just i hoped
>
> On 1/21/11, Yahel  wrote:
>
>
>
>
>
>
>
>
>
> > Thanks for your answer,
>
> > I was going to go this way but then I read the wikipedia article about
> > jpeg and I think I understood that sometimes the icc is coded in the
> > pixels and sometimes it's not. Making it quite difficult to work out.
>
> > I'm thinking of using the capture ability of a webview and the facts
> > that it knows how to load the image to try to get around.
>
> > Yahel
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Sent from my mobile device
>
>       * MIND OVERLOADING*

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

2011-02-04 Thread Kostya Vasilyev
The only difference I can see would be meaningful if BitmapFactory 
sometimes couldn't decode from a socket stream.


There is something about something like that (sorry, can't be more 
specific) here:


http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html

Perhaps it's been fixed, you can check the bug database:

http://code.google.com/p/android/issues/list

-- Kostya

04.02.2011 12:24, Yahel пишет:

A little up on this. No one really ?

Yahel

On 3 fév, 19:49, Yahel  wrote:

Hi all,

I'm starting to implement a lazy image loader for the listview in my
new project so I was gathering informations and came across Romain Guy
full featured implementation in the project Android Shelves 
:http://code.google.com/p/shelves/source/browse/trunk/Shelves/src/org/...

While reading I found this piece of code I cannot understand
(FLAG_DECODE_BITMAP_WITH_SKIA is set to false above in the code) :

 if (FLAG_DECODE_BITMAP_WITH_SKIA) {
 expiring.bitmap =
BitmapFactory.decodeStream(in);
 } else {
 final ByteArrayOutputStream dataStream = new
ByteArrayOutputStream();
 out = new BufferedOutputStream(dataStream,
IOUtilities.IO_BUFFER_SIZE);
 IOUtilities.copy(in, out);
 out.flush();

 final byte[] data = dataStream.toByteArray();
 expiring.bitmap =
BitmapFactory.decodeByteArray(data, 0, data.length);
 }

I think SKIA is the Image library written by google, at least used by
google.

What I don't get is why is he doing a test here and what is the
difference between the two types of loading ? They both are decoded by
BitmapFactory. Why would the result be different ?

Any insight ?



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Android RSS Library

2011-02-04 Thread Alex Horn
I have been working on an open-source (Apache 2.0) Android library to
read parts of RSS feeds [1]. The library specifically targets the
Android platform by using (Level 1) APIs such as android.net.Uri. The
design features stream parsing with SAX. As a result, the memory
footprint tends to be smaller compared to an equivalent DOM-based
solution. Furthermore, the use of hash tables facilitates the
construction of POJOs which represent RSS feeds.

At the time of writing, this new RSS library can be imported into an
existing mobile app project with the "android update project" command
[2]. Detailed instructions are included in the README file. I hope
someone finds this library useful in the making of new or the
simplification of existing Android apps.

Contributions in form of "git pull" requests are welcome. However,
such contributions should be supported by unit tests since the project
uses Maven to integrate with a headless unit testing harness.

Cheers,
Alex

[1] https://github.com/ahorn/android-rss
[2] http://developer.android.com/guide/developing/other-ide.html#libraryProject

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

2011-02-04 Thread Mark Carter
Yeah, I wasn't thinking of killing all the functionality (in the Pro)
straight away - rather when, say, 95% of users had already installed the
"Lite" version.

Anyway, it's all way too messy to seriously consider.

Ideally, I would rather the Pro version becomes free (supporting in-app
upgrades), and Lite users gradually move over to that. And that somehow, the
licensing system can know which category the user falls into:

1. Paid for the app (i.e. got it *before* it became free) (LICENSED)
2. Did not pay for the app (i.e. got it *after* it became free), but
purchased the in-app-upgrade (LICENSED)
3. Neither paid for the app nor purchased the in-app-upgrade (NOT_LICENSED)

On 4 February 2011 15:17, String  wrote:

> On Friday, February 4, 2011 1:03:26 AM UTC, Mark Carter wrote:
>
> I can't see a nice way to do it. The best way I can think of is to
>> introduce in-app billing to the Lite version and convert the Pro version
>> into some kind of "pro key" token app. The Lite version would check for
>> existence of this "pro key" app (and validate) if the in-app-upgrade had not
>> been purchased.
>>
>> Does that work?
>>
>
> I'm not sure it does, actually. Consider your existing Pro users, most of
> whom presumably don't have the Lite version installed. When you convert Pro
> into (in your words) "just a marker app", all these users will lose the
> functionality until they go download the app formerly know as Lite. They'll
> also end up with both items in their app list unless you go through some
> shenanigans with hiding the Pro token app; I say "shenanigans" because you
> can't afford to hide it for users who *don't* have Lite installed. That's
> a PITA, I know, I've done that kind of thing. And in any case, you're likely
> to annoy and confuse a good percentage of your existing paid users.
>
> String
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Disable landscape orientation in Android Browser?

2011-02-04 Thread Grev
I have been suggested - 

 

But this only applies to an App, is there any way to do this in the browser?


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

[android-developers] Re: OpenJDK on Android

2011-02-04 Thread giangiammy
Hi guy,

I'm just now looking at this problem: how to run a Java applet (j2se)
on Android!

Surely a phone is small, but now we have 10" pads running android,
or netbook running android ... (the toshiba AC100 for example is a
dual
core ARM9 running at 1GHz).

I do not think that the power is a problem, and some devices are
not very different from a desktop.

It's not an academic question: for example I client of mine wants to
use a software for HMI generation (IEC 61499 ... industrial automation
field)
which produces a java applet, which should run on android devices.
It's an applet perfectly usable on an android devices, quite simple,
but it is generated according to j2se standard!

It's not a consumer market, but a big market anyway :-)

hope to hear news on this soon!

bye
giammy

On Jan 14, 3:16 pm, koala  wrote:
> For god sake,
>
> how convenient would it be to have OpenJDK running on android?
>
> Imagine if we could run swing, rmi, if we could run all java code as
> it is, we could run enterprise application clients. We could have
> android apps running on the desktop and on the phone.
>
> What's the blockage stopping us from doing this?
>
> Is it all about the price of google's shares vs the price of oracle's
> shares?

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


[android-developers] How to fetch own mobile number in android

2011-02-04 Thread vimal
I want to get mobile number of own mobile.

I searched android telephony class but i can not find any useful
function over there.

thanks in advance for your help.

Thanks,
Vimal Rajpara

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Yorgos X
Hi,

I am using a receiver to handle the receipt of the BOOT_COMPLETED action. It
works well when I am restarting my phone (an HTC Desire HD) but not when I
use power off and then start it up. The receiver is never called and it
seems as if the BOOT_COMPLETED action is never sent. I also noticed that
some other services that run on boot don't run as well after powering off
and starting up again. I have noticed that some handsets don't provide both
the power off and restart functionality.

Any ideas?

thanks in advance!

Yorgos

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

2011-02-04 Thread Daniel Drozdzewski
Koala,

Try this for starters:
http://stackoverflow.com/questions/4491720/why-android-is-built-on-a-vm-dalvik

and follow various pointer that appear there (like the video from
Google I/O 2008). It should shed some light on why there was a need to
rewrite JVM for speed and small memory footprint.

Just to let you know, Dalvik VM is based (in the areas that overlapped
with restricted architecture design) on Apache Harmony.

What you want is to port Apache Harmony to ARM architecture. It is not
a small nor easy task and you can appreciate yourself that desktop
machine does not have certain constraints present in a mobile device
even when computing power of the said mobile is on par with desktop.
(battery, memory, different OS design, ...)

Daniel




On Fri, Feb 4, 2011 at 6:44 AM, koala  wrote:
> That comment does not help me
>
> On Jan 19, 4:37 pm, viktor  wrote:
>> I think you should change the forum. For example Spring, Java WEB
>> development but notAndroid.
>>
>> On 14 Січ, 16:16, koala  wrote:
>>
>>
>>
>>
>>
>>
>>
>> > For god sake,
>>
>> > how convenient would it be to haveOpenJDKrunning onandroid?
>>
>> > Imagine if we could run swing, rmi, if we could run all java code as
>> > it is, we could run enterprise application clients. We could have
>> >androidapps running on the desktop and on the phone.
>>
>> > What's the blockage stopping us from doing this?
>>
>> > Is it all about the price of google's shares vs the price of oracle's
>> > shares?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Re: MediaPlayer getCurrentPosition problems on Android 2.2

2011-02-04 Thread mort
On 2 Feb., 09:57, roguel6  wrote:
> I am having the same issue with 2.2.2. The method getCurrentPosition() in
> MediaPlayer doesn't return the correct value. It is lower than real value. I
> have tried the same code in 2.1 and that works perfectly. Any fix for this?

At least nothing official I could find so far. There are some Issues
related with wrong positions and lengths (i.e. seekTo and getDuration
as well), like 2259, 8154, 12838, and 13227, but so far it doesn't
seem to be "starred enough". The trouble seems to occur if the files
use VBR or sampling rates over 44,100 (also below?). It also seems to
be the case for Ogg Vorbis (Issue 11590).

btw, for the original post: Using a handler every second might be too
slow. The handler is executed in a loop, so it won't be executed
exactly each second but with a little delay, depending on the device's
speed and other tasks done. So after a while, the display might skip
from x:00(,9) to x:02(,0).

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


[android-developers] Re: SKIA Bitmap loading ??

2011-02-04 Thread Yahel
Excellent link and info Kostya, thank you. I believe you're right it's
not the same implementation but it's the same principle.

I hadn't seen this article. Very interesting.

Yahel

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

2011-02-04 Thread mort
As Mark stated correcly, you can't modify the original except with an
own ROM.

However, you can respond to ACTION_SCREEN_OFF or ACTION_SCREEN_ON
(note you must register it manually with registerReceiver, it's not
enough to add it in the manifest!) to show your own Activity.
You can either use
getWindow().addFlags( WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED )
to let it stay above the system's lock screen, or use the
KeyguardManager to temporarily disable it (doesn't work for pattern
lock).

However, this "own lock screen" will not be exactly like the system
lock screen. It's impossible for a common app to lock the status bar
and the Home button. Some lock screen replacements work around the
Home button issue by letting themselves to be made the default home
screen and then forwarding to the proper home screen, which must be
chosen in the lock screen app. Not very elegant, but working...
Also, if you want a slider, you've got to write your own code or copy
from the Android source code. Sliders aren't public UI elements.

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

2011-02-04 Thread Kostya Vasilyev
It's really a shame that that blog has no search function. But I think I
remember reading somewhere that Shelves is too old to be useful as a sample
these days. The blog post is I linked to is, I believe, more recent.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
04.02.2011 13:27 пользователь "Yahel"  написал:
> Excellent link and info Kostya, thank you. I believe you're right it's
> not the same implementation but it's the same principle.
>
> I hadn't seen this article. Very interesting.
>
> Yahel
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] How to fetch own mobile number in android

2011-02-04 Thread Marcin Orlowski
On 4 February 2011 11:06, vimal  wrote:
> I want to get mobile number of own mobile.

TelephonyManager tMgr
=(TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);
mPhoneNumber = tMgr.getLine1Number();

but be aware it's not guaranteed you get it (so check for NULLs)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Marcin Orlowski
> I am using a receiver to handle the receipt of the BOOT_COMPLETED action. It
> works well when I am restarting my phone (an HTC Desire HD) but not when I
> use power off and then start it up. The receiver is never called and it
> seems as if the BOOT_COMPLETED action is never sent. I also noticed that
> some other services that run on boot don't run as well after powering off
> and starting up again. I have noticed that some handsets don't provide both
> the power off and restart functionality.
>
> Any ideas?

Custom ROM by any chance?

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

2011-02-04 Thread Marcin Orlowski
On 3 February 2011 17:12, Roman Mazur  wrote:
> Android 3.0 is designed specifically for tablet devices, and it has a
> lot of changes in core frameworks.
> So what is the best strategy for android developers: create a separate
> application for android 3.0 version or provide a single app that
> supports mobile (2.x) versions too?

Depends on what type of app you are working on. Sometimes it'd suffice
to just create separate layouts to best fit tablet string, sometimes you
may prefer to rework the whole app.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Yorgos X
nope, not even rooted or anything. just a phone off a shop shelf, untouched
:)

On Fri, Feb 4, 2011 at 12:51 PM, Marcin Orlowski
wrote:

> > I am using a receiver to handle the receipt of the BOOT_COMPLETED action.
> It
> > works well when I am restarting my phone (an HTC Desire HD) but not when
> I
> > use power off and then start it up. The receiver is never called and it
> > seems as if the BOOT_COMPLETED action is never sent. I also noticed that
> > some other services that run on boot don't run as well after powering off
> > and starting up again. I have noticed that some handsets don't provide
> both
> > the power off and restart functionality.
> >
> > Any ideas?
>
> Custom ROM by any chance?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Kostya Vasilyev
Is the app installed on the memory card?

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
04.02.2011 13:55 пользователь "Yorgos X"  написал:
> nope, not even rooted or anything. just a phone off a shop shelf,
untouched
> :)
>
> On Fri, Feb 4, 2011 at 12:51 PM, Marcin Orlowski
> wrote:
>
>> > I am using a receiver to handle the receipt of the BOOT_COMPLETED
action.
>> It
>> > works well when I am restarting my phone (an HTC Desire HD) but not
when
>> I
>> > use power off and then start it up. The receiver is never called and it
>> > seems as if the BOOT_COMPLETED action is never sent. I also noticed
that
>> > some other services that run on boot don't run as well after powering
off
>> > and starting up again. I have noticed that some handsets don't provide
>> both
>> > the power off and restart functionality.
>> >
>> > Any ideas?
>>
>> Custom ROM by any chance?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com

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

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

Re: [android-developers] How do certain application backup the APK files?

2011-02-04 Thread Marcin Orlowski
On 28 January 2011 23:02, Rahul  wrote:
> I just came across Astro File Manager that lets you make backups of
> applications installed on the device. I just tested the application
> and it doesn't seem to require root on the device. So this application
> is somehow able to access the apk's of the applications installed and
> make a backup of the same. Out of curiosity, how can one go about
> doing this? Do I need to query the PackageManager or is there a
> different way?

Installed apps are in /data/app - if you can read this folder and files, you can
copy them out. Restoring however may not be that easy as write access will
most likely be rejected for non rooted phones so whatever you backed up
will have simply be reinstalled

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


Re: [android-developers] how to disable the "Clear data" Button (Froyo)

2011-02-04 Thread Marcin Orlowski
On 3 February 2011 02:36, Takanawa  wrote:
> Please teach me about "android:allowclearuserdata=false" in
> Android2.2(Froyo).

don't post your question on daily basis. You asked - now wait if
anyone would wish to respond.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Yorgos X
well, i run it from eclipse to install it and then restart and power off the
phone to test if it works. Are the apps run straight from eclipse stored on
the SD card? i don't know about that to be honest. I haven't done that
explicitly though

2011/2/4 Kostya Vasilyev 

> Is the app installed on the memory card?
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.com
> 04.02.2011 13:55 пользователь "Yorgos X"  написал:
>
> > nope, not even rooted or anything. just a phone off a shop shelf,
> untouched
> > :)
> >
> > On Fri, Feb 4, 2011 at 12:51 PM, Marcin Orlowski
> > wrote:
> >
> >> > I am using a receiver to handle the receipt of the BOOT_COMPLETED
> action.
> >> It
> >> > works well when I am restarting my phone (an HTC Desire HD) but not
> when
> >> I
> >> > use power off and then start it up. The receiver is never called and
> it
> >> > seems as if the BOOT_COMPLETED action is never sent. I also noticed
> that
> >> > some other services that run on boot don't run as well after powering
> off
> >> > and starting up again. I have noticed that some handsets don't provide
> >> both
> >> > the power off and restart functionality.
> >> >
> >> > Any ideas?
> >>
> >> Custom ROM by any chance?
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to
> android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> 
> >
>
> >> For more options, visit this group at
> >> http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Marcin Orlowski
On 4 February 2011 11:54, Yorgos X  wrote:
> nope, not even rooted or anything. just a phone off a shop shelf, untouched
> :)

Then it shall just work as it does here. Checked device logs?  Also if
you rely on that broadcars make sure your app prevents SD card
installation as SD card is not mounted when that broadcast gets
propagated so your app won't it.

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


Re: [android-developers] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Marcin Orlowski
2011/2/4 Yorgos X :
> well, i run it from eclipse to install it and then restart and power off the
> phone to test if it works. Are the apps run straight from eclipse stored on
> the SD card? i don't know about that to be honest. I haven't done that
> explicitly though

No, they are run from internal memory, so that shall be fine.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Yorgos X
I basically start an activity which is the main activity of my app on
startup (I want the app to appear straight when you turn on the phone). So
my main activity is declared as launcher in the manifest and in my receiver
class I start an intent that launches it as well:

.














2011/2/4 Yorgos X 

> well, i run it from eclipse to install it and then restart and power off
> the phone to test if it works. Are the apps run straight from eclipse stored
> on the SD card? i don't know about that to be honest. I haven't done that
> explicitly though
>
> 2011/2/4 Kostya Vasilyev 
>
> Is the app installed on the memory card?
>>
>> --
>> Kostya Vasilyev -- http://kmansoft.wordpress.com
>> 04.02.2011 13:55 пользователь "Yorgos X"  написал:
>>
>> > nope, not even rooted or anything. just a phone off a shop shelf,
>> untouched
>> > :)
>> >
>> > On Fri, Feb 4, 2011 at 12:51 PM, Marcin Orlowski
>> > wrote:
>> >
>> >> > I am using a receiver to handle the receipt of the BOOT_COMPLETED
>> action.
>> >> It
>> >> > works well when I am restarting my phone (an HTC Desire HD) but not
>> when
>> >> I
>> >> > use power off and then start it up. The receiver is never called and
>> it
>> >> > seems as if the BOOT_COMPLETED action is never sent. I also noticed
>> that
>> >> > some other services that run on boot don't run as well after powering
>> off
>> >> > and starting up again. I have noticed that some handsets don't
>> provide
>> >> both
>> >> > the power off and restart functionality.
>> >> >
>> >> > Any ideas?
>> >>
>> >> Custom ROM by any chance?
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups "Android Developers" group.
>> >> To post to this group, send email to
>> android-developers@googlegroups.com
>> >> To unsubscribe from this group, send email to
>> >> android-developers+unsubscr...@googlegroups.com
>> 
>> >
>>
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/android-developers?hl=en
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to
>> android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/android-developers?hl=en
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

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

2011-02-04 Thread Marcin Orlowski
On 3 February 2011 23:01, String  wrote:

> Yes, whoever posted "log.d() gets stripped at runtime" was wrong.

Really? http://developer.android.com/reference/android/util/Log.html

> It's up to you to do so.

Never investigated too deeply, but from I rememeber I saw no Log.d entries
on production devices I've checked our app on. It may though be possible
some devices behave differently

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Marcin Orlowski
2011/2/4 Yorgos X :
> I basically start an activity which is the main activity of my app on
> startup (I want the app to appear straight when you turn on the phone). So
> my main activity is declared as launcher in the manifest and in my receiver
> class I start an intent that launches it as well:
>
> .
>                  android:label="@string/app_name">
>     
>     
>     
>     
>     
>     
>             
>                  />
>                 
>             
>         
>     

remove category from boot filter

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Yorgos X
yeah, i have checked the logs and thre is no indication of the app starting
or the action boot_completed received. the sd is not mounted neither when
the app is installed or at anytime during the testing process. As I've said
before, on other devices that only provide "power off" functionality and not
bot power off and restart, when I power off and then start up again, the
action is received normally. On my phone it works well on restarting but not
when powering off and then starting.

On Fri, Feb 4, 2011 at 1:09 PM, Marcin Orlowski wrote:

> 2011/2/4 Yorgos X :
> > well, i run it from eclipse to install it and then restart and power off
> the
> > phone to test if it works. Are the apps run straight from eclipse stored
> on
> > the SD card? i don't know about that to be honest. I haven't done that
> > explicitly though
>
> No, they are run from internal memory, so that shall be fine.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: SIP Demo and Android 2.3 problem

2011-02-04 Thread jan telega
Actually emulator supports SIP.
All you have to do to make it works is described here:
http://code.google.com/p/android/issues/detail?id=13037

On 9 Gru 2010, 20:30, WindowsNT  wrote:
> I am waiting for them to fix it. The emulator simply doesn't support
> SIP. Too bad.
>
> On Dec 8, 8:35 am, jan telega  wrote:
>
>
>
>
>
>
>
> > Hi,
> > i tried to run SIP Demo (http://developer.android.com/resources/
> > samples/SipDemo/index.html) and start developing SIP application,
> > but i found one problem at the beginning (of course i updated sdk, adt
> > and set up new virtual device with api level 9):
> >  in main activity class [line 86]:
>
> >  public void initializeManager() {
> >         if(manager == null) {
> >           manager = SipManager.newInstance(this);  <-- this always
> > returns null, which means that SIP API is not supported
> >         }
>
> >         initializeLocalProfile();
> >     }
>
> > i also checked SipManager.isApiSupported(applicationContext) and it
> > always returns false, i set up several virtual devices and it didnt
> > help.
>
> > SipManager declatarion is the first step during establishing Sip
> > connection, so this problem does not concern sip domain etc.
>
> > It looks like problem with emulator.
>
> > Have you faced this problem?
> > Any ideas how to resolve it?

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


Re: [android-developers] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Yorgos X
Mysteriously enough (new phone, haven't explored it much), a setting was
preset to fast boot the device (is called "Fast boot - turn off to use some
Market apps") and this apparently causes the device to start after a power
off without sending the BOOT_COMPLETED action. Can any of you test this on
their devices to confirm it is happenning for a fact? I unchecked this
setting and my receiver works on both power off/startup and restart.

On Fri, Feb 4, 2011 at 1:15 PM, Yorgos X  wrote:

> yeah, i have checked the logs and thre is no indication of the app starting
> or the action boot_completed received. the sd is not mounted neither when
> the app is installed or at anytime during the testing process. As I've said
> before, on other devices that only provide "power off" functionality and not
> bot power off and restart, when I power off and then start up again, the
> action is received normally. On my phone it works well on restarting but not
> when powering off and then starting.
>
>
> On Fri, Feb 4, 2011 at 1:09 PM, Marcin Orlowski 
> wrote:
>
>> 2011/2/4 Yorgos X :
>> > well, i run it from eclipse to install it and then restart and power off
>> the
>> > phone to test if it works. Are the apps run straight from eclipse stored
>> on
>> > the SD card? i don't know about that to be honest. I haven't done that
>> > explicitly though
>>
>> No, they are run from internal memory, so that shall be fine.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

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

[android-developers] Re: How to fetch own mobile number in android

2011-02-04 Thread vimal
Thanks for your reply , getLine1Number() only guaranteed to get mobile
number if MSISDN number seted for mobile device , we can check from
Setting -> About Phone ->->-> MSISDN.

Other things happen with me is that recently i am using new sim card -
for new sim card MSISDN number didnt change, MSISDN number shows old
sim card's mobile number :( so need to find out why MSISDN did not
change after changing sim card.


On Feb 4, 3:51 pm, Marcin Orlowski  wrote:
> On 4 February 2011 11:06, vimal  wrote:
>
> > I want to get mobile number of own mobile.
>
> TelephonyManager tMgr
> =(TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);
> mPhoneNumber = tMgr.getLine1Number();
>
> but be aware it's not guaranteed you get it (so check for NULLs)

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

2011-02-04 Thread Deltaflux
I've discovered a problem passing an array from a vertex shader to a pixel 
shader. Somewhere the array ends up overlapping with other constants, for 
example if I have an array of UV coordinates and a colour being passed 
though, then changing the UV coordinates will affect the colour. Using 
either the colour or UV alone works, I assume because the compiler optimises 
out the unused variables and prevents the overwrite occurring. This happens 
even with an array size of 1.

To give a simple example, this pixel shader will render incorrectly:

varying highp vec4 vl_TexCoord[1];
varying highp vec4 vl_Color;
uniform highp sampler2D _diffuseMap;
void main() {
   gl_FragColor = vl_Colo r* texture2D(_diffuseMap,  vl_TexCoord[0].xy);
}

However changing main to either of these cases work, giving either a 
correctly mapped texture, or correct vertex colour:

void main() {
   gl_FragColor = vl_Color;
}

void main() {
   gl_FragColor = texture2D(_diffuseMap,  vl_TexCoord[0].xy);
}

Changing the vl_TexCoord array to a simple vec4 makes the problem go away, 
so I have a workaround, but this seems like a fairly serious problem, 
possibly in the shader compiler.

The same issue was raised on gamedev so I think it's a genuine bug:
http://www.gamedev.net/topic/594352-gl-20-shader-varying-array-problem/

Has anyone else experienced this problem? I'm using a HTC Desire HD for 
testing, using the 2.2 Android SDK. I don't know if it's hardware or SDK 
version specific at the moment.

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

2011-02-04 Thread Deltaflux
The tutorials and samples are both really useful, although sometimes 
misleading. For example the CubeLiveWallpaper uses a canvas for rendering 
the 3D cube, but this is a really slow way of rendering animated content. I 
spent a while trying to work out why it was so slow before realising I 
should just use a GL View instead. That's only a minor criticism though, 
keep the tutorials/samples coming :)

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

2011-02-04 Thread Romain Guy
Shelves is still relevant, but it should be updated to show newer APIs and
take advantage of multiple resolutions and densities. There might be better
samples out there though :)

2011/2/4 Kostya Vasilyev 

> It's really a shame that that blog has no search function. But I think I
> remember reading somewhere that Shelves is too old to be useful as a sample
> these days. The blog post is I linked to is, I believe, more recent.
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.com
> 04.02.2011 13:27 пользователь "Yahel"  написал:
>
> > Excellent link and info Kostya, thank you. I believe you're right it's
> > not the same implementation but it's the same principle.
> >
> > I hadn't seen this article. Very interesting.
> >
> > Yahel
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Marcin Orlowski
On 4 February 2011 12:31, Yorgos X  wrote:
> Mysteriously enough (new phone, haven't explored it much), a setting was
> preset to fast boot the device (is called "Fast boot - turn off to use some
> Market apps") and this apparently causes the device to start after a power
> off without sending the BOOT_COMPLETED action. Can any of you test this on
> their devices to confirm it is happenning for a fact? I unchecked this
> setting and my receiver works on both power off/startup and restart.

That would be really silly "feature". What device is it?

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


[android-developers] Facebook = Done ; Twitter = Pending ; Developers please guide

2011-02-04 Thread Abhishek Talwar
Hey guys
I have completed my quest over facebook to post a simple text ,
image , link in facebook.
Now i have to do the same for twitter, any word over this topic will
be appreciated .
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] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Yorgos X
HTC Desire HD

On Fri, Feb 4, 2011 at 1:54 PM, Marcin Orlowski wrote:

> On 4 February 2011 12:31, Yorgos X  wrote:
> > Mysteriously enough (new phone, haven't explored it much), a setting was
> > preset to fast boot the device (is called "Fast boot - turn off to use
> some
> > Market apps") and this apparently causes the device to start after a
> power
> > off without sending the BOOT_COMPLETED action. Can any of you test this
> on
> > their devices to confirm it is happenning for a fact? I unchecked this
> > setting and my receiver works on both power off/startup and restart.
>
> That would be really silly "feature". What device is it?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

2011-02-04 Thread Amit
Hi,

Is it possible to trigger periodic network I/O from a pocess, who is
currently in background. And in my case it is possible that none of
activiy is in foreground at the time when network i/o is requested.
This I/O is client driven.

Thanks in advance
-Amit

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

2011-02-04 Thread Kostya Vasilyev
Yes, use AlarmManager, possibly with an IntentService or
WakefulIntentService.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
04.02.2011 15:14 пользователь "Amit"  написал:
> Hi,
>
> Is it possible to trigger periodic network I/O from a pocess, who is
> currently in background. And in my case it is possible that none of
> activiy is in foreground at the time when network i/o is requested.
> This I/O is client driven.
>
> Thanks in advance
> -Amit
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Facebook = Done ; Twitter = Pending ; Developers please guide

2011-02-04 Thread Robin Talwar
This is the code which i am using :-

package org.myTweet;

import oauth.signpost.OAuthProvider;
import oauth.signpost.basic.DefaultOAuthProvider;
import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer;
import oauth.signpost.exception.OAuthCommunicationException;
import oauth.signpost.exception.OAuthExpectationFailedException;
import oauth.signpost.exception.OAuthMessageSignerException;
import oauth.signpost.exception.OAuthNotAuthorizedException;

import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class myTweet extends Activity {
Button twtbtn;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
  /*  final CommonsHttpOAuthConsumer consumer = new
CommonsHttpOAuthConsumer(
"EuMduRyU4fJcaVgPuN9vA",
"JsiDIvPTPhxcV7NgYkw5HVDO0HC41eI2A8ELVLwqqRU");

final OAuthProvider provider = new DefaultOAuthProvider("
http://twitter.com/oauth/request_token";, "
http://twitter.com/oauth/access_token";,
"http://twitter.com/oauth/authorize";);
HttpClient client = new DefaultHttpClient();*/

twtbtn = (Button)findViewById(R.id.twtbtn);
twtbtn.setOnClickListener(new OnClickListener(){

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
// Context ctx whichever way you passing it in
CommonsHttpOAuthConsumer consumer = new
CommonsHttpOAuthConsumer(
"EuMduRyU4fJcaVgPuN9vA",
"JsiDIvPTPhxcV7NgYkw5HVDO0HC41eI2A8ELVLwqqRU");
OAuthProvider provider = new DefaultOAuthProvider("
http://twitter.com/oauth/request_token";, "
http://twitter.com/oauth/access_token";,
"http://twitter.com/oauth/authorize";);
 HttpClient client = new DefaultHttpClient();
String authUrl = null;
try {
   * authUrl = provider.retrieveRequestToken(consumer,
"myTweet://twitt");
myTweet.this.startActivity(new
Intent(Intent.ACTION_VIEW, Uri.parse(authUrl)));*
} catch (OAuthMessageSignerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (OAuthNotAuthorizedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (OAuthExpectationFailedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (OAuthCommunicationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}



}

});

}
}

I think the 2 lines of code which are in try - catch statement are causing
the problem since everytime i run this
i get an OUTHCommunicationException . Right now i am not calling the
callback lets just first navigate the app to twitter login page.
I have added following in manifest also :-
 






Let me know what is wrong in the application

On Fri, Feb 4, 2011 at 5:30 PM, Abhishek Talwar <
r.o.b.i.n.abhis...@gmail.com> wrote:

> Hey guys
> I have completed my quest over facebook to post a simple text ,
> image , link in facebook.
> Now i have to do the same for twitter, any word over this topic will
> be appreciated .
> 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] Re: On-the-fly decryption of large files

2011-02-04 Thread Peter Sutton
Never worked with JNI or the NDK. However, programming's programming. How 
difficult do you think this task would be?

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: SKIA Bitmap loading ??

2011-02-04 Thread Yahel
Thanks for your input Romain, could you comment on the original
question as well ?

What was the point of the SKIA testing and what are the difference
between the two way of downloading an image ?

Yahel

On 4 fév, 12:53, Romain Guy  wrote:
> Shelves is still relevant, but it should be updated to show newer APIs and
> take advantage of multiple resolutions and densities. There might be better
> samples out there though :)
>
> 2011/2/4 Kostya Vasilyev 
>
>
>
>
>
>
>
>
>
> > It's really a shame that that blog has no search function. But I think I
> > remember reading somewhere that Shelves is too old to be useful as a sample
> > these days. The blog post is I linked to is, I believe, more recent.
>
> > --
> > Kostya Vasilyev --http://kmansoft.wordpress.com
> > 04.02.2011 13:27 пользователь "Yahel"  написал:
>
> > > Excellent link and info Kostya, thank you. I believe you're right it's
> > > not the same implementation but it's the same principle.
>
> > > I hadn't seen this article. Very interesting.
>
> > > Yahel
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, 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
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them

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

2011-02-04 Thread Kostya Vasilyev

Peter,

Is your content provider serving data to other (not written by you) 
applications?


I'm thinking perhaps you could change the interface somewhat, I have 
some ideas, but it only makes sense if you can use something other than 
ContentResolver.openInputStream.


-- Kostya

04.02.2011 15:33, Peter Sutton пишет:
Never worked with JNI or the NDK. However, programming's programming. 
How difficult do you think this task would be?


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 



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Re: On-the-fly decryption of large files

2011-02-04 Thread Kostya Vasilyev
Oh, one other thing - it should be possible to use a socket to send the 
data across.


ParcelFileDescriptor.fromSocket is API level 1.

In theory, less secure, but it probably requires rooted firmware to 
listen to traffic going over the local interface, and then a pipe would 
be compromised too.


-- Kostya

04.02.2011 15:33, Peter Sutton пишет:
Never worked with JNI or the NDK. However, programming's programming. 
How difficult do you think this task would be?


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 



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Maintaining a free and paid version & maybe other version

2011-02-04 Thread Régis
Yes, I somehow also miss precompilation in Java ;-)

I suppose you could simply define a constant somewhere in your code like 
{{boolean Constant.FULLVERSION}} and then use
if(Constant.FULLVERSION) {
   // interesting code
}
else {
   throw new UnimlementedException("Please buy the full version");
}

(if you are new to java, rest calm: the java compiler will *not* produce 
bytecode for such dead code)


You can then easily publish two versions of your application, simply by 
changing the value of the constant and recompiling.

For multiple version, that could be an enumeration.

An alternative approach is to have the free version contain everything, with 
a method checking for a key instead of the constant, and then to sell an 
"unlock application" that simply provides a valid license.

Hope this helps
-- 
Régis

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

2011-02-04 Thread astegic astegic
HI,

I am using a TableLayout in my activity but because of some reason it is
getting Invalidated (columns of table layout are falling towards one side of
the screen) and I have to call table.requestlayout()
to make it look fine again and again.

I found a scenario in which my TableLayout is getting invalidated,
scenario::

Let A is a activity with a tablelayout (with 3 columns and 3 rows) which
support only portrait mode.
And B is a activity which support portrait and landscape mode and can be
called from A only.

Steps to reproduce ::
1. Run the activity A whose default orientation is Portrait.
2. Change the orientation of the activity A to landscape mode.
3. Go to activity B from activity A.
4. Change the orientation of activity B from landscape to portrait.
5. Go back to activity A by just finishing the activity B.
6. Activity A will be opened in Portrait mode and the columns of the Table
will get fell on the right side of the screen (i.e the space between the
columns is getting removed).

Has anybody faced the same problem, please suggest a solution.

Any help would be appreciable.

Regards,
Astegic

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

2011-02-04 Thread astegic astegic
HI,

I am using a TableLayout in my activity but because of some reason it
is getting Invalidated (columns of table layout are falling towards
one side of the screen) and I have to call table.requestlayout()
to make it look fine again and again.

I found a scenario in which my TableLayout is getting invalidated,
scenario::

Let A is a activity with a tablelayout (with 3 columns and 3 rows)
which support only portrait mode.
And B is a activity which support portrait and landscape mode and can
be called from A only.

Steps to reproduce ::
1. Run the activity A whose default orientation is Portrait.
2. Change the orientation of the activity A to landscape mode.
3. Go to activity B from activity A.
4. Change the orientation of activity B from landscape to portrait.
5. Go back to activity A by just finishing the activity B.
6. Activity A will be opened in Portrait mode and the columns of the
Table will get fell on the right side of the screen (i.e the space
between the columns is getting removed).

Has anybody faced the same problem, please suggest a solution.

Any help would be appreciable.

Regards,
Astegic

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

2011-02-04 Thread Mark Murphy
On Fri, Feb 4, 2011 at 1:13 AM, Jeffrey  wrote:
> Okay, figured it out. I guess I can't have anything from the
> AppWidgetProvider class activate a registerReceiver so I have to make
> a service to do it. I don't keep it running, just launch it to update
> everything then it dies.

If the Context passed into your onReceive() method is named ctxt, use:

ctxt.getApplicationContext().registerReceiver(null, myIntentFilter);

Then, you won't need service and extra overhead of starting it up.

I just remembered that I had a blog post on this:

http://commonsware.com/blog/2010/09/12/real-use-getapplicationcontext.html

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

Android Training in Atlanta: http://bignerdranch.com/classes/android

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


Re: [android-developers] Re: Where to put a broadcast receiver for a widget

2011-02-04 Thread Mark Murphy
On Thu, Feb 3, 2011 at 9:30 PM, AndroidDevTime  wrote:
> what are the power battery performance implications of maintaining a
> service? Will this drain the battery more to keep a service up and
> running?  Especially if you bind to the service from the widget to
> call service functions?

It takes up RAM more than battery, though it depends a bit on what the
service does. The task killer category of apps were largely invented
to help deal with developers who try to have everlasting services.

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

Android Training in Atlanta: http://bignerdranch.com/classes/android

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


[android-developers] Silent Installation for Android

2011-02-04 Thread dacky
Hi,

I am wondering that now android has a market web store already and
installing applications through the web client simply pushes the
application you want to install to your device painlessly and
silently. Is silent installation possible for 3rd party developers? If
it is availabe where can we get information about it?


Thank you.

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


Re: [android-developers] Playing an audio file during a call

2011-02-04 Thread Mark Murphy
On Fri, Feb 4, 2011 at 12:10 AM, Nagesh  wrote:
> I am new to android development, i am developing one application which
> needs to play an audio song to callee when call is lifted by callee,
> and automatically call has to be disconnected automatically when audio
> song playing completed . i tried to find in android API for any
> classes or methods to do this, but failed to find... please help me
> how to do this..
> your answer could be helpful to me...please do reply

This is not possible, as you do not have access to the in-call audio in Android.

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

Android Training in Atlanta: http://bignerdranch.com/classes/android

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


Re: [android-developers] Re: How to fetch own mobile number in android

2011-02-04 Thread 陈彧堃
That's almost impossible. Use short message to do it.

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

Re: [android-developers] Silent Installation for Android

2011-02-04 Thread Mark Murphy
On Fri, Feb 4, 2011 at 8:14 AM, dacky  wrote:
> I am wondering that now android has a market web store already and
> installing applications through the web client simply pushes the
> application you want to install to your device painlessly and
> silently. Is silent installation possible for 3rd party developers?

No, sorry.

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

Android Training in Atlanta: http://bignerdranch.com/classes/android

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


Re: [android-developers] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Mark Murphy
Egad.

Can you tell me where in the Settings app (or elsewhere) this checkbox resides?

Thanks!

On Fri, Feb 4, 2011 at 7:06 AM, Yorgos X  wrote:
> HTC Desire HD
>
> On Fri, Feb 4, 2011 at 1:54 PM, Marcin Orlowski 
> wrote:
>>
>> On 4 February 2011 12:31, Yorgos X  wrote:
>> > Mysteriously enough (new phone, haven't explored it much), a setting was
>> > preset to fast boot the device (is called "Fast boot - turn off to use
>> > some
>> > Market apps") and this apparently causes the device to start after a
>> > power
>> > off without sending the BOOT_COMPLETED action. Can any of you test this
>> > on
>> > their devices to confirm it is happenning for a fact? I unchecked this
>> > setting and my receiver works on both power off/startup and restart.
>>
>> That would be really silly "feature". What device is it?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



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

Android Training in Atlanta: http://bignerdranch.com/classes/android

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


[android-developers] Re: Silent Installation for Android

2011-02-04 Thread dacky
So this feature is just for android. Are there any plans in the future
to make this available for developers?

On Feb 4, 2:16 pm, Mark Murphy  wrote:
> On Fri, Feb 4, 2011 at 8:14 AM, dacky  wrote:
> > I am wondering that now android has a market web store already and
> > installing applications through the web client simply pushes the
> > application you want to install to your device painlessly and
> > silently. Is silent installation possible for 3rd party developers?
>
> No, sorry.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in Atlanta:http://bignerdranch.com/classes/android

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


Re: [android-developers] Re: Silent Installation for Android

2011-02-04 Thread Mark Murphy
On Fri, Feb 4, 2011 at 8:30 AM, dacky  wrote:
> So this feature is just for android. Are there any plans in the future
> to make this available for developers?

I rather doubt it. Device manufacturers may have access to it for
their own markets (e.g., SHOP4APPS) -- I haven't used any of those to
see their behavior.

Typically, asking "are there any plans in the future" is a pointless
exercise with Android. You find out when the rest of us find out,
if/when it happens.

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

Android Training in Atlanta: http://bignerdranch.com/classes/android

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


Re: [android-developers] RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-04 Thread Yorgos X
it is in menu -> settings -> applications

there are the five below options there:
- unknown sources
- manage applications
- running services
- development
- fast boot


On Fri, Feb 4, 2011 at 3:30 PM, Mark Murphy  wrote:

> Egad.
>
> Can you tell me where in the Settings app (or elsewhere) this checkbox
> resides?
>
> Thanks!
>
> On Fri, Feb 4, 2011 at 7:06 AM, Yorgos X  wrote:
> > HTC Desire HD
> >
> > On Fri, Feb 4, 2011 at 1:54 PM, Marcin Orlowski <
> webnet.andr...@gmail.com>
> > wrote:
> >>
> >> On 4 February 2011 12:31, Yorgos X  wrote:
> >> > Mysteriously enough (new phone, haven't explored it much), a setting
> was
> >> > preset to fast boot the device (is called "Fast boot - turn off to use
> >> > some
> >> > Market apps") and this apparently causes the device to start after a
> >> > power
> >> > off without sending the BOOT_COMPLETED action. Can any of you test
> this
> >> > on
> >> > their devices to confirm it is happenning for a fact? I unchecked this
> >> > setting and my receiver works on both power off/startup and restart.
> >>
> >> That would be really silly "feature". What device is it?
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to
> android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >> http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Training in Atlanta: http://bignerdranch.com/classes/android
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 behavior on client side license validity check for free apps

2011-02-04 Thread MarcoAndroid
@rojorshi: here's the link you were looking for I think. Seems you
should be fine for free apps. Just search for the word 'free' in this
link: http://developer.android.com/guide/publishing/licensing.html
It looks like you won't be able to upload a free version with the LVL
permission in it... if your app is already available as free.

But it also says it returns LICENSED for free apps in table A-2. So
what situation would this be then?


On Feb 3, 6:01 am, rajorshi  wrote:
> I had developed a game intending to publish it as a paid application
> using the Android LVL with the default ServerManagedPolicy licensing
> policy. Now, the powers that be have decided that we have to publish
> it as a free app. For some reason I do not want to remove/disable the
> license checks. My question is: how does the licensing service handle
> free apps? Will checks always fail or always pass? Is there any way I
> can make the license service accept any installation of my free app as
> licensed?
>
> I found the following on free apps in the official documentation, but,
> it doesn't help me much.
>
> "Only paid applications published through Market can use the service.
> [...] Licensing is currently for paid apps only, since free apps are
> considered licensed for all users."
>
> I would have assumed that checks will fail, but, I remember reading
> somewhere that for free apps the licensing server will return a very
> large validity timestamp (long.MAX) ensuring that the license is
> always valid for free apps. Unfortunately, I have lost the link to
> that source.
>
> Note:
> 1. The problem is not as crazy as it sounds. It's just that I am not
> able to explain my use case further without giving away some
> proprietary information.
> 2. I had posted the same question on StackOverflow but did not get any
> response. Hence, posting it here.

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

2011-02-04 Thread Massimo Messore
Hi,

same issue here. It seems like froyo branch is not yet present in the
manifests.

Is there any chance to get it back?

Thanks in advance.
Pizza67

> -Original Message-
> From: android-developers@googlegroups.com [mailto:android-
> develop...@googlegroups.com] On Behalf Of Anees
> Sent: Monday, January 31, 2011 12:54 PM
> To: Android Developers
> Subject: [android-developers] Re: Can't get android sources
>
>
> Hi,
> I am also getting the same issue. Could anyone from Google kindly
> respond on this.
>
> BR,
> Anees
>
> On Jan 28, 11:21 pm, C06akaDuka  wrote:
> > I'm trying to get android-2.2-froyo sources using described procedure:
> > repo init -u git://android.git.kernel.org/platform/manifest.git -b
> > froyo
> >
> > but always get an error:
> > "error: revision froyo in manifests not found"
> >
> > What is the matter ?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en


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


Re: [android-developers] Re: Can't get android sources

2011-02-04 Thread Mark Murphy
On Fri, Feb 4, 2011 at 9:50 AM, Massimo Messore
 wrote:
> same issue here. It seems like froyo branch is not yet present in the
> manifests.
>
> Is there any chance to get it back?

Sure there is a chance. This list has nothing whatsoever to do with it, however.

Questions regarding the AOSP belong on a suitable AOSP list:

http://source.android.com/community/index.html

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

Android Training in Atlanta: http://bignerdranch.com/classes/android

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


[android-developers] Re: mysterious crash accessing Preferences - works if package name is changed

2011-02-04 Thread mot12
Looks like I screwed up big time. I retrieved the wrong revision when
checking this users code. The null pointer was actually the line
following:
if (Settings.System.getString(getContentResolver(),
Settings.System.ACCELEROMETER_ROTATION)).equals("1"))
which should have been
if
("1".equals(Settings.System.getString(getContentResolver(),
Settings.System.ACCELEROMETER_ROTATION
for obvious reasons.

Sorry for wasting everybody's time. The mystery remains why this code
didn't crash on this user's device if installed with a different
package name. What the heck, it may be wiser to pretend that none of
this ever happened and move on. Thanks for your help, both of you...

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


Re: [android-developers] Urgent Need : Oracle PL/SQL Developer in Cambridge, MA for 6+ Months(F_2_F)

2011-02-04 Thread Haroon Khalid
Agay

On Thu, Feb 3, 2011 at 4:42 PM, Kowshik Prakasam  wrote:

> Dickhead.
>
>
>
> On Tue, Feb 1, 2011 at 7:21 AM, Ajay - Gain America, Inc.  > wrote:
>
>>  Hi,
>>
>> * *
>>
>> We *Gain America, Inc* one of the fastest growing IT Consulting Company
>> in US. We have an urgent requirement with our client/Preferred Vendor.
>> The job details are given below.
>>
>> * *
>>
>> *Position: *Oracle PL/SQL Developer
>>
>> *Location: *Cambridge, MA
>>
>> *Duration: *6+ Months**
>>
>> * *
>>
>> *Face to Face Required after telephonic round***
>>
>> * *
>>
>> *Must Have Pharmacy Industry Experience.*
>>
>> * *
>>
>> *Description: *
>>
>> * *
>>
>> *They need someone who can take over development and support for a
>> substantial PL/SQL package, then take on additional work like ETL into
>> Oracle in the next few weeks and months.  ***
>>
>>
>>
>> Provide scientists with an integrated solution/ data warehouse allowing
>> them to access, view and analyze experimental results across assays, teams,
>> departments, locations etc. Enhance decision power of a scientist by
>> including all available internal and external metadata about assays,
>> targets, samples, diseases etc. in their analyses.
>>
>> *PL/SQL Developer - Required Skills and Experience:*
>>
>> • B.S. Computer Science or Computer Engineering or equivalent experience
>> • 5 years experience developing large database systems
>> • Significant experience with PL/SQL and database design
>> • Significant experience the development of database-based web services
>> • Significant experience supporting database application developers
>> • Deep and practical understanding of software development and project
>> management methodologies
>> • Excellent written and verbal communication skills
>> *• Any experience with scientific or drug discovery database or database
>> applications development a plus*
>>
>>
>>
>> Please send me your Updated Resume and these details ASAP:  **
>>
>> Full Name:
>>
>> Contact No:
>>
>> E-mail ID:
>>
>> Availability:
>>
>> Visa Status/Citizenship:
>>
>> Current Location:
>>
>> Rate or Employer Details:
>>
>>
>>
>> Regards,
>>
>>
>> *Ajay***
>>
>> Gain America, Inc. *I *13804 Hull Street Road Midlothian, VA 23112 *I*
>> Phone:703-880-8775/ Direct: 703-828-7441 *I* Fax: 917-475-8362 *I ***
>>
>> *I **ajay@gainam.* *net** I** YIM:** **
>> ajaytomar...@yahoo.in* * **I***
>>
>> P Please consider the environment before printing this e-mail.
>>
>>
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Need to buy 15 Nexus One Unlocked

2011-02-04 Thread joshbeck
Thanks, a few wrote me with good suggestions. I'll contact Best Buy
and find out what the unlocked price is.

I have 3 N1's in use in the class right now running Cyanogen. Wireless
AP only. Can't afford 15 plans.

Thanks to all of you who responded or emailed with suggestions. Very
helpful.

Josh


On Feb 4, 1:32 am, Brill Pappin  wrote:
> Note though that if your teaching a class, you don't need the SIM cards 
> installed to write applications (unless your specifically writing something 
> that uses it).
>
> I can just imagine what would happen in a class full of teenagers if there 
> were active SIMs in the phones :)
>
> - Brill Pappin
>
>
>
>
>
>
>
> Trevor Johns  wrote:
> >All Nexus S devices are unlocked. You can use any GSM SIM in them (though
> >whether you get 3G depends on the carrier), sideload apps if you need, and
> >you can unlock the bootloader by running 'fastboot oem unlock'.
>
> >(Note that unlocking the bootloader will void your warranty.)
>
> >--
> >Trevor Johns
> >Developer Programs Engineer, Android
> >http://developer.android.com
>
> >On Thu, Feb 3, 2011 at 9:08 PM, joshbeck  wrote:
>
> >> Hello,
>
> >> I'm a developer and I recently got a grant approved to buy hardware
> >> for an Android developer class.
> >> I'd like to get my hands on 15 Nexus 1's.  The limit listed is 10. Is
> >> there anyone I can contact?
>
> >> Can I get the Nexus S unlocked at Best Buy does anyone know?
>
> >> Thanks for any assistance.
>
> >> Josh Beck
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> >--
> >You received this message because you are subscribed to the Google
> >Groups "Android Developers" group.
> >To post to this group, send email to android-developers@googlegroups.com
> >To unsubscribe from this group, send email to
> >android-developers+unsubscr...@googlegroups.com
> >For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] "Finish" Activity from Dialog.. Not finishing

2011-02-04 Thread TreKing
On Thu, Feb 3, 2011 at 11:09 PM, Aruna Shidling wrote:

> Yes..


If your activity is the Home activity, what do you expect finish() to do?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: ServiceTestCase and Contexts

2011-02-04 Thread nate
I checked my setUp() method and I do call super.setUp() as the first
line.  The reason I believe the contexts are the same are two-fold:

I tried both:

getSystemContext().getAssets().list(".")
getContext().getAssets().open(".");

and neither of them listed any files.  The second reason is that I
read the code for ServiceTestCase and saw that the getSystemContext()
is just the
same context retrieved by getContext(), but it's grabbed before any
tests have a chance to mess with it(according to the comment in the
code):

@Override
protected void setUp() throws Exception {
super.setUp();

// get the real context, before the individual tests have a
chance to muck with it
mSystemContext = getContext();

}

So it would seem that getting the context to the app the testcase is
in is not possible with the ServiceTestCase, unless I am missing
something.



On Feb 3, 9:15 pm, "A. Elk"  wrote:
> What leads you to believe that both Context objects contain the same
> information? If you do a getSystemContext() you should get the context
> that's stored during setUp(). The only thing that might screw this up
> is if you overrode setUp() but forgot to call super.setUp() first.
>
> On Feb 2, 2:08 pm, nate  wrote:
>
>
>
>
>
>
>
> > Hey Everyone,
> >    I don't know if I am doing something wrong here, but when I am
> > trying to use the ServiceTestCase class to test my Service, I cannot
> > get a context which points to the test project.  getContext() and
> > getSystemContext() both seem to point to the target project's
> > context.  The reason I need the context of my test app is that i have
> > some assets which i need to be able to use in order to test the
> > service in question.  Does anyone know of a workaround or could point
> > me at a way of resolving this?  (i looked through the source of
> > ServiceTestCase and didn't see another way)
>
> > Something similar to instrumentationtestcase's
> > getInstrumentation.getContext() is what I am looking for.
>
> > 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: ServiceTestCase and Contexts

2011-02-04 Thread nate
Also, i put the test assets in the target project's directory and was
able to access them with:

getSystemContext().getAssets().list(".")

On Feb 4, 10:31 am, nate  wrote:
> I checked my setUp() method and I do call super.setUp() as the first
> line.  The reason I believe the contexts are the same are two-fold:
>
> I tried both:
>
> getSystemContext().getAssets().list(".")
> getContext().getAssets().open(".");
>
> and neither of them listed any files.  The second reason is that I
> read the code for ServiceTestCase and saw that the getSystemContext()
> is just the
> same context retrieved by getContext(), but it's grabbed before any
> tests have a chance to mess with it(according to the comment in the
> code):
>
> @Override
>     protected void setUp() throws Exception {
>         super.setUp();
>
>         // get the real context, before the individual tests have a
> chance to muck with it
>         mSystemContext = getContext();
>
>     }
>
> So it would seem that getting the context to the app the testcase is
> in is not possible with the ServiceTestCase, unless I am missing
> something.
>
> On Feb 3, 9:15 pm, "A. Elk"  wrote:
>
>
>
>
>
>
>
> > What leads you to believe that both Context objects contain the same
> > information? If you do a getSystemContext() you should get the context
> > that's stored during setUp(). The only thing that might screw this up
> > is if you overrode setUp() but forgot to call super.setUp() first.
>
> > On Feb 2, 2:08 pm, nate  wrote:
>
> > > Hey Everyone,
> > >    I don't know if I am doing something wrong here, but when I am
> > > trying to use the ServiceTestCase class to test my Service, I cannot
> > > get a context which points to the test project.  getContext() and
> > > getSystemContext() both seem to point to the target project's
> > > context.  The reason I need the context of my test app is that i have
> > > some assets which i need to be able to use in order to test the
> > > service in question.  Does anyone know of a workaround or could point
> > > me at a way of resolving this?  (i looked through the source of
> > > ServiceTestCase and didn't see another way)
>
> > > Something similar to instrumentationtestcase's
> > > getInstrumentation.getContext() is what I am looking for.
>
> > > 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] Refreshing running activity from a background service

2011-02-04 Thread TreKing
On Tue, Feb 1, 2011 at 10:07 AM, Ilja N  wrote:

> The thing I don't get is - how to perform UI refresh in the main activity
> (if it's on the foreground) when
> MessageSyncBroadcastReceiver gets its job done?
>

Send another broadcast that your activity dynamically registers for. So when
your activity starts up, it registers for that broadcast, when it shuts
down, it unregisters. Thus it only gets the message when visible.

Also, do you really want to be doing syncing in a broadcast receiver?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: mysterious crash accessing Preferences - works if package name is changed

2011-02-04 Thread Marcin Orlowski
On 4 February 2011 16:07, mot12  wrote:
> Looks like I screwed up big time. I retrieved the wrong revision when
> checking this users code. The null pointer was actually the line
> following:
>                if (Settings.System.getString(getContentResolver(),
> Settings.System.ACCELEROMETER_ROTATION)).equals("1"))
> which should have been
>                if
> ("1".equals(Settings.System.getString(getContentResolver(),
> Settings.System.ACCELEROMETER_ROTATION
> for obvious reasons.

Still such writting style is quite error prone. Unless you know it
you can't tell from the code that null can happen. And you
just "save" two lines while clearness of the source dropped much
more. Just my 5 cents :)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Suggestions on best way to draw a "laser" in a 2d game

2011-02-04 Thread niko20
Peter's idea sounds like a good one to start with to try and see if
you like it.

For the best realism though I think a bitmap would be the solution.
You don't have to rotate the bitmap - just make a bitmap that is known
as a "billboard" (google billboarding graphics), with some alpha in
it. (Although maybe the alpha will slow render time way down, don't
know). Then you just do a quick loop from point A to point B,
calculate the positions yourself (use slope of the line equations) and
blit the bitmap over and over. You can also have two bitmaps, one
pulsed and the other not, and then just cycle between them at a
determined rate. The blitted bitmaps will overlap each other and form
a type of particle beam effect.

Although for a laser maybe Peter's solution is best, my bitmap idea
would be more like a particle beam type thing.

I've used this technique to create lightning for a game I wrote a long
time ago in C#, worked really well. (To create lighting I randomized
some of the points between A and B to move around)


-niko

On Feb 3, 8:05 pm, Peter Webb  wrote:
> I bet you can make a pretty funky laser beam using the draw lines or
> fill polygon commands in the Canvas/Paint library.
>
> To draw basic unpulsed laser beam draw a transparent line of width 6
> between a and b. Then draw on top an opaque line of width 2 between a
> and b. You will get an effect where the laser beam falls off in
> brighness from the centre to the edges.
>
> To pulse it, draw a short line segment of width (say) 8 on top of the
> unpulsed laser beam, and move its position between a and b every
> screen refresh so the pulse moves along the line.
>
> If you want your laser beam to be some shape other than a long thin
> rectangle, you can do the same thing with a polygon fill command and
> you can have the laser beam whatever shape and size you want.
>
> On Feb 3, 7:38 pm, Mando  wrote:
>
>
>
>
>
>
>
> > Hi, hope this is the right location to post this.
>
> > I am working on a 2d android game with a light space shooter theme. I
> > wanted my ship to have a turret the that tracks targets, rotates and
> > fires a laser beam that is animated (maybe pulsing or with non uniform
> > bulges issuing out of the turret and moving down towards the target).
>
> > Key parts of the problem. laser starts at 1 coordinate and terminates
> > at another in 2d space and could be of arbitrary length (might be
> > scaled if I decide to add zooming).
>
> > Possible brute force solutions:
> > 1) using rotation/transformation to manually draw a bitmap
> > representing a segment of laser all along the required distance.
> > (cycling the bitmap as required for animation)
> > 2) Create a very large laser beam image (longer than I would need eg:
> > 10px by 500px) and draw it at correct transformation.
>
> > Looking at the BitmapShader and reading some of the SDK info about
> > Paths, Paints etc it feels like there should be a better way to do
> > this, but no examples I've found covers it.
>
> > Any idea if there is a way to use a BitmapShader to paint using a
> > canvas.drawLine or canvas.drawPath call to create this effect?
>
> > Thanks in advance
>
> > Mando

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


[android-developers] How to retrieve value from onItemClick(AdapterView)?

2011-02-04 Thread Mystique
I have the following, how do I get current position, value C during
onItemClick?
Many Thanks.

adapterS = new SimpleAdapter(this, list, R.layout.sort_by_name,
new String[] {"A","B", "C"},
new int[] {R.id.A, R.id.B, R.id.C}
);

lv.setAdapter(adapterS);

---
lv.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView a, View v, int position, long
id) {

// What do I need to do here to get current position, value C?

}
});
}

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


Re: [android-developers] How to retrieve value from onItemClick(AdapterView)?

2011-02-04 Thread Kostya Vasilyev

The current position is "position".

The value is in the adapter, you can call a.getAdapter() to get it, then 
call adapter.getItem(position) to get the value.


-- Kostya

04.02.2011 18:46, Mystique пишет:

I have the following, how do I get current position, value C during
onItemClick?
Many Thanks.

adapterS = new SimpleAdapter(this, list, R.layout.sort_by_name,
new String[] {"A","B", "C"},
new int[] {R.id.A, R.id.B, R.id.C}
);

lv.setAdapter(adapterS);

---
lv.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView  a, View v, int position, long
id) {

// What do I need to do here to get current position, value C?

}
});
}




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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


Re: [android-developers] How to retrieve value from onItemClick(AdapterView)?

2011-02-04 Thread Mark Murphy
The parameter named "position" to onItemClick() is your position. In
terms of how to get "value 'C'", that depends on what list is.

On Fri, Feb 4, 2011 at 10:46 AM, Mystique  wrote:
> I have the following, how do I get current position, value C during
> onItemClick?
> Many Thanks.
>
> adapterS = new SimpleAdapter(this, list, R.layout.sort_by_name,
> new String[] {"A","B", "C"},
> new int[] {R.id.A, R.id.B, R.id.C}
> );
>
> lv.setAdapter(adapterS);
>
> ---
> lv.setOnItemClickListener(new OnItemClickListener() {
> @Override
> public void onItemClick(AdapterView a, View v, int position, long
> id) {
>
> // What do I need to do here to get current position, value C?
>
> }
> });
> }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

Android Training in Atlanta: http://bignerdranch.com/classes/android

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


[android-developers] Re: Android activity forces close.

2011-02-04 Thread niko20
There is probably a bug in your Hangman.class's OnCreate or other
startup code in that class.

-niko

On Feb 3, 5:27 pm, TreKing  wrote:
> On Mon, Jan 31, 2011 at 1:41 PM, Traveler  wrote:
> > Any advice is appreciated.
>
> Read the log cat and post the exception it's throwing.
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Re: Samsung-Specific Media Player Errors

2011-02-04 Thread Andrey Yasinetskiy
Hello,

I have the same issue in my application? Did anyone already resolved that?

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

2011-02-04 Thread Mystique
Hi Master Murphy,

The list is a ArraryList>


ArrayList> list = new
ArrayList>();

while (eventType != XmlResourceParser.END_DOCUMENT) {
if (eventType == XmlResourceParser.START_TAG) {
// Get the name of the tag (eg scores 
or score)
String strName = pullParser.getName();
if (strName.equals("tezt")) {
HashMap map = new
HashMap();
String A = 
pullParser.getAttributeValue(null, "a");
map.put("a",A);
String B = 
pullParser.getAttributeValue(null, "b");
map.put("b", B);
String c = 
pullParser.getAttributeValue(null, "c");
map.put("c", C);
list.add(map);
}
}
try {
eventType = pullParser.next();
} catch (IOException e) {
// TODO Auto-generated catch 
block
e.printStackTrace();
}
}

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

2011-02-04 Thread Mark Murphy
Then it would appear to be:

list[position].get("C")

On Fri, Feb 4, 2011 at 11:08 AM, Mystique  wrote:
> Hi Master Murphy,
>
> The list is a ArraryList>
>
>
> ArrayList> list = new
> ArrayList>();
>
>                        while (eventType != XmlResourceParser.END_DOCUMENT) {
>                                if (eventType == XmlResourceParser.START_TAG) {
>                                        // Get the name of the tag (eg scores 
> or score)
>                                        String strName = pullParser.getName();
>                                        if (strName.equals("tezt")) {
>                                                HashMap map = 
> new
> HashMap();
>                                                String A = 
> pullParser.getAttributeValue(null, "a");
>                                                map.put("a",A);
>                                                String B = 
> pullParser.getAttributeValue(null, "b");
>                                                map.put("b", B);
>                                                String c = 
> pullParser.getAttributeValue(null, "c");
>                                                map.put("c", C);
>                                                list.add(map);
>                                        }
>                                }
>                                try {
>                                                eventType = pullParser.next();
>                                        } catch (IOException e) {
>                                                // TODO Auto-generated catch 
> block
>                                                e.printStackTrace();
>                                        }
>                        }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

Android Training in Atlanta: http://bignerdranch.com/classes/android

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


Re: [android-developers] Re: How to retrieve value from onItemClick(AdapterView)?

2011-02-04 Thread Mark Murphy
Oh, no wait, this is an ArrayList. Scratch that, it would be:

list.get(position).get("C")

On Fri, Feb 4, 2011 at 11:13 AM, Mark Murphy  wrote:
> Then it would appear to be:
>
> list[position].get("C")
>
> On Fri, Feb 4, 2011 at 11:08 AM, Mystique  wrote:
>> Hi Master Murphy,
>>
>> The list is a ArraryList>
>>
>>
>> ArrayList> list = new
>> ArrayList>();
>>
>>                        while (eventType != XmlResourceParser.END_DOCUMENT) {
>>                                if (eventType == XmlResourceParser.START_TAG) 
>> {
>>                                        // Get the name of the tag (eg scores 
>> or score)
>>                                        String strName = pullParser.getName();
>>                                        if (strName.equals("tezt")) {
>>                                                HashMap map = 
>> new
>> HashMap();
>>                                                String A = 
>> pullParser.getAttributeValue(null, "a");
>>                                                map.put("a",A);
>>                                                String B = 
>> pullParser.getAttributeValue(null, "b");
>>                                                map.put("b", B);
>>                                                String c = 
>> pullParser.getAttributeValue(null, "c");
>>                                                map.put("c", C);
>>                                                list.add(map);
>>                                        }
>>                                }
>>                                try {
>>                                                eventType = pullParser.next();
>>                                        } catch (IOException e) {
>>                                                // TODO Auto-generated catch 
>> block
>>                                                e.printStackTrace();
>>                                        }
>>                        }
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Training in Atlanta: http://bignerdranch.com/classes/android
>



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

Android Training in Atlanta: http://bignerdranch.com/classes/android

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


[android-developers] Re: How to retrieve value from onItemClick(AdapterView)?

2011-02-04 Thread Mystique
Typo during cut/past for:
String C = pullParser.getAttributeValue(null, "c");

On Feb 5, 12:08 am, Mystique  wrote:
> Hi Master Murphy,
>
> The list is a ArraryList>
>
> ArrayList> list = new
> ArrayList>();
>
>                         while (eventType != XmlResourceParser.END_DOCUMENT) {
>                                 if (eventType == XmlResourceParser.START_TAG) 
> {
>                                         // Get the name of the tag (eg scores 
> or score)
>                                         String strName = pullParser.getName();
>                                         if (strName.equals("tezt")) {
>                                                 HashMap map = 
> new
> HashMap();
>                                                 String A = 
> pullParser.getAttributeValue(null, "a");
>                                                 map.put("a",A);
>                                                 String B = 
> pullParser.getAttributeValue(null, "b");
>                                                 map.put("b", B);
>                                                 String c = 
> pullParser.getAttributeValue(null, "c");
>                                                 map.put("c", C);
>                                                 list.add(map);
>                                         }
>                                 }
>                                 try {
>                                                 eventType = pullParser.next();
>                                         } catch (IOException e) {
>                                                 // TODO Auto-generated catch 
> block
>                                                 e.printStackTrace();
>                                         }
>                         }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Dual mode (Honeycomb & Gingerbread) is the same APK.

2011-02-04 Thread Ed Burnette
They could have a wrapper class that detects and uses the 3.0 API if
it's there, and otherwise does some fall back behavior that looks good
on older versions.

On Feb 3, 6:20 pm, Streets Of Boston  wrote:
> I read this on android-developers.blogspot.com, from 
> Dianna:http://android-developers.blogspot.com/2011/02/android-30-fragments-a...
>
> Quote:
> "To address this, we plan to have the same fragment APIs (and the new
> LoaderManager as well) described here available as a static library
> for use with older versions of Android"
>
> ... where "this" is the issue you're asking about.
>
> One thing i'm not quite understanding:
> "Our goal is to make these APIs nearly identical, so you can start
> using them now and, at whatever point in the future you switch to
> Android 3.0 as your minimum version, move to the platform’s native
> implementation with few changes in your app."
>
> What happens before our app's minimum version is set to Android 3.0?
> We would ship the app with the static library. This would mean that
> even Android 3.0 (and higher) devices would run this static library
> instead of its 'native' implementation. Or will there be some 'magic'
> compatibility code that kicks in making use of the 'native'
> imlementation?
>
> On Jan 28, 6:32 pm, Zsolt Vasvari  wrote:
>
>
>
>
>
>
>
> > What are the best practices to maintain an app that would run on both
> > Honeycomb and pre-Honeycomb?  I do want to make use of Fragments and
> > the other goodies, but I have a feeling this will be a major
> > P.i.t.A.   I certainly don't want to maintain 2 separate apps.

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

2011-02-04 Thread Victor lyamtsev
Can someone help to clarify what Android 3.0 platform is:
is that new version of SDK i can use to create applications for Froyo,
or will I also have to upgrade OS image on the phone?
Any idea when it will be available for phones ( for Nexus One in particular) ?
Thank you,
-V

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Android Layout Editor for 'Honeycomb (Preview)' issue with color values: Exception thrown in Eclipse.

2011-02-04 Thread Streets Of Boston
Hi,

The Android Layout Editor has been somewhat problematic for me when it
shows the layout of the widgets on the screen. Some of the widgets are
all shown crowded to the top. However, when showing the outline of the
widgets, the outlines are drawn in the correct spot.

However, when i select 'Android Honeycomb (Preview)', all the widgets
suddenly are shown in the correct location... no more crowding to the
top.  If i select any other value (e.g. Android 2.2), the widgets
start crowding to the top again.

One thing remains, though, to make it even more useful. When selecting
'Android Honeycomb (Preview), this is shown in the Error log:
(Shown on Eclipse Helios 3.6.1 with Android plugin version
9.0.0.v201101191456-93220, Windows XP, Android tools rev 9, Android
platform-tools rev 2)

java.lang.NumberFormatException: Color value '@color/screen_bg_top'
must start with #
at
com.android.layoutlib.bridge.impl.ResourceHelper.getColor(ResourceHelper.java:
68)
at
com.android.layoutlib.bridge.android.BridgeTypedArray.getColor(BridgeTypedArray.java:
273)
at
android.graphics.drawable.GradientDrawable.inflate(GradientDrawable.java:
684)
at
android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:
832)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:
769)
at
com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:
194)
at
com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:
364)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:303)
at
com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:
274)
at
com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart
$ConfigListener.onThemeChange(Unknown Source)
at
com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.onThemeChange(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.access
$8(Unknown Source)
at
com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite
$7.widgetSelected(Unknown Source)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:
234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:
4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:
115)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:
110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:
79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)

It seems that the ResourceHelper.getColor should support color-
references, not only constant color-values (starting with #).

When i select any other value than 'Android Honeycomb (Preview)', e.g
'Android 2.2', this exception does not happen.


-- 
You received this message because you are subscribed to the Google
Groups "Android Devel

Re: [android-developers] Android 3.0 questions

2011-02-04 Thread Marcin Orlowski
On 4 February 2011 17:38, Victor lyamtsev  wrote:
> Can someone help to clarify what Android 3.0 platform is:
> is that new version of SDK i can use to create applications for Froyo,

If you want to create namely for Froyo it'd be better to use Froyo SDK
as your target.

> or will I also have to upgrade OS image on the phone?

So far each version is *backward* compatible, so if you got Froyo you
can launch i.e. Cupkake's targeted apps. But if any app uses Froyo
specific features it won't work on Cupkake. Same with Honeycomb.

> Any idea when it will be available for phones ( for Nexus One in particular) ?

Tea leaves are mute today, but assuming Honeycomb is yet not available
even for tablets it's mainly intended for, do not hold your breath too strong :)

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

2011-02-04 Thread Peter Sutton
> Is your content provider serving data to other (not written by you)
> applications?

The content provider is private to my application and does not server
data to others.

> I'm thinking perhaps you could change the interface somewhat, I have
> some ideas, but it only makes sense if you can use something other than
> ContentResolver.openInputStream.

I can use elements other than ContentResolver.openInputStream and I'm
open to changing the interface. Your socket idea sounds good.

Thanks,

Pete.

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

2011-02-04 Thread Alberto
Can you import these interfaces? and how?

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

2011-02-04 Thread Mystique
Many Thanks to all of you.
Both methods work :)

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


Re: [android-developers] "Finish" Activity from Dialog.. Not finishing

2011-02-04 Thread Aruna Shidling
yes, you are correct.. i got it fixed .. Thanks,

On Fri, Feb 4, 2011 at 8:52 PM, TreKing  wrote:

> On Thu, Feb 3, 2011 at 11:09 PM, Aruna Shidling 
> wrote:
>
>> Yes..
>
>
> If your activity is the Home activity, what do you expect finish() to do?
>
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Thanks & Regards,
Aruna.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Maintaining a free and paid version & maybe other version

2011-02-04 Thread mat
Surprised this wasn't mentioned before but a library project would be
a good way of doing this. So pro and free versions implement the
library project, and you could have the pro version extend classes in
your library, or even have the free version extend and override
methods to ask to update/change names etc.

I've just moved my main project over to doing this and it's saving me
so much time already!

See: 
http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject

On Feb 4, 12:43 pm, Régis  wrote:
> Yes, I somehow also miss precompilation in Java ;-)
>
> I suppose you could simply define a constant somewhere in your code like
> {{boolean Constant.FULLVERSION}} and then use
> if(Constant.FULLVERSION) {
>    // interesting code}
>
> else {
>    throw new UnimlementedException("Please buy the full version");
>
> }
>
> (if you are new to java, rest calm: the java compiler will *not* produce
> bytecode for such dead code)
>
> You can then easily publish two versions of your application, simply by
> changing the value of the constant and recompiling.
>
> For multiple version, that could be an enumeration.
>
> An alternative approach is to have the free version contain everything, with
> a method checking for a key instead of the constant, and then to sell an
> "unlock application" that simply provides a valid license.
>
> Hope this helps
> --
> Régis

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


  1   2   3   >