[android-developers] Re: Must reboot Lollipop after write to external memory

2015-08-13 Thread Johan Appelgren
As I understand it you are supposed to notify the media database of any new files you add using http://developer.android.com/reference/android/media/MediaScannerConnection.html. Android itself will only update the media database automatically on boot. /Johan Den torsdag 13 augusti 2015 kl. 0

[android-developers] Re: Examine the details of notifications?

2015-02-15 Thread Johan Appelgren
I think you can get most of that information with: adb shell dumpsys notification -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, sen

[android-developers] Re: Is it possible, that Android kills a service inside an app?

2014-12-05 Thread Johan Appelgren
What? Whether a Service runs in a separate process or not DOES NOT depend on whether you bind to it and/or start it using startService. That is only controlled by the process attribute, see http://developer.android.com/guide/topics/manifest/service-element.html#proc. On Friday, December 5, 20

[android-developers] Re: When/where should bindService/unbindService be called

2014-03-31 Thread Johan Appelgren
Why do you need to start the service at boot? That combined with what you write later about starting and stopping the service while your activity is running AND binding to it makes no sense to me. You're more likely to get a good answer if you explain more what you need the service for. http:/

[android-developers] Windows 8.1 and adb problem

2013-10-21 Thread Johan Appelgren
How does it fail? Adb works fine on Windows 8.1 for me, tried with a Galaxy Nexus. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, s

[android-developers] Re: close on minimise application

2013-08-16 Thread Johan Appelgren
> четверг, 15 августа 2013 г., 16:57:56 UTC+5 пользователь Johan Appelgren > написал: >> >> You could have a timestamp set in onPause that you check in >> onCreate/onResume. If it has been too long redirect to your login activity. >> >> On Thursday, August 15,

[android-developers] Re: close on minimise application

2013-08-15 Thread Johan Appelgren
You could have a timestamp set in onPause that you check in onCreate/onResume. If it has been too long redirect to your login activity. On Thursday, August 15, 2013 1:29:55 PM UTC+2, passer wrote: > > But how activity knows if user already authenticated. > > if I use static variable isAuthenticat

[android-developers] Re: HttpClient GC_Concurrent freed

2013-07-30 Thread Johan Appelgren
Have you tried analyzing your app with tools like ddms? http://developer.android.com/tools/debugging/ddms.html http://android-developers.blogspot.se/2011/03/memory-analysis-for-android.html On Monday, July 29, 2013 8:22:12 AM UTC+2, Kristoffer wrote: > > Hello. > Iam having trouble with memory l

[android-developers] Re: why we prefer Inexact Alarms ?

2013-07-17 Thread Johan Appelgren
Says why right there in the documentation. "These alarms are more power-efficient than the strict recurrences supplied by setRepeating(int, long, long, PendingIntent), since the system can adjust alarms' phase to cause them to fire simultaneously, avoiding waking the device from sleep more tha

[android-developers] APK Re-Install Won't Clear Data

2013-07-05 Thread Johan Appelgren
Where do you store data and what version of Android do you test on? -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

[android-developers] Service is restarted after ANR, OutOfMemoryError, native crashes, etc inspite of Service.START_NOT_STICKY

2013-07-03 Thread Johan Appelgren
Do you bind to the service? -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegro

[android-developers] Re: Service onDestroy() not being called...

2013-05-03 Thread Johan Appelgren
In addition to binding to the service, do you use startService? If you do, you must also call stopService/stopSelf, just unbinding and calling stopForeground is not enough. On Thursday, May 2, 2013 9:07:07 PM UTC+2, Larry Meadors wrote: > > I have a bound service that I'm using to play audio.

Re: [android-developers] Android kills my Thread created by Service

2013-04-23 Thread Johan Appelgren
Even if you have a foregrounded service the process might get killed, and restarted if the service is configured for it. An example of this is the music app on my Galaxy Nexus, it gets killed every now and then if I listen to music and use Flipboard or Chrome beta, memory intensive apps. On Tu

[android-developers] Re: New activity when I lock my screen

2013-01-30 Thread Johan Appelgren
What error do you get? On Wednesday, January 30, 2013 11:48:59 AM UTC+1, Davide Moriello wrote: > > Hello, I'm developing an android app for some time now. Everything is > going well. When I close my app with the home button and I reopen it there > aren't any problems or crashes. > But, when I

[android-developers] Re: Knockoff copy of my app on Google Play.

2013-01-28 Thread Johan Appelgren
Just decompile, add ad activity, change manifest and recompile. Haven't tried but can probably be automated for most apps. -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegr

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-28 Thread Johan Appelgren
You'd probably want to persist data even if you have a confirmation dialog on back since the user might task switch or press home. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@goo

