[android-developers] Re: How can users enable compatibility mode?

2013-04-17 Thread Piren
You are using a tablet right? :)
Big screen support only shows the "Zoom" icon on large screen devices 
(tablets, maybe phablets as well, never seen it on a Note though)

On Wednesday, April 17, 2013 11:11:39 PM UTC+3, user123 wrote:
>
> Well, then that's my question. Why the device is not showing them. I put 
> both min and target SDK to 8. I also don't have manifest element for 
> explicit support of large screens. So this option should appear. But I 
> don't see it. Just the action bar, with 3 dots for my custom menu and 
> that's it :(
>
>
> Am Mittwoch, 17. April 2013 09:09:20 UTC+2 schrieb Piren:
>>
>> You don't enable it on the device.. the device does it for you.
>> If the app wasn't designed for a tablet and meets the conditions (like 
>> having the targetSdk below a set level and/or having not declared it is 
>> destined for big screens) then the device will show the proper 
>>   compatibility options like the Zoom button or the 3 dots.
>>
>> On Monday, April 15, 2013 10:37:42 PM UTC+3, user123 wrote:
>>>
>>> I read here 
>>> that 
>>> under certain conditions, (optinal) compatibility mode is available to the 
>>> users.
>>>
>>> But I can't find it on the device, I looked in the menu of the app, in 
>>> app's settings, display settings, etc. Nothing with compatibility mode. 
>>> Where is it / should it be?
>>>
>>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Applications that relies on external datas.

2013-04-17 Thread Piren
that's not the point of the fragment... i meant that the fragment should 
handle both the logic (and data download) and the UI. then you can just 
plop it in any activity you want and you're set.
Regarding the Application onCreate - Yeah, it will be before anything else, 
but you dont know how long it would take to finish. it's as pointless as 
doing it in the first activity. (being a UI thread makes no difference, 
it's the same thread as in the activities... either way you'd have to pass 
the work to the background).


On Wednesday, April 17, 2013 7:35:45 PM UTC+3, mbaroukh wrote:
>
>
> If using fragment, I suppose I could make only one activity that will 
> handle logic (and data download) that will do what AndroidApplication 
> should and many fragment that won't have to manage more than their own 
> state. But that did not seems clean to me.
>
> >Doing it in OnCreate of the application wouldn't help much, you'd still 
> have to program all  activities  to know the data is still not there.. so 
> not much gained here.
>
> I don't understand why : when application stats, onCreate is call before 
> anything else.
> I can then load sme (small) data statically (eventually ...) and I am sure 
> I can rely on them while the application is not evicted from memory.
> On the application resume, if application has benn destroyed, onCreate() 
> is called again so there seems not to be any problem here.
> Except the (bad) fact I'm on UIThread, of course.
>
> I'm surprised there no library to handle those activity LifeCycle but I 
> imagine it must be something tricky.
> I suppose the best option would be to use the same process as 
> http://androidannotations.org/ to generate all the boilerplate code at 
> compile time.
>
> Anyway, thanks a lot for your answer.
>
> Mike
>
> Le mercredi 17 avril 2013 18:12:34 UTC+2, Piren a écrit :
>>
>> I'll reply here for both messages:
>> Yeah it is android design, i dont like it myself but they did supply some 
>> help - Fragments... they are the middle ground between pure UI and BL... 
>> You can have a fragment that handles the whole thing and use it in both 
>> activities (i personally think that the code to handle the fragments would 
>> be the same as code to handle a progress dialog :-) )
>>
>> Doing it in OnCreate of the application wouldn't help much, you'd still 
>> have to program all  activities  to know the data is still not there.. so 
>> not much gained here.
>>
>> On Wednesday, April 17, 2013 6:57:11 PM UTC+3, mbaroukh wrote:
>>>
>>> Service or not every activity must implement a logic to wait for the 
>>> download to complete isn't it ?
>>> So it must have a logic for it own process and a logic for the download.
>>> That make those activities more complicated than they have to be.
>>>
>>> Is it and Android design problem that have no solution and which we have 
>>> to live with or do I missed something ?
>>>
>>> Mike
>>>
>>> Le mercredi 17 avril 2013 17:41:45 UTC+2, RichardC a écrit :

 Use a Service to retrieve and manage the data, Bind the service from 
 Activity A and B.  If the data is available use it, if it not download it 
 (in the service).

 On Wednesday, April 17, 2013 3:57:28 PM UTC+1, mbaroukh wrote:
>
> I have a problem that appear on every new developpement.
> I never found a clean way to handle it so I'm asking for your help.
>
> Suppose you have an app that rely on data coming from network.
> Every activity needs those data.
>
> So my approach actually is to handle the download by the first 
> activity and store it so it will be widely available.
> No other activity will be launched before data is stored so every 
> activity will be sure it will be always available.
>
> Suppose we have the sequence
> Activity A (that load data)
> Then Activity B that use data
> Then application goes to background
> is killed by system
> is wake up on B
> ==> No problem because data is stored so it will be available and all 
> will be fine.
>
> But, suppose that before to be waked up, data is cleared.
> The application wake up on activity B with no data available.
> There will be a NPE.
>
> Of course, I can add in the OnCreate() method of application B that, 
> if data is not available, launch activity A and finish.
> But I also have to handle it in onResume(), on Pause(), on Create(), 
> onDestroy().
> And I have to make it in all my application's activities that use data 
> which is not really clean.
>
> I don't wan't that all my activities inherit from a single one.
> I don't wan"t to have only one activity with lot of fragments.
>
> The best option whould have been that the Android Application object 
> is able to handle startup and change the first intent in certain 
> conditions.
> then, if we are going to run B and data is not available, lauch A 
> instead.
> but sadly, th

[android-developers] Re: Handler Post sequence

2013-04-17 Thread skink


Lew wrote:
> > So how can I guarantee to Post code to be executed at the end of all
> > graphic processing has been done, without PostDelayed() ?
> >
> >
>
> Start by using the correct method name.
>
> --
> Lew

docs.mono-android.net/index.aspx?link=M
%3aAndroid.OS.Handler.PostDelayed(Java.Lang.IRunnable%2c+System.Int64)

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] How to offer new app to existing user base?

2013-04-17 Thread Nikolay Elenkov
On Wed, Apr 17, 2013 at 1:25 PM, Jungle Jim  wrote:

>
> Is there some facility in Google Play to enables me to offer the new app to
> my existing user base?

If you are using Admob you can use house ads to promote your app.
Set it show house ads only for a week or two, then return back
to showing Google ads.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: How to offer new app to existing user base?

2013-04-17 Thread Jungle Jim
Good ideas. I thank you.

On Wednesday, April 17, 2013 10:19:04 AM UTC-5, Paul-Peter Tournaris wrote:
>
> You could add a changelog in the existing app and suggest them to download 
> your new app!
>
>
> On Wed, Apr 17, 2013 at 10:57 AM, dnk >wrote:
>
>> Not as far as I know of. Your best bet is update the old app and point 
>> them to the new one.
>>
>>
>> On Tuesday, April 16, 2013 9:25:15 PM UTC-7, Jungle Jim wrote:
>>>
>>> I have written a new app that I want to publish this week.
>>>
>>> I have a number of existing users who have active installs of another 
>>> app. The new app is likely to be of interest to them, but I don't want to 
>>> make it an upgrade to the existing app.
>>>
>>> Is there some facility in Google Play to enables me to offer the new app 
>>> to my existing user base?
>>>
>>> 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-d...@googlegroups.com
>> To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> *Παύλος-Πέτρος Τουρνάρης*
> *Android  & Software Developer*
>
>- *http://goo.gl/TsJ8u*
>- *http://acschedule.org*
>
> 

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] MediaPlayer does not play ringtone when activity started from locked screen.

2013-04-17 Thread Inn0vative1


I am writing an alarm (kinda) app, which registers a broadcast intent with 
AlarmManager with the RTC_WAKEUP flag, to go off at a specified time. 
Works...

When the broadcast is received, the receiver starts an activity that plays 
a ringtone with MediaPlayer using the STREAM_ALARM stream, and does some 
other stuff. All that works, but if the broadcast is received when the 
screen is off, the activity is starts up correctly but the ringtone does 
not play. Works fine and plays ringtone if received when the screen is on 
and unlocked.

Are there any additional flags to set? Here's the code of the activity 
started from the Receiver.

public void onCreate(Bundle bundle) {
super.onCreate(bundle)
...
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
window.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
ringtonePlayer = new MediaPlayer();
...
playRingtone();}
private void playRingtone() throws IllegalArgumentException, SecurityException, 
 IllegalStateException, IOException {
ringtonePlayer.setDataSource(prefs.getString(getRingTone(), 
RingtoneManager.getActualDefaultRingtoneUri(this, 
RingtoneManager.TYPE_RINGTONE).toString()));

ringtonePlayer.setAudioStreamType(AudioManager.STREAM_ALARM);
ringtonePlayer.setWakeMode(this, PowerManager.PARTIAL_WAKE_LOCK);
ringtonePlayer.setLooping(true);
ringtonePlayer.prepare();
ringtonePlayer.start();
Log.i(LOG_TAG, "Ringtone started");}

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Handler Post sequence

2013-04-17 Thread Lew


On Wednesday, April 17, 2013 11:33:21 AM UTC-7, Filipe wrote:
>
> Hi,
>  
> Does Handler.Post() respects the "Post" sequence?
>

If you mean 'android.os.Handler' there is no such method 'Post()'. Did you 
mean 'post()' or a different type?

A simplifyed version of what I am doing in my Activity is:
>  
> public void onCreate(Bundle savedInstanceState)
> {
>  super.onCreate(savedInstanceState);
>  setContentView(new AbsoluteLayout());
>  new Handler().Post(new Runnable() {
>

This should fail to compile if you are using 'android.os.Handler'.
 

> public void run() {
>  CheckView();
> }
> });
> }
> private void CheckView()
>

You should follow the Java naming conventions, by which this method will be 
called 'checkView()'.
 

> {
>  int 
> myHeight=getWindow().findViewById(Window.ID_ANDROID_CONTENT).getHeight() ;
> }
>  
> Sometimes in myHeight I get the correct values, and sometimes I don't?
>  
> If I change the Handler.Post to Handler.PostDelayed(...,1000) it allways 
> works, so the problem seems to be that when I use Post() the CheckView() 
> code is executed before the setContentView.
>  
> So how can I guarantee to Post code to be executed at the end of all 
> graphic processing has been done, without PostDelayed() ?
>  
>

Start by using the correct method name.

-- 
Lew
 

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Handler Post sequence

2013-04-17 Thread bob
I looked at the source, and I'm not sure CodeA will execute before CodeB.

Maybe try this?

handler.postAtFrontOfQueue(CodeB);
handler.postAtFrontOfQueue(CodeA);

Or create a new Runnable that simply calls the run methods on the other two 
Runnables in sequence?

Thanks.



On Wednesday, April 17, 2013 4:01:23 PM UTC-5, Filipe wrote:
>
> Hi,
>  
> Thanks, this solves this problem.
> But in my project I have severall situations where I need to post code to 
> run on the UI thread.
>  
> If I call:
> Handler.Post(CodeA)
> Handler.Post(CodeB)
>  
> Can I be sure that CodeA executes before CodeB?
> In some situations it does not seem like 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Mirroring animation?

2013-04-17 Thread Boyd Speer
My apologies, won't happen again...did not mean to intrude.

On 2013-04-17, at 4:25 PM, Lew  wrote:

> b1 wrote:
>> Using Touch class that implements onTouchListener (and matrix) to drag a 
>> crosshairs on an image aiming pad, how can I have the movements control 
>> another dot (imageview) in a another part of the screen within a rectangle 
>> proportioned the same (but a different size) as the aiming pad? The dot 
>> would mimic the moves the user makes with the crosshairs ... 
>> 
>> Is the answer a custom listener, broadcast receiver? ... Or somehow calling 
>> the main class methods from within the Touch class ?   
>> Any suggestions greatly appreciated ... 
>> 
> 
> What does your question have to do with "problems with android support 
> library"?
> 
> Please do not hijack threads.
> 
> -- 
> Lew
> 
> -- 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an 
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Mirroring animation?

2013-04-17 Thread Lew
b1 wrote:

> Using Touch class that implements onTouchListener (and matrix) to drag a 
> crosshairs on an image aiming pad, how can I have the movements control 
> another dot (imageview) in a another part of the screen within a rectangle 
> proportioned the same (but a different size) as the aiming pad? The dot 
> would mimic the moves the user makes with the crosshairs ... 
>
> Is the answer a custom listener, broadcast receiver? ... Or somehow 
> calling the main class methods from within the Touch class ?   
> Any suggestions greatly appreciated ... 
>
>
What does your question have to do with "problems with android support 
library"?

Please do not hijack threads.

-- 
Lew

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Handler Post sequence

2013-04-17 Thread Filipe
Hi,
 
Thanks, this solves this problem.
But in my project I have severall situations where I need to post code to 
run on the UI thread.
 
If I call:
Handler.Post(CodeA)
Handler.Post(CodeB)
 
Can I be sure that CodeA executes before CodeB?
In some situations it does not seem like 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Compatibility mode issues on 4.x

2013-04-17 Thread bob
 

The documentation pertaining to your question is confusing:







It sounds like 320 may very well be a "*magic number"*, and that nothing 
greater or lesser will work.


But the docs do not seem to state this unequivocally.


Thanks.



On Wednesday, April 17, 2013 3:26:41 PM UTC-5, user123 wrote:
>
> Ok, the issue is confirmed. I created a brand new project with a blank 
> activity, and ran it on a tablet.
>
> The only modification I did was in the manifest, as follows:
>
> 
> 
>
>
> Then the app goes in compatibility mode - "Hello world!" is zoomed. Fine.
>
> But if I change to *321 dp *- It doesn't go into compatibility mode.
>
>
> I tested with a Nexus 7 tablet, Nexus 7 emulator, and 10.1 inches tablet 
> emulator.
>
> Is this a bug?
>
>
>
> Am Dienstag, 19. März 2013 17:46:49 UTC+1 schrieb user123:
>>
>> I'm trying to force compatibility mode on tablets, for a certain app, 
>> because I don't work on it anymore - and currently it looks really really 
>> messed up on tablets.
>>
>> According to the documentation:
>> http://developer.android.com/guide/practices/screen-compat-mode.html
>>
>> There are many different options to set up in the manifest, to make it 
>> possible, to the user, to enable compatibility mode. This is not exactly 
>> what I want, but anyways, maybe worth to mention, these options didn't 
>> work. I couldn't find anything on the device to switch to compatibility 
>> mode. I used a Nexus 7 with 4.2.
>>
>> Now there's the part which I need - and I also can't get it to work. To 
>> force compatibility mode, it I have to use this element:
>>
>> 
>>
>> When I let the value 320 there, my Galaxy Nexus smartphone goes in 
>> compatibility mode. That is unwanted.
>> The Nexus 7 also does, this is good.
>> So I have to use bigger dp - But starting at 321, for some reason I don't 
>> understand, the Nexus 7 doesn't go anymore in compatibility mode.
>>
>> Is this normal? According to what I read the dp of the shortest side of the 
>> Nexus 7 is more than 500, why then it stops on 321?
>>
>> I would let it on 320, but I have optimized layouts for this screen size and 
>> don't want these to go in compatibility mode.
>>
>> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Compatibility mode issues on 4.x

2013-04-17 Thread Mark Murphy
If you read the documentation:

http://developer.android.com/guide/topics/manifest/supports-screens-element.html#largestWidth

it says:

"Note: Currently, screen compatibility mode emulates only handset
screens with a 320dp width, so screen compatibility mode is not
applied if your value for android:largestWidthLimitDp is larger than
320."


On Wed, Apr 17, 2013 at 4:26 PM, user123  wrote:
> Ok, the issue is confirmed. I created a brand new project with a blank
> activity, and ran it on a tablet.
>
> The only modification I did was in the manifest, as follows:
>
> 
> 
>
>
> Then the app goes in compatibility mode - "Hello world!" is zoomed. Fine.
>
> But if I change to 321 dp - It doesn't go into compatibility mode.
>
>
> I tested with a Nexus 7 tablet, Nexus 7 emulator, and 10.1 inches tablet
> emulator.
>
> Is this a bug?
>
>
>
> Am Dienstag, 19. März 2013 17:46:49 UTC+1 schrieb user123:
>>
>> I'm trying to force compatibility mode on tablets, for a certain app,
>> because I don't work on it anymore - and currently it looks really really
>> messed up on tablets.
>>
>> According to the documentation:
>> http://developer.android.com/guide/practices/screen-compat-mode.html
>>
>> There are many different options to set up in the manifest, to make it
>> possible, to the user, to enable compatibility mode. This is not exactly
>> what I want, but anyways, maybe worth to mention, these options didn't work.
>> I couldn't find anything on the device to switch to compatibility mode. I
>> used a Nexus 7 with 4.2.
>>
>> Now there's the part which I need - and I also can't get it to work. To
>> force compatibility mode, it I have to use this element:
>>
>> 
>>
>> When I let the value 320 there, my Galaxy Nexus smartphone goes in
>> compatibility mode. That is unwanted.
>> The Nexus 7 also does, this is good.
>> So I have to use bigger dp - But starting at 321, for some reason I don't
>> understand, the Nexus 7 doesn't go anymore in compatibility mode.
>>
>> Is this normal? According to what I read the dp of the shortest side of
>> the Nexus 7 is more than 500, why then it stops on 321?
>>
>> I would let it on 320, but I have optimized layouts for this screen size
>> and don't want these to go in compatibility mode.
>>
>> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



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

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

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




[android-developers] Re: Compatibility mode issues on 4.x

2013-04-17 Thread user123
Ok, the issue is confirmed. I created a brand new project with a blank 
activity, and ran it on a tablet.

The only modification I did was in the manifest, as follows:





Then the app goes in compatibility mode - "Hello world!" is zoomed. Fine.

But if I change to *321 dp *- It doesn't go into compatibility mode.


I tested with a Nexus 7 tablet, Nexus 7 emulator, and 10.1 inches tablet 
emulator.

Is this a bug?



Am Dienstag, 19. März 2013 17:46:49 UTC+1 schrieb user123:
>
> I'm trying to force compatibility mode on tablets, for a certain app, 
> because I don't work on it anymore - and currently it looks really really 
> messed up on tablets.
>
> According to the documentation:
> http://developer.android.com/guide/practices/screen-compat-mode.html
>
> There are many different options to set up in the manifest, to make it 
> possible, to the user, to enable compatibility mode. This is not exactly 
> what I want, but anyways, maybe worth to mention, these options didn't 
> work. I couldn't find anything on the device to switch to compatibility 
> mode. I used a Nexus 7 with 4.2.
>
> Now there's the part which I need - and I also can't get it to work. To 
> force compatibility mode, it I have to use this element:
>
> 
>
> When I let the value 320 there, my Galaxy Nexus smartphone goes in 
> compatibility mode. That is unwanted.
> The Nexus 7 also does, this is good.
> So I have to use bigger dp - But starting at 321, for some reason I don't 
> understand, the Nexus 7 doesn't go anymore in compatibility mode.
>
> Is this normal? According to what I read the dp of the shortest side of the 
> Nexus 7 is more than 500, why then it stops on 321?
>
> I would let it on 320, but I have optimized layouts for this screen size and 
> don't want these to go in compatibility mode.
>
> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Compatibility mode issues on 4.x

2013-04-17 Thread user123
Ok, the issue is confirmed. I created a brand new project with a blank 
activity, and ran it on a tablet.

The only modification I did was in the manifest, as follows:





Then the app goes in compatibility mode - "Hello world!" is zoomed. Fine.

But if I change to *321 dp *- It doesn't go into compatibility mode.


Is this a bug?



Am Dienstag, 19. März 2013 17:46:49 UTC+1 schrieb user123:
>
> I'm trying to force compatibility mode on tablets, for a certain app, 
> because I don't work on it anymore - and currently it looks really really 
> messed up on tablets.
>
> According to the documentation:
> http://developer.android.com/guide/practices/screen-compat-mode.html
>
> There are many different options to set up in the manifest, to make it 
> possible, to the user, to enable compatibility mode. This is not exactly 
> what I want, but anyways, maybe worth to mention, these options didn't 
> work. I couldn't find anything on the device to switch to compatibility 
> mode. I used a Nexus 7 with 4.2.
>
> Now there's the part which I need - and I also can't get it to work. To 
> force compatibility mode, it I have to use this element:
>
> 
>
> When I let the value 320 there, my Galaxy Nexus smartphone goes in 
> compatibility mode. That is unwanted.
> The Nexus 7 also does, this is good.
> So I have to use bigger dp - But starting at 321, for some reason I don't 
> understand, the Nexus 7 doesn't go anymore in compatibility mode.
>
> Is this normal? According to what I read the dp of the shortest side of the 
> Nexus 7 is more than 500, why then it stops on 321?
>
> I would let it on 320, but I have optimized layouts for this screen size and 
> don't want these to go in compatibility mode.
>
> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: single device development scenario with questions

2013-04-17 Thread Lew
rh wrote:

> Lew > wrote: 
> > That doesn't matter. Java is word-size independent. 
>
> When I type make and it stops suddenly what 
> choice do I have Is there a secret FLAG? 
>

Why are you using "make"?

You don't use "make" to make Android applications. The usual tool is Ant.

Are you doing something outside of the normal Java world of Android?

The error message I don't have a copy of, but it said above 
> froyo requires 64-bit and then the build stopped. 
>
>
You're doing something weird. Java is word-size independent. What are 
you doing that is not Java?
 

> > > reasons are due to the barrier to entry in the form of the terrbile 
> > > complexity of the dev. env. and sheer size. Also cross-compiling 
> > > in general is a pain. 
> > > 
> > 
> > What cross-compiling? 
>
> x86 uses arm-eabi-gcc and that I got via ./repo init 
>
> (don't get me started on repo init) 
>
>
Huh?

Android uses Java, not gcc.
 

> My initial feel for the environment is that much effort was given to 
> abstract the dev away from the nuts and bolts with Eclipse and repo 
> being two abstractions that I encountered at the get go. 
>
>
I must misunderstand what you are doing. This is a newsgroup for Android 
application
development, where such considerations really don't apply. What has them 
relevant in 
your case?

What repo?
 

> > 
> > And the "dev. env." is not so very complex - far less than many 
> > platforms. 
>
> It is complicated. 
>
>
No, it isn't.
 

> > I still don't understand this. Maybe it's the fact that any 32-bit 
> > system will be woefully 
> > underpowered by today's standards, but the bit width /per se/ is not 
> > relevant. 
> >   
> > Java bytecode is Java bytecode is Java bytecode. 
> > 
> > Tell us specifically what goes wrong on your woefully underpowered 
> > dev box. 
>
> See above. 
>

For what? There's nothing "above".
 

> Thanks for taking the time to read/reply. 
>
>
How about in turn you take the time to tell us what you're doing that 
involves "make", and what "repo" is, and why you need them to develop 
an Android app.

-- 
Lew
 

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: How can users enable compatibility mode?

2013-04-17 Thread user123
Well, then that's my question. Why the device is not showing them. I put 
both min and target SDK to 8. I also don't have manifest element for 
explicit support of large screens. So this option should appear. But I 
don't see it. Just the action bar, with 3 dots for my custom menu and 
that's it :(


Am Mittwoch, 17. April 2013 09:09:20 UTC+2 schrieb Piren:
>
> You don't enable it on the device.. the device does it for you.
> If the app wasn't designed for a tablet and meets the conditions (like 
> having the targetSdk below a set level and/or having not declared it is 
> destined for big screens) then the device will show the proper 
>   compatibility options like the Zoom button or the 3 dots.
>
> On Monday, April 15, 2013 10:37:42 PM UTC+3, user123 wrote:
>>
>> I read here 
>> that 
>> under certain conditions, (optinal) compatibility mode is available to the 
>> users.
>>
>> But I can't find it on the device, I looked in the menu of the app, in 
>> app's settings, display settings, etc. Nothing with compatibility mode. 
>> Where is it / should it be?
>>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: single device development scenario with questions

2013-04-17 Thread Lew
rh wrote:

> Lew > wrote: 
>
> > rh wrote: 
> >> George Baker  wrote: 
>
 

>
> (That's a reply to George Baker) 
>

Well, duh. 

Look at the indent level of the replies. Of *course* that's a reply to 
George Baker,
as indicated in my post by the attributions.
 
I don't know why you kept repeating that. It was already obvious.

-- 
Lew

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Mirroring animation?

2013-04-17 Thread Boyd Speer
Using Touch class that implements onTouchListener (and matrix) to drag a 
crosshairs on an image aiming pad, how can I have the movements control another 
dot (imageview) in a another part of the screen within a rectangle proportioned 
the same (but a different size) as the aiming pad? The dot would mimic the 
moves the user makes with the crosshairs ...


Is the answer a custom listener, broadcast receiver? ... Or somehow calling the 
main class methods from within the Touch class ?  
Any suggestions greatly appreciated ... 

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: error message displays on gingerbread emulator but not icecream sandwich emulator

2013-04-17 Thread John Merlino
Take a look at my newer thread:
https://groups.google.com/group/android-developers/browse_thread/thread/4568ef3e42fb23f8

I added the support library and used SupportMapFragment and still an
issue.

On Apr 17, 3:32 pm, Doug  wrote:
> > Binary XML file line #6: Error inflating class fragment
>
> Fragments are not available in GB unless you are using the compatibility
> library and using only the fragment objects and activities available
> through it.
>
> Doug
>
>
>
>
>
>
>
> On Tuesday, April 16, 2013 2:48:06 PM UTC-7, John Merlino wrote:
>
> > I have an app which uses google maps api v2. Works fine in api level
> > 15, but in api level 10 (gingerbread) on the real device it says there
> > is no support. When I try to run on gingerbread emulator, I get the
> > following error:
>
> > 04-16 17:42:00.928: E/AndroidRuntime(363): FATAL EXCEPTION: main
> > 04-16 17:42:00.928: E/AndroidRuntime(363): java.lang.RuntimeException:
> > Unable to start activity ComponentInfo{com.otl.AndroidRemoteApp1/
> > com.otl.AndroidRemoteApp.ShowMapActivity}:
> > android.view.InflateException: Binary XML file line #6: Error
> > inflating class fragment
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> > 1647)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> > 1663)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.app.ActivityThread.access$1500(ActivityThread.java:117)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.os.Handler.dispatchMessage(Handler.java:99)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.os.Looper.loop(Looper.java:130)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.app.ActivityThread.main(ActivityThread.java:3683)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > java.lang.reflect.Method.invokeNative(Native Method)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > java.lang.reflect.Method.invoke(Method.java:507)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > com.android.internal.os.ZygoteInit
> > $MethodAndArgsCaller.run(ZygoteInit.java:839)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > dalvik.system.NativeStart.main(Native Method)
> > 04-16 17:42:00.928: E/AndroidRuntime(363): Caused by:
> > android.view.InflateException: Binary XML file line #6: Error
> > inflating class fragment
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.view.LayoutInflater.inflate(LayoutInflater.java:408)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.jav 
> > a:
>
> > 207)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.app.Activity.setContentView(Activity.java:1657)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > com.otl.AndroidRemoteApp.ShowMapActivity.onCreate(ShowMapActivity.java:
> > 45)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
> > 1047)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> > 1611)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         ... 11 more
> > 04-16 17:42:00.928: E/AndroidRuntime(363): Caused by:
> > java.lang.ClassNotFoundException: android.view.fragment in loader
> > dalvik.system.PathClassLoader[/system/framework/
> > com.google.android.maps.jar:/data/app/com.otl.AndroidRemoteApp1-2.apk]
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > java.lang.ClassLoader.loadClass(ClassLoader.java:551)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > java.lang.ClassLoader.loadClass(ClassLoader.java:511)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.view.LayoutInflater.createView(LayoutInflater.java:471)
> > 04-16 17:42:00.928: E/AndroidRuntime(363):         at
> > android.view.LayoutInfl

[android-developers] Re: error message displays on gingerbread emulator but not icecream sandwich emulator

2013-04-17 Thread Doug
> Binary XML file line #6: Error inflating class fragment 

Fragments are not available in GB unless you are using the compatibility 
library and using only the fragment objects and activities available 
through it.

Doug


On Tuesday, April 16, 2013 2:48:06 PM UTC-7, John Merlino wrote:
>
> I have an app which uses google maps api v2. Works fine in api level 
> 15, but in api level 10 (gingerbread) on the real device it says there 
> is no support. When I try to run on gingerbread emulator, I get the 
> following error: 
>
> 04-16 17:42:00.928: E/AndroidRuntime(363): FATAL EXCEPTION: main 
> 04-16 17:42:00.928: E/AndroidRuntime(363): java.lang.RuntimeException: 
> Unable to start activity ComponentInfo{com.otl.AndroidRemoteApp1/ 
> com.otl.AndroidRemoteApp.ShowMapActivity}: 
> android.view.InflateException: Binary XML file line #6: Error 
> inflating class fragment 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 
> 1647) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 
> 1663) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.app.ActivityThread.access$1500(ActivityThread.java:117) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.os.Handler.dispatchMessage(Handler.java:99) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.os.Looper.loop(Looper.java:130) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.app.ActivityThread.main(ActivityThread.java:3683) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> java.lang.reflect.Method.invokeNative(Native Method) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> java.lang.reflect.Method.invoke(Method.java:507) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> com.android.internal.os.ZygoteInit 
> $MethodAndArgsCaller.run(ZygoteInit.java:839) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> dalvik.system.NativeStart.main(Native Method) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): Caused by: 
> android.view.InflateException: Binary XML file line #6: Error 
> inflating class fragment 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.view.LayoutInflater.rInflate(LayoutInflater.java:623) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.view.LayoutInflater.inflate(LayoutInflater.java:408) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.view.LayoutInflater.inflate(LayoutInflater.java:320) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.view.LayoutInflater.inflate(LayoutInflater.java:276) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java: 
>
> 207) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.app.Activity.setContentView(Activity.java:1657) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> com.otl.AndroidRemoteApp.ShowMapActivity.onCreate(ShowMapActivity.java: 
> 45) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 
> 1047) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 
> 1611) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): ... 11 more 
> 04-16 17:42:00.928: E/AndroidRuntime(363): Caused by: 
> java.lang.ClassNotFoundException: android.view.fragment in loader 
> dalvik.system.PathClassLoader[/system/framework/ 
> com.google.android.maps.jar:/data/app/com.otl.AndroidRemoteApp1-2.apk] 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> java.lang.ClassLoader.loadClass(ClassLoader.java:551) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> java.lang.ClassLoader.loadClass(ClassLoader.java:511) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.view.LayoutInflater.createView(LayoutInflater.java:471) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.view.LayoutInflater.onCreateView(LayoutInflater.java:549) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:
>  
>
> 66) 
> 04-16 17:42:00.928: E/AndroidRuntime(363): at 
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568) 
> 

[android-developers] Re: Handler Post sequence

2013-04-17 Thread bob
Maybe use something like this?

View myView=findViewById(R.id.myView);
  myView.getViewTreeObserver().addOnGlobalLayoutListener(new 
ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
//At this point the layout is complete and the 
//dimensions of myView and any child views are known.
}
});


[from 
http://stackoverflow.com/questions/8418868/how-to-know-when-an-activity-finishes-a-layout-pass]

Thanks.




On Wednesday, April 17, 2013 1:33:21 PM UTC-5, Filipe wrote:
>
> Hi,
>  
> Does Handler.Post() respects the "Post" sequence?
>  
>  
> A simplifyed version of what I am doing in my Activity is:
>  
> public void onCreate(Bundle savedInstanceState)
> {
>  super.onCreate(savedInstanceState);
>  setContentView(new AbsoluteLayout());
>  new Handler().Post(new Runnable() {
> public void run() {
>  CheckView();
> }
> });
> }
> private void CheckView()
> {
>  int 
> myHeight=getWindow().findViewById(Window.ID_ANDROID_CONTENT).getHeight() ;
> }
>  
> Sometimes in myHeight I get the correct values, and sometimes I don't?
>  
> If I change the Handler.Post to Handler.PostDelayed(...,1000) it allways 
> works, so the problem seems to be that when I use Post() the CheckView() 
> code is executed before the setContentView.
>  
> So how can I guarantee to Post code to be executed at the end of all 
> graphic processing has been done, without PostDelayed() ?
>  
> Thanks
>  
> Filipe Madureira
>  
>  
>  
>
>  
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Handler Post sequence

2013-04-17 Thread Filipe
Hi,
 
Does Handler.Post() respects the "Post" sequence?
 
 
A simplifyed version of what I am doing in my Activity is:
 
public void onCreate(Bundle savedInstanceState)
{
 super.onCreate(savedInstanceState);
 setContentView(new AbsoluteLayout());
 new Handler().Post(new Runnable() {
public void run() {
 CheckView();
}
});
}
private void CheckView()
{
 int 
myHeight=getWindow().findViewById(Window.ID_ANDROID_CONTENT).getHeight() ;
}
 
Sometimes in myHeight I get the correct values, and sometimes I don't?
 
If I change the Handler.Post to Handler.PostDelayed(...,1000) it allways 
works, so the problem seems to be that when I use Post() the CheckView() 
code is executed before the setContentView.
 
So how can I guarantee to Post code to be executed at the end of all 
graphic processing has been done, without PostDelayed() ?
 
Thanks
 
Filipe Madureira
 
 
 

 

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Sprint 4G(WIMAX) tcp connection problem

2013-04-17 Thread Robert Greenwalt
I agree - testing 80 sounds like a good idea to gain more info about what
may be happening.


On Wed, Apr 17, 2013 at 10:43 AM, bob  wrote:

> Is it an option to run the XMPP server on port 80?
>
> Or perhaps just set up a test server on port 80 to explore the hypothesis
> that this will resolve the problem?
>
> Alternatively, you could also create a proxy that runs on port 80 and acts
> as an intermediary.
>
>
> Thanks.
>
>
>
> On Wednesday, April 17, 2013 9:20:27 AM UTC-5, Long wrote:
>
>> I am connecting to tcp port 5222 which provides xmpp service
>>
>>
>> On Tue, Apr 16, 2013 at 12:00 AM, bob  wrote:
>>
>>> What port number are you using on the server?
>>>
>>>
>>> Maybe use *port* *80* as it is more open?
>>>
>>>
>>> Thanks.
>>>
>>>
>>>
>>> On Saturday, April 13, 2013 5:35:13 AM UTC-5, Long wrote:

 Hi Developers,
 I have an background service which connects my server with a TCP
 connection.
 My background service sends a ping packet to my server every
 4minutes to keep the socket alive.
The problem is that the device can not get the packet from the
 server after a short time(3 seconds from my test) after the ping is sent.
This app works fine on other networks(AT&T, verizon).

The strange thing is that if I force the device to connect to
 3G(EVDO revision A), it works fine.

It seems to me that, on Sprint 4G network, when an app sends a
 packet through a tcp socket, and then the socket is idle for
 several seconds, then the app will never be able to receive packets
 from this socket.

I don't think it's related to the 4G signal, since this issue can be
 reproduced every time.

Any suggestions?







>>>  --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-d...@**googlegroups.com
>>>
>>> To unsubscribe from this group, 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 a topic in the
>>> Google Groups "Android Developers" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>>> topic/android-developers/**3FvPZp5n2K0/unsubscribe?hl=en
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> android-developers+**unsubscr...@googlegroups.com.
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out
>>> .
>>>
>>>
>>>
>>
>>
>>
>> --
>> Things don' happen. Things are made to happen.
>>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Sprint 4G(WIMAX) tcp connection problem

2013-04-17 Thread bob
 

Is it an option to run the XMPP server on port 80?

Or perhaps just set up a test server on port 80 to explore the hypothesis 
that this will resolve the problem?

Alternatively, you could also create a proxy that runs on port 80 and acts 
as an intermediary.


Thanks.



On Wednesday, April 17, 2013 9:20:27 AM UTC-5, Long wrote:
>
> I am connecting to tcp port 5222 which provides xmpp service
>
>
> On Tue, Apr 16, 2013 at 12:00 AM, bob 
> > wrote:
>
>> What port number are you using on the server?
>>
>>
>> Maybe use *port* *80* as it is more open?
>>
>>
>> Thanks.
>>
>>
>>
>> On Saturday, April 13, 2013 5:35:13 AM UTC-5, Long wrote:
>>>
>>> Hi Developers, 
>>> I have an background service which connects my server with a TCP 
>>> connection.
>>> My background service sends a ping packet to my server every 
>>> 4minutes to keep the socket alive.
>>>The problem is that the device can not get the packet from the server 
>>> after a short time(3 seconds from my test) after the ping is sent. 
>>>This app works fine on other networks(AT&T, verizon). 
>>>  
>>>The strange thing is that if I force the device to connect to 3G(EVDO 
>>> revision A), it works fine.
>>>  
>>>It seems to me that, on Sprint 4G network, when an app sends a packet 
>>> through a tcp socket, and then the socket is idle for
>>> several seconds, then the app will never be able to receive packets from 
>>> this socket.
>>>
>>>I don't think it's related to the 4G signal, since this issue can be 
>>> reproduced every time.
>>>
>>>Any suggestions?
>>>
>>>  
>>>
>>>   
>>>
>>> 
>>>
>>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, 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 a topic in the 
>> Google Groups "Android Developers" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/android-developers/3FvPZp5n2K0/unsubscribe?hl=en
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> android-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Things don' happen. Things are made to happen. 
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: how to create a custom gauge in android

2013-04-17 Thread bob
 

If you don't use *save*() and *restore*() and something gets drawn after 
your needle, it will also be rotated just as the needle was rotated.


So you would probably use something like this:


*canvas.save();*


canvas.rotate(45, 100, 100);

canvas.drawBitmap(…);


*canvas.restore();*


Thanks.




On Wednesday, April 17, 2013 12:08:12 PM UTC-5, psyco wrote:
>
> thank you BOB that helps me a lot :)
> i used draw method to draw the needle (initial position) then i used 
> rotate like you said to rotate it
> and it works correctly
> did i need to use save and restore methods?
>
>
> 2013/4/17 bob >
>
>> Break the needle off of that image and put it in it's own image.
>>
>> Then use this function in *Canvas*:
>>
>> final void *rotate*(float degrees, float px, float py)
>>
>> Also, you will call *drawBitmap* in the Canvas class.
>>
>> Of course, you will want to *save()* and *restore()* the matrices before 
>> and after the rotation.
>>
>> Thanks.
>>
>>
>> On Wednesday, April 17, 2013 5:04:37 AM UTC-5, psyco wrote:
>>>
>>> hi all,
>>>
>>>
>>>
>>> am
>>>  
>>> trying to build a custom view witch displays a gauge, what i did is :
>>> 1-designed the gauge with photoshop
>>> 2-created the cutom View and it's .XML file 
>>> 3-set the bakcground gauge
>>> So, i need to know how to display a needle and how rotating it 
>>> some help will be very grateful
>>>
>>>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, 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 a topic in the 
>> Google Groups "Android Developers" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> android-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Abdallah Mohamed Amine
> Élève ingénieur en informatique de la FST
> Responsable d'un club embarqué microdesign
> Tél : +216 27 105 393
>  
>  

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: how to create a custom gauge in android

2013-04-17 Thread abdallah mouhamed amine
thank you BOB that helps me a lot :)
i used draw method to draw the needle (initial position) then i used rotate
like you said to rotate it
and it works correctly
did i need to use save and restore methods?


2013/4/17 bob 

> Break the needle off of that image and put it in it's own image.
>
> Then use this function in *Canvas*:
>
> final void *rotate*(float degrees, float px, float py)
>
> Also, you will call *drawBitmap* in the Canvas class.
>
> Of course, you will want to *save()* and *restore()* the matrices before
> and after the rotation.
>
> Thanks.
>
>
> On Wednesday, April 17, 2013 5:04:37 AM UTC-5, psyco wrote:
>>
>> hi all,
>>
>>
>>
>> am
>> trying to build a custom view witch displays a gauge, what i did is :
>> 1-designed the gauge with photoshop
>> 2-created the cutom View and it's .XML file
>> 3-set the bakcground gauge
>> So, i need to know how to display a needle and how rotating it
>> some help will be very grateful
>>
>>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Abdallah Mohamed Amine
Élève ingénieur en informatique de la FST
Responsable d'un club embarqué microdesign
Tél : +216 27 105 393


-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Sprint 4G(WIMAX) tcp connection problem

2013-04-17 Thread Robert Greenwalt
Thanks Long Pu for the reasoning for not using GCM.

You only have this problem on sprint wimax, correct?  Have to tried very
frequent keep-alives?  Figuring out roughly what the required period is may
help us find the cause.  We can talk with Sprint and Samsung about it, but
the timeout info would be useful before that.

R


On Wed, Apr 17, 2013 at 7:28 AM, Long Pu  wrote:

> We have to consider multiple platforms(iOS, Android, Blackberry). On iOS,
> push notification
> is not an option for our application.  If use GCM, we need  another extra
> special design especially for android.
>
>
> On Mon, Apr 15, 2013 at 11:23 PM, Robert Greenwalt 
> wrote:
>
>> Could you use GCM  
>> instead
>> of rolling your own long-lived connection with independent keepalive?
>>  It'll be better for the users battery and better for the carriers network
>> and you won't have to figure out issues like these.
>>
>>
>> On Sat, Apr 13, 2013 at 3:35 AM, Long  wrote:
>>
>>> Hi Developers,
>>> I have an background service which connects my server with a TCP
>>> connection.
>>> My background service sends a ping packet to my server every
>>> 4minutes to keep the socket alive.
>>>The problem is that the device can not get the packet from the server
>>> after a short time(3 seconds from my test) after the ping is sent.
>>>This app works fine on other networks(AT&T, verizon).
>>>
>>>The strange thing is that if I force the device to connect to 3G(EVDO
>>> revision A), it works fine.
>>>
>>>It seems to me that, on Sprint 4G network, when an app sends a packet
>>> through a tcp socket, and then the socket is idle for
>>> several seconds, then the app will never be able to receive packets from
>>> this socket.
>>>
>>>I don't think it's related to the 4G signal, since this issue can be
>>> reproduced every time.
>>>
>>>Any suggestions?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-developers+unsubscr...@googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>  --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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 a topic in the
>> Google Groups "Android Developers" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/android-developers/3FvPZp5n2K0/unsubscribe?hl=en
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> android-developers+unsubscr...@googlegroups.com.
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Things don' happen. Things are made to happen.
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt

[android-developers] problems with android support library

2013-04-17 Thread John Merlino
In my Android SDK Manager, I have the Android Support Library
installed. In my Downloads/android-sdk-macosx/extras/android/support
directory, I have a v4, a v7, and v13. I copied android-support-v4.jar
to the libs folder. Right clicked and selected Build Path > Configure
Build Path. In the activity layout I added the following (using
supportmapfragment rather than mapfragment):

http://schemas.android.com/apk/res/android";
  android:id="@+id/map"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  class="com.google.android.gms.maps.SupportMapFragment"/>

But still I get this error:

04-16 17:42:00.928: E/AndroidRuntime(363): FATAL EXCEPTION: main
04-16 17:42:00.928: E/AndroidRuntime(363):
java.lang.RuntimeException:
Unable to start activity ComponentInfo{com.otl.AndroidRemoteApp1/
com.otl.AndroidRemoteApp.ShowMapActivity}:
android.view.InflateException: Binary XML file line #6: Error
inflating class fragment

Any ideas?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Applications that relies on external datas.

2013-04-17 Thread mbaroukh

If using fragment, I suppose I could make only one activity that will 
handle logic (and data download) that will do what AndroidApplication 
should and many fragment that won't have to manage more than their own 
state. But that did not seems clean to me.

>Doing it in OnCreate of the application wouldn't help much, you'd still 
have to program all  activities  to know the data is still not there.. so 
not much gained here.

I don't understand why : when application stats, onCreate is call before 
anything else.
I can then load sme (small) data statically (eventually ...) and I am sure 
I can rely on them while the application is not evicted from memory.
On the application resume, if application has benn destroyed, onCreate() is 
called again so there seems not to be any problem here.
Except the (bad) fact I'm on UIThread, of course.

I'm surprised there no library to handle those activity LifeCycle but I 
imagine it must be something tricky.
I suppose the best option would be to use the same process as 
http://androidannotations.org/ to generate all the boilerplate code at 
compile time.

Anyway, thanks a lot for your answer.

Mike

Le mercredi 17 avril 2013 18:12:34 UTC+2, Piren a écrit :
>
> I'll reply here for both messages:
> Yeah it is android design, i dont like it myself but they did supply some 
> help - Fragments... they are the middle ground between pure UI and BL... 
> You can have a fragment that handles the whole thing and use it in both 
> activities (i personally think that the code to handle the fragments would 
> be the same as code to handle a progress dialog :-) )
>
> Doing it in OnCreate of the application wouldn't help much, you'd still 
> have to program all  activities  to know the data is still not there.. so 
> not much gained here.
>
> On Wednesday, April 17, 2013 6:57:11 PM UTC+3, mbaroukh wrote:
>>
>> Service or not every activity must implement a logic to wait for the 
>> download to complete isn't it ?
>> So it must have a logic for it own process and a logic for the download.
>> That make those activities more complicated than they have to be.
>>
>> Is it and Android design problem that have no solution and which we have 
>> to live with or do I missed something ?
>>
>> Mike
>>
>> Le mercredi 17 avril 2013 17:41:45 UTC+2, RichardC a écrit :
>>>
>>> Use a Service to retrieve and manage the data, Bind the service from 
>>> Activity A and B.  If the data is available use it, if it not download it 
>>> (in the service).
>>>
>>> On Wednesday, April 17, 2013 3:57:28 PM UTC+1, mbaroukh wrote:

 I have a problem that appear on every new developpement.
 I never found a clean way to handle it so I'm asking for your help.

 Suppose you have an app that rely on data coming from network.
 Every activity needs those data.

 So my approach actually is to handle the download by the first activity 
 and store it so it will be widely available.
 No other activity will be launched before data is stored so every 
 activity will be sure it will be always available.

 Suppose we have the sequence
 Activity A (that load data)
 Then Activity B that use data
 Then application goes to background
 is killed by system
 is wake up on B
 ==> No problem because data is stored so it will be available and all 
 will be fine.

 But, suppose that before to be waked up, data is cleared.
 The application wake up on activity B with no data available.
 There will be a NPE.

 Of course, I can add in the OnCreate() method of application B that, if 
 data is not available, launch activity A and finish.
 But I also have to handle it in onResume(), on Pause(), on Create(), 
 onDestroy().
 And I have to make it in all my application's activities that use data 
 which is not really clean.

 I don't wan't that all my activities inherit from a single one.
 I don't wan"t to have only one activity with lot of fragments.

 The best option whould have been that the Android Application object is 
 able to handle startup and change the first intent in certain conditions.
 then, if we are going to run B and data is not available, lauch A 
 instead.
 but sadly, this is not possible.

 So my question : How do you handle this kind of problem ?

 Thanks for any advice.


 Mike

>>>

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

[android-developers] Re: Applications that relies on external datas.

2013-04-17 Thread Piren
I'll reply here for both messages:
Yeah it is android design, i dont like it myself but they did supply some 
help - Fragments... they are the middle ground between pure UI and BL... 
You can have a fragment that handles the whole thing and use it in both 
activities (i personally think that the code to handle the fragments would 
be the same as code to handle a progress dialog :-) )

Doing it in OnCreate of the application wouldn't help much, you'd still 
have to program all  activities  to know the data is still not there.. so 
not much gained here.

On Wednesday, April 17, 2013 6:57:11 PM UTC+3, mbaroukh wrote:
>
> Service or not every activity must implement a logic to wait for the 
> download to complete isn't it ?
> So it must have a logic for it own process and a logic for the download.
> That make those activities more complicated than they have to be.
>
> Is it and Android design problem that have no solution and which we have 
> to live with or do I missed something ?
>
> Mike
>
> Le mercredi 17 avril 2013 17:41:45 UTC+2, RichardC a écrit :
>>
>> Use a Service to retrieve and manage the data, Bind the service from 
>> Activity A and B.  If the data is available use it, if it not download it 
>> (in the service).
>>
>> On Wednesday, April 17, 2013 3:57:28 PM UTC+1, mbaroukh wrote:
>>>
>>> I have a problem that appear on every new developpement.
>>> I never found a clean way to handle it so I'm asking for your help.
>>>
>>> Suppose you have an app that rely on data coming from network.
>>> Every activity needs those data.
>>>
>>> So my approach actually is to handle the download by the first activity 
>>> and store it so it will be widely available.
>>> No other activity will be launched before data is stored so every 
>>> activity will be sure it will be always available.
>>>
>>> Suppose we have the sequence
>>> Activity A (that load data)
>>> Then Activity B that use data
>>> Then application goes to background
>>> is killed by system
>>> is wake up on B
>>> ==> No problem because data is stored so it will be available and all 
>>> will be fine.
>>>
>>> But, suppose that before to be waked up, data is cleared.
>>> The application wake up on activity B with no data available.
>>> There will be a NPE.
>>>
>>> Of course, I can add in the OnCreate() method of application B that, if 
>>> data is not available, launch activity A and finish.
>>> But I also have to handle it in onResume(), on Pause(), on Create(), 
>>> onDestroy().
>>> And I have to make it in all my application's activities that use data 
>>> which is not really clean.
>>>
>>> I don't wan't that all my activities inherit from a single one.
>>> I don't wan"t to have only one activity with lot of fragments.
>>>
>>> The best option whould have been that the Android Application object is 
>>> able to handle startup and change the first intent in certain conditions.
>>> then, if we are going to run B and data is not available, lauch A 
>>> instead.
>>> but sadly, this is not possible.
>>>
>>> So my question : How do you handle this kind of problem ?
>>>
>>> Thanks for any advice.
>>>
>>>
>>> Mike
>>>
>>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: how to create a custom gauge in android

2013-04-17 Thread bob
Break the needle off of that image and put it in it's own image.

Then use this function in *Canvas*:

final void *rotate*(float degrees, float px, float py)

Also, you will call *drawBitmap* in the Canvas class.

Of course, you will want to *save()* and *restore()* the matrices before 
and after the rotation.

Thanks.


On Wednesday, April 17, 2013 5:04:37 AM UTC-5, psyco wrote:
>
> hi all,
>
>
>
> am
>  
> trying to build a custom view witch displays a gauge, what i did is :
> 1-designed the gauge with photoshop
> 2-created the cutom View and it's .XML file 
> 3-set the bakcground gauge
> So, i need to know how to display a needle and how rotating it 
> some help will be very grateful
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Applications that relies on external datas.

2013-04-17 Thread mbaroukh
Service or not every activity must implement a logic to wait for the 
download to complete isn't it ?
So it must have a logic for it own process and a logic for the download.
That make those activities more complicated than they have to be.

Is it and Android design problem that have no solution and which we have to 
live with or do I missed something ?

Mike

Le mercredi 17 avril 2013 17:41:45 UTC+2, RichardC a écrit :
>
> Use a Service to retrieve and manage the data, Bind the service from 
> Activity A and B.  If the data is available use it, if it not download it 
> (in the service).
>
> On Wednesday, April 17, 2013 3:57:28 PM UTC+1, mbaroukh wrote:
>>
>> I have a problem that appear on every new developpement.
>> I never found a clean way to handle it so I'm asking for your help.
>>
>> Suppose you have an app that rely on data coming from network.
>> Every activity needs those data.
>>
>> So my approach actually is to handle the download by the first activity 
>> and store it so it will be widely available.
>> No other activity will be launched before data is stored so every 
>> activity will be sure it will be always available.
>>
>> Suppose we have the sequence
>> Activity A (that load data)
>> Then Activity B that use data
>> Then application goes to background
>> is killed by system
>> is wake up on B
>> ==> No problem because data is stored so it will be available and all 
>> will be fine.
>>
>> But, suppose that before to be waked up, data is cleared.
>> The application wake up on activity B with no data available.
>> There will be a NPE.
>>
>> Of course, I can add in the OnCreate() method of application B that, if 
>> data is not available, launch activity A and finish.
>> But I also have to handle it in onResume(), on Pause(), on Create(), 
>> onDestroy().
>> And I have to make it in all my application's activities that use data 
>> which is not really clean.
>>
>> I don't wan't that all my activities inherit from a single one.
>> I don't wan"t to have only one activity with lot of fragments.
>>
>> The best option whould have been that the Android Application object is 
>> able to handle startup and change the first intent in certain conditions.
>> then, if we are going to run B and data is not available, lauch A instead.
>> but sadly, this is not possible.
>>
>> So my question : How do you handle this kind of problem ?
>>
>> Thanks for any advice.
>>
>>
>> Mike
>>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Applications that relies on external datas.

2013-04-17 Thread mbaroukh
"Don't let the "UI" handle the data (activity), add a Business Logic layer 
to do that."

I totally agree with that and data is loaded from a separate layer actually 
called by activity A.
But I was looking how to avoid to have each activities call the 
initialisation of this layer.

It seems obvious that the initialisation should be done in onCreate of 
AndroidApplication.
In case of resume, onCreate() is called.
But then, the screen is black and we have no way (as I know) to provide a 
layout on screen that, anyway would have not been displayed because we are 
on the UIThread.

I hate to have to tell every activity that starts to
- check if data is available
- not available then use asynctask to display dialog and download.
- and don't forget to do nothing in onResume() in this case and wait for 
the download to finish before calling what have to be done onResume()
- .. and lot of other case to handle.

That's a lot of boilerplate code to do this.
I was hoping there was something I was missing.
It would be so simple if we could handle ActivtyLifecycle somewhere.

Do I have to resign to see lot of code that will be copy/pasted and will 
introduce errors ?

Mike

Le mercredi 17 avril 2013 17:28:40 UTC+2, Piren a écrit :
>
> Don't let the "UI" handle the data (activity), add a Business Logic layer 
> to do that.
>
> I.E - create a class that is responsible for managing this data. if data 
> is present, load from DB, if not, download for the net. Then let whichever 
> activity that needs the data, interact with that class instead.
>
> BTW, making "order" assumptions for activities on android is a mistake, 
> exactly for the reasons you specified. You should not base your code in a 
> way that assumes something happened earlier in the app. And if you do need 
> to make that assumption, make sure the code works even if the assumption 
> turns to be wrong. In some cases, by forcing the order (dont let activity B 
> launch normally and revert to A).
>
>
> On Wednesday, April 17, 2013 5:57:28 PM UTC+3, mbaroukh wrote:
>>
>> I have a problem that appear on every new developpement.
>> I never found a clean way to handle it so I'm asking for your help.
>>
>> Suppose you have an app that rely on data coming from network.
>> Every activity needs those data.
>>
>> So my approach actually is to handle the download by the first activity 
>> and store it so it will be widely available.
>> No other activity will be launched before data is stored so every 
>> activity will be sure it will be always available.
>>
>> Suppose we have the sequence
>> Activity A (that load data)
>> Then Activity B that use data
>> Then application goes to background
>> is killed by system
>> is wake up on B
>> ==> No problem because data is stored so it will be available and all 
>> will be fine.
>>
>> But, suppose that before to be waked up, data is cleared.
>> The application wake up on activity B with no data available.
>> There will be a NPE.
>>
>> Of course, I can add in the OnCreate() method of application B that, if 
>> data is not available, launch activity A and finish.
>> But I also have to handle it in onResume(), on Pause(), on Create(), 
>> onDestroy().
>> And I have to make it in all my application's activities that use data 
>> which is not really clean.
>>
>> I don't wan't that all my activities inherit from a single one.
>> I don't wan"t to have only one activity with lot of fragments.
>>
>> The best option whould have been that the Android Application object is 
>> able to handle startup and change the first intent in certain conditions.
>> then, if we are going to run B and data is not available, lauch A instead.
>> but sadly, this is not possible.
>>
>> So my question : How do you handle this kind of problem ?
>>
>> Thanks for any advice.
>>
>>
>> Mike
>>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Applications that relies on external datas.

2013-04-17 Thread RichardC
Use a Service to retrieve and manage the data, Bind the service from 
Activity A and B.  If the data is available use it, if it not download it 
(in the service).

On Wednesday, April 17, 2013 3:57:28 PM UTC+1, mbaroukh wrote:
>
> I have a problem that appear on every new developpement.
> I never found a clean way to handle it so I'm asking for your help.
>
> Suppose you have an app that rely on data coming from network.
> Every activity needs those data.
>
> So my approach actually is to handle the download by the first activity 
> and store it so it will be widely available.
> No other activity will be launched before data is stored so every activity 
> will be sure it will be always available.
>
> Suppose we have the sequence
> Activity A (that load data)
> Then Activity B that use data
> Then application goes to background
> is killed by system
> is wake up on B
> ==> No problem because data is stored so it will be available and all will 
> be fine.
>
> But, suppose that before to be waked up, data is cleared.
> The application wake up on activity B with no data available.
> There will be a NPE.
>
> Of course, I can add in the OnCreate() method of application B that, if 
> data is not available, launch activity A and finish.
> But I also have to handle it in onResume(), on Pause(), on Create(), 
> onDestroy().
> And I have to make it in all my application's activities that use data 
> which is not really clean.
>
> I don't wan't that all my activities inherit from a single one.
> I don't wan"t to have only one activity with lot of fragments.
>
> The best option whould have been that the Android Application object is 
> able to handle startup and change the first intent in certain conditions.
> then, if we are going to run B and data is not available, lauch A instead.
> but sadly, this is not possible.
>
> So my question : How do you handle this kind of problem ?
>
> Thanks for any advice.
>
>
> Mike
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Applications that relies on external datas.

2013-04-17 Thread Piren
Don't let the "UI" handle the data (activity), add a Business Logic layer 
to do that.

I.E - create a class that is responsible for managing this data. if data is 
present, load from DB, if not, download for the net. Then let whichever 
activity that needs the data, interact with that class instead.

BTW, making "order" assumptions for activities on android is a mistake, 
exactly for the reasons you specified. You should not base your code in a 
way that assumes something happened earlier in the app. And if you do need 
to make that assumption, make sure the code works even if the assumption 
turns to be wrong. In some cases, by forcing the order (dont let activity B 
launch normally and revert to A).


On Wednesday, April 17, 2013 5:57:28 PM UTC+3, mbaroukh wrote:
>
> I have a problem that appear on every new developpement.
> I never found a clean way to handle it so I'm asking for your help.
>
> Suppose you have an app that rely on data coming from network.
> Every activity needs those data.
>
> So my approach actually is to handle the download by the first activity 
> and store it so it will be widely available.
> No other activity will be launched before data is stored so every activity 
> will be sure it will be always available.
>
> Suppose we have the sequence
> Activity A (that load data)
> Then Activity B that use data
> Then application goes to background
> is killed by system
> is wake up on B
> ==> No problem because data is stored so it will be available and all will 
> be fine.
>
> But, suppose that before to be waked up, data is cleared.
> The application wake up on activity B with no data available.
> There will be a NPE.
>
> Of course, I can add in the OnCreate() method of application B that, if 
> data is not available, launch activity A and finish.
> But I also have to handle it in onResume(), on Pause(), on Create(), 
> onDestroy().
> And I have to make it in all my application's activities that use data 
> which is not really clean.
>
> I don't wan't that all my activities inherit from a single one.
> I don't wan"t to have only one activity with lot of fragments.
>
> The best option whould have been that the Android Application object is 
> able to handle startup and change the first intent in certain conditions.
> then, if we are going to run B and data is not available, lauch A instead.
> but sadly, this is not possible.
>
> So my question : How do you handle this kind of problem ?
>
> Thanks for any advice.
>
>
> Mike
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: How to offer new app to existing user base?

2013-04-17 Thread Παύλος-Πέτρος Τουρνάρης
You could add a changelog in the existing app and suggest them to download
your new app!


On Wed, Apr 17, 2013 at 10:57 AM, dnk  wrote:

> Not as far as I know of. Your best bet is update the old app and point
> them to the new one.
>
>
> On Tuesday, April 16, 2013 9:25:15 PM UTC-7, Jungle Jim wrote:
>>
>> I have written a new app that I want to publish this week.
>>
>> I have a number of existing users who have active installs of another
>> app. The new app is likely to be of interest to them, but I don't want to
>> make it an upgrade to the existing app.
>>
>> Is there some facility in Google Play to enables me to offer the new app
>> to my existing user base?
>>
>> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
*Παύλος-Πέτρος Τουρνάρης*
*Android  & Software Developer*

   - *http://goo.gl/TsJ8u*
   - *http://acschedule.org*

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Applications that relies on external datas.

2013-04-17 Thread mbaroukh
I have a problem that appear on every new developpement.
I never found a clean way to handle it so I'm asking for your help.

Suppose you have an app that rely on data coming from network.
Every activity needs those data.

So my approach actually is to handle the download by the first activity and 
store it so it will be widely available.
No other activity will be launched before data is stored so every activity 
will be sure it will be always available.

Suppose we have the sequence
Activity A (that load data)
Then Activity B that use data
Then application goes to background
is killed by system
is wake up on B
==> No problem because data is stored so it will be available and all will 
be fine.

But, suppose that before to be waked up, data is cleared.
The application wake up on activity B with no data available.
There will be a NPE.

Of course, I can add in the OnCreate() method of application B that, if 
data is not available, launch activity A and finish.
But I also have to handle it in onResume(), on Pause(), on Create(), 
onDestroy().
And I have to make it in all my application's activities that use data 
which is not really clean.

I don't wan't that all my activities inherit from a single one.
I don't wan"t to have only one activity with lot of fragments.

The best option whould have been that the Android Application object is 
able to handle startup and change the first intent in certain conditions.
then, if we are going to run B and data is not available, lauch A instead.
but sadly, this is not possible.

So my question : How do you handle this kind of problem ?

Thanks for any advice.


Mike

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Sprint 4G(WIMAX) tcp connection problem

2013-04-17 Thread Long Pu
We have to consider multiple platforms(iOS, Android, Blackberry). On iOS,
push notification
is not an option for our application.  If use GCM, we need  another extra
special design especially for android.


On Mon, Apr 15, 2013 at 11:23 PM, Robert Greenwalt wrote:

> Could you use GCM  instead
> of rolling your own long-lived connection with independent keepalive?
>  It'll be better for the users battery and better for the carriers network
> and you won't have to figure out issues like these.
>
>
> On Sat, Apr 13, 2013 at 3:35 AM, Long  wrote:
>
>> Hi Developers,
>> I have an background service which connects my server with a TCP
>> connection.
>> My background service sends a ping packet to my server every 4minutes
>> to keep the socket alive.
>>The problem is that the device can not get the packet from the server
>> after a short time(3 seconds from my test) after the ping is sent.
>>This app works fine on other networks(AT&T, verizon).
>>
>>The strange thing is that if I force the device to connect to 3G(EVDO
>> revision A), it works fine.
>>
>>It seems to me that, on Sprint 4G network, when an app sends a packet
>> through a tcp socket, and then the socket is idle for
>> several seconds, then the app will never be able to receive packets from
>> this socket.
>>
>>I don't think it's related to the 4G signal, since this issue can be
>> reproduced every time.
>>
>>Any suggestions?
>>
>>
>>
>>
>>
>>
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to android-developers+unsubscr...@googlegroups.com.
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/3FvPZp5n2K0/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Things don' happen. Things are made to happen.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Sprint 4G(WIMAX) tcp connection problem

2013-04-17 Thread Long Pu
I am connecting to tcp port 5222 which provides xmpp service


On Tue, Apr 16, 2013 at 12:00 AM, bob  wrote:

> What port number are you using on the server?
>
>
> Maybe use *port* *80* as it is more open?
>
>
> Thanks.
>
>
>
> On Saturday, April 13, 2013 5:35:13 AM UTC-5, Long wrote:
>>
>> Hi Developers,
>> I have an background service which connects my server with a TCP
>> connection.
>> My background service sends a ping packet to my server every 4minutes
>> to keep the socket alive.
>>The problem is that the device can not get the packet from the server
>> after a short time(3 seconds from my test) after the ping is sent.
>>This app works fine on other networks(AT&T, verizon).
>>
>>The strange thing is that if I force the device to connect to 3G(EVDO
>> revision A), it works fine.
>>
>>It seems to me that, on Sprint 4G network, when an app sends a packet
>> through a tcp socket, and then the socket is idle for
>> several seconds, then the app will never be able to receive packets from
>> this socket.
>>
>>I don't think it's related to the 4G signal, since this issue can be
>> reproduced every time.
>>
>>Any suggestions?
>>
>>
>>
>>
>>
>>
>>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/3FvPZp5n2K0/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Things don' happen. Things are made to happen.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] how to create a custom gauge in android

2013-04-17 Thread abdallah mouhamed amine
hi Parthi,
am working on android project not on BB


2013/4/17 Parthi K 

> Buddy u can call directly progress dialog in bb we call Gauge
> Thanks & Regards,
> Parthiban.k
> Software Engineer
> Mode FinServer Pvt. Ltd.
> Cell: +7204205850
> Email: parthisof...@gmail.com  |parthiban.k
> @modefinserver.com 
>
>
> On Wed, Apr 17, 2013 at 3:34 PM, psyco wrote:
>
>> hi all,
>>
>>
>>
>> am
>> trying to build a custom view witch displays a gauge, what i did is :
>> 1-designed the gauge with photoshop
>> 2-created the cutom View and it's .XML file
>> 3-set the bakcground gauge
>> So, i need to know how to display a needle and how rotating it
>> some help will be very grateful
>>
>>  --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to android-developers+unsubscr...@googlegroups.com.
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Abdallah Mohamed Amine
Élève ingénieur en informatique de la FST
Responsable d'un club embarqué microdesign
Tél : +216 27 105 393


-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Converting PCM to AMR-WB using AmrInputStream

2013-04-17 Thread Raneez


My Android application needs to convert recorded audio in WAV to AMR-NB and 
AMR-WB. And i am done with converting to *AMR-NB* using *AmrInputStream*.

In AmrInputStream, the value for SAMPLES_PER_FRAME is hard coded to *8000 * 
20 / 1000* and the audio has no changes even after changing 
SAMPLES_PER_FRAME to *(16000*20/1000)*.

Is it possible to convert PCM to *AMR-WB (16 khz)* using AmrInputStream ?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Only Portrait and ReversePortrait in android 2.1 API Level 7

2013-04-17 Thread Ricardo Cardoso
any idea?


2013/4/15 Ricardo Cardoso 

> I have a doubt as to leave the screen only in portrait and
> reversePortrait, tested code, but only when the screen turns
> reversePortrait, I can not go back to portrait. why?
>
> in my MainActivity.class
>
> @Overridepublic void onConfigurationChanged(Configuration newConfig) 
> {super.onConfigurationChanged(newConfig);final int rotation = 
> (((WindowManager) getSystemService(WINDOW_SERVICE))
> .getDefaultDisplay().getOrientation());
>
>  unlockScreenOrientation();
>
>  if (!mScreenOrientationLocked) {
>  if(rotation == Surface.ROTATION_0){
>   
> MainActivity.this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
>  }else{
> MainActivity.this.setRequestedOrientation(9);
>  }
> mScreenOrientationLocked = true;
>  }
>
> }
>
>
> private void unlockScreenOrientation() {
> setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
> mScreenOrientationLocked = false;}
>
> In my AndroidManifest.xml
>
>  android:name=".MainActivity"
> android:configChanges="orientation"
> android:screenOrientation="sensor"
> android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>
>
> Can anyone help me please?
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] how to create a custom gauge in android

2013-04-17 Thread Parthi K
Buddy u can call directly progress dialog in bb we call Gauge
Thanks & Regards,
Parthiban.k
Software Engineer
Mode FinServer Pvt. Ltd.
Cell: +7204205850
Email: parthisof...@gmail.com  |parthiban.k
@modefinserver.com 


On Wed, Apr 17, 2013 at 3:34 PM, psyco  wrote:

> hi all,
>
>
>
> am
> trying to build a custom view witch displays a gauge, what i did is :
> 1-designed the gauge with photoshop
> 2-created the cutom View and it's .XML file
> 3-set the bakcground gauge
> So, i need to know how to display a needle and how rotating it
> some help will be very grateful
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Changing width of TabIndicator in View Pager

2013-04-17 Thread Ansh
Hi guys ,

I want to reduce the width of the tabIndicator of the StripTabTitle in view 
pager. Here is the 
details.Please
 
help.

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




[android-developers] how to create a custom gauge in android

2013-04-17 Thread psyco
hi all,


am
 
trying to build a custom view witch displays a gauge, what i did is :
1-designed the gauge with photoshop
2-created the cutom View and it's .XML file 
3-set the bakcground gauge
So, i need to know how to display a needle and how rotating it 
some help will be very grateful

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: How to offer new app to existing user base?

2013-04-17 Thread dnk
Not as far as I know of. Your best bet is update the old app and point them 
to the new one.

On Tuesday, April 16, 2013 9:25:15 PM UTC-7, Jungle Jim wrote:
>
> I have written a new app that I want to publish this week.
>
> I have a number of existing users who have active installs of another app. 
> The new app is likely to be of interest to them, but I don't want to make 
> it an upgrade to the existing app.
>
> Is there some facility in Google Play to enables me to offer the new app 
> to my existing user base?
>
> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: How can users enable compatibility mode?

2013-04-17 Thread Piren
You don't enable it on the device.. the device does it for you.
If the app wasn't designed for a tablet and meets the conditions (like 
having the targetSdk below a set level and/or having not declared it is 
destined for big screens) then the device will show the proper 
  compatibility options like the Zoom button or the 3 dots.

On Monday, April 15, 2013 10:37:42 PM UTC+3, user123 wrote:
>
> I read here 
> that 
> under certain conditions, (optinal) compatibility mode is available to the 
> users.
>
> But I can't find it on the device, I looked in the menu of the app, in 
> app's settings, display settings, etc. Nothing with compatibility mode. 
> Where is it / should it be?
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] How to take the focus on to the softkeyboard

2013-04-17 Thread Shashidhar
Hi,
 I am working on a project which does not have any touch interface. All it
has is a remote control with 6 buttons (Enter, Back, next, prev, up and
down arrow keys). Using these button we need to control the navigation of
the app.

Coming to my problem here, I have an edit text which shows the soft
keyboard when it takes focus. Is there any way by which I can take the
focus on to the soft keyboard.  I mean, I should be able to use the next,
prev, up and down arrows buttons of my remote control to
move across the soft-keyboard keys and type in into the edittext.


Thanks,
Shashidhar

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Security exception with launchMode="singleTask"

2013-04-17 Thread Piren
apparently not :)

I do wonder though, does the same happen if you get a FileDescriptor and 
use it instead of a URI? 

On Monday, April 15, 2013 5:03:53 PM UTC+3, nobre wrote:
>
> Hi, is this supposed to be working after 2.3 ? I'm experiencing this 
> behavior on 4.0.3 and 4.1.1 , URI permissions aren't being granted to an 
> Activity that was previously running (singleTask), onNewIntent is called 
> and raises SecurityException when trying to use the content resolver.
>
> Em sábado, 30 de abril de 2011 10h49min00s UTC-3, Dianne Hackborn escreveu:
>>
>> Sorry, this is probably a bug in 2.3 with trying to grant a URI 
>> permission to an activity instance that is already running.  I'll look in 
>> to this.  In the mean-time, the only solution may be to not use singleTask 
>> for the activity being launched to a preview an attachment.  This is 
>> actually the preferred thing to do, since your preview activity should be 
>> running as its own instance as part of the gmail task.
>> On Apr 30, 2011 5:20 AM, "Akshay Goel"  wrote:
>> > To add, the exception occurs on this line-
>> > 
>> > mContext.getContentResolver().openInputStream(intent.getData());
>> > 
>> > where mContext is the activity context.
>> > 
>> > -Akshay
>> > 
>> > On Apr 30, 2:14 pm, Akshay Goel  wrote:
>> >> Hello,
>> >>
>> >> I have declared the launch mode of my activity to be singleTask. If I
>> >> launch my application, press the home button, go to an email client
>> >> (gmail in this case) & preview an attachment using my application, I
>> >> am experiencing asecurityexceptionon Android versions 2.3 & later,
>> >> which says that I do not have the permissions to access gmail
>> >> attachments. Theexceptiondoes not occur on prior versions & if I do
>> >> not use singleTask as the launchMode.
>> >>
>> >> Is this a known issue?
>> >>
>> >> Any help will be really appreciated.
>> >>
>> >> Thanks,
>> >> Akshay
>> > 
>> > -- 
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-d...@googlegroups.com
>> > To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.