[android-developers] Re: Get the calling thread's id

2012-11-19 Thread Johan Appelgren
You can get the thread id using Thread.getId() http://developer.android.com/reference/java/lang/Thread.html#getId() On Monday, November 19, 2012 10:14:27 AM UTC+1, AndroidCompile wrote: > > Hi, > Is it possible to retrieve the id of a thread that called a certain > function? (assuming this func

[android-developers] Re: Remote resources

2012-10-31 Thread Johan Appelgren
Have you looked at using Multiple APKs? http://developer.android.com/guide/google/play/publishing/multiple-apks.html Wont solve the overhead of managing multiple builds, but at least you wont "disperse social promotion". On Wednesday, October 31, 2012 2:35:11 PM UTC+1, Fran wrote: > > Hi there

[android-developers] Re: MEDIA_MOUNTED broadcast not being recieved when Application is installed on SD card

2012-10-04 Thread Johan Appelgren
If you want your app to start at boot then you should not allow it to be installed on external storage. http://developer.android.com/guide/topics/data/install-location.html#ShouldNot On Thursday, October 4, 2012 1:58:22 PM UTC+2, Juned Khan wrote: > > How do i start my application on startup in

[android-developers] Re: Request to Separate Permissions for Read Phone State and Read Phone Identity

2012-08-17 Thread Johan Appelgren
For a lot of apps the life cycle events for activities are enough, no need bother with whether the user is in a call or not. And isn't the audio focus mechanism enough for most media/music apps unless you need to support API level < 8? If you worry about IMEI, what about Wifi MAC? And what abo

Re: [android-developers] Non sticky service gets recreated (indefinetly?)

2012-08-12 Thread Johan Appelgren
ctivity service service_name>". If your service is listed there, it will show you what its > current state is -- what is bound to it, whether it is started, etc. > > On Fri, Aug 10, 2012 at 2:26 PM, Johan Appelgren > > > wrote: > >> You're right that I'

Re: [android-developers] Non sticky service gets recreated (indefinetly?)

2012-08-10 Thread Johan Appelgren
s; } } @Override public IBinder onBind(Intent arg0) { Log.d(TAG, "onBind"); return mBinder; } @Override public int onStartCommand(Intent intent, int flags, int startId) { Log.d(TAG, "onStartCommand"); return START_NOT_STICKY; } @Override public void onCreate() { L

Re: [android-developers] Non sticky service gets recreated (indefinetly?)

2012-08-10 Thread Johan Appelgren
ocess is in the > background, it can't bring the service up beyond the background, so it > doesn't count as a running process but a cached process. > > On Thu, Aug 9, 2012 at 3:09 AM, Johan Appelgren > > > wrote: > >> Ok, thanks. But shouldn't it (non-s

Re: [android-developers] Non sticky service gets recreated (indefinetly?)

2012-08-09 Thread Johan Appelgren
o > either of these things. > > If you don't want it to stay created, either don't bind to it when you > don't want it around, or don't use BIND_AUTO_CREATE so you aren't forcing > it to remain created while bound to it. > > On Wed, Aug 8, 2012 at 10:

Re: [android-developers] Non sticky service gets recreated (indefinetly?)

2012-08-08 Thread Johan Appelgren
> started or there are one or more connections to it with the > Context.BIND_AUTO_CREATE flag. > > http://developer.android.com/reference/android/app/Service.html > > On Wed, Aug 8, 2012 at 1:52 PM, Johan Appelgren > > > wrote: > >> If I have a simple servi

[android-developers] Non sticky service gets recreated (indefinetly?)

2012-08-08 Thread Johan Appelgren
If I have a simple service that returns START_NOT_STICKY in onStartCommand and I both start it explicitly (startService) and bind to it (bindService) in onCreate of my activity the service gets recreated after it has been killed over and over again. I unbind the service in onPause of my activity

[android-developers] Re: HTTP Post works only on port 80 when on mobile network (Galaxy Nexus)

2012-07-23 Thread Johan Appelgren
Works fine using 3g on my Galaxy Nexus (stock, Android 4.1.1). Are you testing using the same carrier and APN settings on the Desire and Galaxy Nexus? I've had some issues with a bad carrier proxy that garbled non-port 80 traffic, fixed by removing the proxy from APN. On Sunday, July 15, 2012

[android-developers] Re: Broadcast receiver not working in ICS

2012-07-13 Thread Johan Appelgren
To request a permission you have to use the uses-permission element. http://developer.android.com/guide/topics/manifest/uses-permission-element.html What you have done is require that the sender of the BOOT_COMPLETED intent has been granted the RECEIVE_BOOT_COMPLETED permission. Don't think t

[android-developers] Re: Broadcast receiver not working in ICS

2012-07-13 Thread Johan Appelgren
To request a permission you have to use the uses-permission element. http://developer.android.com/guide/topics/manifest/uses-permission-element.html What you have done is require that the sender of the BOOT_COMPLETED intent has been granted the RECEIVE_BOOT_COMPLETED permission. Don't think t

[android-developers] Re: When the android id can change

2012-06-28 Thread Johan Appelgren
If you mean ANDROID_ID then the documentation is pretty clear I think. "A 64-bit number (as a hex string) that is randomly generated on the device's first boot and should remain constant for the lifetime of the device. (The value may change if a factory reset is performed on the device.)" htt

[android-developers] Re: ICS don't give you a real multitasking.

2012-05-16 Thread Johan Appelgren
pened, you will > see that the activity has been restarted, now open the other two apps, > now return to browser, the page needs a refresh on every tabs. > > This is obviously a broken multitasking system. > > On May 16, 3:34 pm, Johan Appelgren wrote: > > You proba

[android-developers] Re: ICS don't give you a real multitasking.

2012-05-16 Thread Johan Appelgren
You probably have other apps installed with running services and manifest registered broadcast receivers receiving broadcasts pushing the fart apps out. As long as there is some memory free for non-service apps their processes are cached and reused just fine. http://developer.android.com/guide/

Re: [android-developers] Long running Android service is getting recreated over and over

2012-05-10 Thread Johan Appelgren
On Thursday, May 10, 2012 1:30:02 AM UTC+2, Dianne Hackborn wrote: > > Yes well there is this meme spread by certain perhaps not unbiased > entities that having multitasking at all, I mean doing multitasking like > Android, is bad because it is intrinsically battery consuming. This is of > cou

[android-developers] Re: Directly accessing the e-mail app.

2012-04-12 Thread Johan Appelgren
What do you mean with default e-mail app? If the user has selected a default e-mail app the user wont get the chooser. If the user hasn't selected a default e-mail app the user will get the chooser. On Thursday, April 12, 2012 9:12:12 AM UTC+2, Put_tiMe wrote: > > How do I directly choose the d

Re: [android-developers] Re: How I disable GPS when i exit Application

2012-03-28 Thread Johan Appelgren
Ankit Kasliwal wrote: > > so can you tell me the process > > On Wed, Mar 28, 2012 at 2:25 PM, Johan Appelgren wrote: > >> It is still the wrong thing to do. Just because the API allows you to do >> something wrong doesn't mean you have to do it. >> >>

Re: [android-developers] Re: How I disable GPS when i exit Application

2012-03-28 Thread Johan Appelgren
It is still the wrong thing to do. Just because the API allows you to do something wrong doesn't mean you have to do it. On Wednesday, March 28, 2012 10:41:04 AM UTC+2, Ankit Kasliwal wrote: > > Johan i use that command the it's working properly. > > On Wed, Mar 28, 2

[android-developers] Re: How I disable GPS when i exit Application

2012-03-28 Thread Johan Appelgren
Afaik you should never use android.os.Process.killProcess or ActivityManager.killBackgroundProcesses. On Wednesday, March 28, 2012 7:50:40 AM UTC+2, Ankit Kasliwal wrote: > > Hello, > I have problem in my application when i press exit i try to close > all my activity but GPS running so

[android-developers] Re: On ICS, Stopped service can't receive an intent.

2012-01-30 Thread Johan Appelgren
You're probably running into this behavior introduced in Android 3.1 http://developer.android.com/sdk/android-3.1.html#launchcontrols -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@

[android-developers] Re: Avoid android taking screenshot/snapshot of activity while going in background

2012-01-20 Thread Johan Appelgren
Did you try using the FLAG_SECURE flag? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@g

[android-developers] Re: Avoid android taking screenshot/snapshot of activity while going in background

2012-01-20 Thread Johan Appelgren
A quick search in this group gave me this: https://groups.google.com/d/msg/android-developers/363Au8CqdLY/UhsUnEgZViIJ http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE -- You received this message because you are subscribed to the Google Groups

[android-developers] Re: Is possible use AlarmManager to schedule run a Service

2012-01-19 Thread Johan Appelgren
Because all pending alarms for an app are removed when it is killed (force closed). So don't kill your app. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubs