Re: [android-developers] Which pattern is most common for apps that involve communication with servers?

2015-02-19 Thread Kristopher Micinski
Right, that's a good point I did not mention.

I'm interested in knowing what percentage of apps use a framework like
this rather than facilities purely within the vanilla Android
framework.

I can do some rough calculations in a while by grabbing a bunch of
apps and running some analysis on them,

Kris


On Thu, Feb 19, 2015 at 3:13 PM, TreKing treking...@gmail.com wrote:

 On Thu, Feb 19, 2015 at 2:03 PM, Kristopher Micinski
 krismicin...@gmail.com wrote:

 I was
 wondering if there were any other patterns that app developers used
 that I hadn't thought about,


 Use a library like Volley or Retrofit.

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

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

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


[android-developers] Which pattern is most common for apps that involve communication with servers?

2015-02-19 Thread Kristopher Micinski
I am trying to get an idea of what most developers use to interact
with web services.

The two main patterns I see in apps is to either create:
  - Create an AsyncTask to make restful requests, and then do
something with `onPostExecute`, or to
  - Create a service, and then have some API between the app and the
service, perhaps backed by a database.

I would suspect that for simple cases, the first thing would suffice,
and for more advanced cases, the second might be necessary.  I was
wondering if there were any other patterns that app developers used
that I hadn't thought about,

Kris

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


Re: [android-developers] Which pattern is most common for apps that involve communication with servers?

2015-02-19 Thread TreKing
On Thu, Feb 19, 2015 at 2:03 PM, Kristopher Micinski krismicin...@gmail.com
 wrote:

 I was
 wondering if there were any other patterns that app developers used
 that I hadn't thought about,


Use a library like Volley or Retrofit.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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


Re: [android-developers] Which pattern is most common for apps that involve communication with servers?

2015-02-19 Thread Kostya Vasilyev
A service turned inside out

A mediator class that manages a pool of threads, submits / cancels /
executes task objects, manages the wake lock (based on having tasks).

And a service whose only responsibility is to do startForeground /
stopForeground when it's told to.

All in the same process.

This way I don't have to bind to a service (which is asynchronous) and it's
easier to manage state in the UI, to indicate to the user what the app is
doing, and to queue up tasks when necessary.

-- K

2015-02-19 23:30 GMT+03:00 Kristopher Micinski krismicin...@gmail.com:

 Right, that's a good point I did not mention.

 I'm interested in knowing what percentage of apps use a framework like
 this rather than facilities purely within the vanilla Android
 framework.

 I can do some rough calculations in a while by grabbing a bunch of
 apps and running some analysis on them,

 Kris


 On Thu, Feb 19, 2015 at 3:13 PM, TreKing treking...@gmail.com wrote:
 
  On Thu, Feb 19, 2015 at 2:03 PM, Kristopher Micinski
  krismicin...@gmail.com wrote:
 
  I was
  wondering if there were any other patterns that app developers used
  that I hadn't thought about,
 
 
  Use a library like Volley or Retrofit.
 
 
 -
  TreKing - Chicago transit tracking app for Android-powered devices
 


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


Re: [android-developers] Re: NullPointerException in java.io.File.fixSlashes?

2015-02-19 Thread Fran Marzoa
Except I am not doing it...

On Wed, Feb 18, 2015, 15:26 Sérgio Faria sergio9...@gmail.com wrote:

 Given the stack above, it seems you're doing new File(null)

 https://android.googlesource.com/platform/libcore/+/
 android-2.3.4_r1/luni/src/main/java/java/io/File.java

 2015-02-18 11:45 GMT+00:00 Fran fmmar...@gmail.com:
  It seems this problem persists more than three years after. I am
  experiencing the same problem right now, all of them with Android 2.3.4
 
 
  On Sunday, June 5, 2011 at 4:21:31 PM UTC+2, Derek wrote:
 
  Hi all,
 
  We get crash reports with the following error:
  java.lang.NullPointerException
  at java.io.File.fixSlashes(File.java:234)
 
  It appears on File file = new File(path/subfolder);
  on some devices only.
 
  We cannot reproduce it. Where could this problem from from?
 
  Cheers.
 
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, 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/d/optout.

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


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


[android-developers] Re: Google Maps API Android - NullPointerException - setBoundsInParent

2015-02-19 Thread ps-geolives
Hello.

The bug has been confirmed by Google : 
https://code.google.com/p/gmaps-api-issues/issues/detail?id=7619

Best regards.

Le vendredi 6 février 2015 09:54:50 UTC+1, ps-geolives a écrit :

 Hello.

 In our Android mobile application (compatible with Android versions 4.0 
 and upper), we use Google Maps API V2.

 We get some bug reports from users on some kinds of devices (Android 
 versions 4.3, 4.4 and 5.0) with a NullPointerException in setBoundsInParent 
 method of android.view.accessibility.AccessibilityNodeInfo class.

 The application crashes when the user tries to move or to zoom on the map.

 The problem only appears for some users - devices. Most of our customers 
 do not have that problem.

 We cannot reproduce this problem on our development devices, so it's 
 difficult for us to find the origin of this problem.

 You will find the full stacktraces of the bug below.

 Does someone have an idea?

 Thanks a lot in advance for your answer.

 Best regards.

 *Stacktrace on Android 4.3 - 4.4*

 java.lang.NullPointerException
 at android.view.accessibility.AccessibilityNodeInfo.setBoundsInParent(
 AccessibilityNodeInfo.java:1012)
 at android.support.v4.view.a.k.c(SourceFile:819)
 at android.support.v4.view.a.i.b(SourceFile:1850)
 at com.google.maps.api.android.lib6.c.et.a(Unknown Source)
 at android.support.v4.widget.ab.a(SourceFile:56)
 at android.support.v4.widget.ac.a(SourceFile:717)
 at android.support.v4.view.a.x.a(SourceFile:112)
 at android.support.v4.view.a.ad.createAccessibilityNodeInfo(SourceFile:42)
 at android.view.
 AccessibilityInteractionController$AccessibilityNodePrefetcher.
 prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:724
 )
 at android.view.AccessibilityInteractionController.
 findAccessibilityNodeInfoByAccessibilityIdUiThread(
 AccessibilityInteractionController.java:147)
 at android.view.AccessibilityInteractionController.access$300(
 AccessibilityInteractionController.java:49)
 at android.view.AccessibilityInteractionController$PrivateHandler.
 handleMessage(AccessibilityInteractionController.java:971)
 at android.os.Handler.dispatchMessage(Handler.java:106)
 at android.os.Looper.loop(Looper.java:136)
 at android.app.ActivityThread.main(ActivityThread.java:5212)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:515)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.
 java:786)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
 at dalvik.system.NativeStart.main(Native Method)

 *Stacktrace on Android 5.0*

 java.lang.NullPointerException: Attempt to read from field 'int 
 android.graphics.Rect.left' on a null object reference
 at android.view.accessibility.AccessibilityNodeInfo.setBoundsInParent(
 AccessibilityNodeInfo.java:1316)
 at android.support.v4.view.a.k.c(SourceFile:819)
 at android.support.v4.view.a.i.b(SourceFile:1850)
 at com.google.maps.api.android.lib6.c.et.a(Unknown Source)
 at android.support.v4.widget.ab.a(SourceFile:56)
 at android.support.v4.widget.ac.a(SourceFile:717)
 at android.support.v4.view.a.x.a(SourceFile:112)
 at android.support.v4.view.a.ad.createAccessibilityNodeInfo(SourceFile:42)
 at android.view.
 AccessibilityInteractionController$AccessibilityNodePrefetcher.
 prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:894
 )
 at android.view.AccessibilityInteractionController.
 findAccessibilityNodeInfoByAccessibilityIdUiThread(
 AccessibilityInteractionController.java:155)
 at android.view.AccessibilityInteractionController.access$400(
 AccessibilityInteractionController.java:53)
 at android.view.AccessibilityInteractionController$PrivateHandler.
 handleMessage(AccessibilityInteractionController.java:1236)
 at android.os.Handler.dispatchMessage(Handler.java:102)
 at android.os.Looper.loop(Looper.java:135)
 at android.app.ActivityThread.main(ActivityThread.java:5221)
 at java.lang
 ...

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


Re: [android-developers] Re: NullPointerException in java.io.File.fixSlashes?

2015-02-19 Thread Sérgio Faria
Well, either the stack trace is wrong or the source is not the one I linked 
to (android-2.3.4_r1) or you're doing new File((String) null)

Let's see:

3 at java.io.File.init(File.java:139)
138. public File(String path) {
139. init(path);

2 at java.io.File.init(File.java:189)

186. private void init(String dirtyPath) {
187. // Cache the path and the absolute path.
188. // We can't call isAbsolute() here (http://b/2486943).
189. String cleanPath = fixSlashes(dirtyPath);

1 at java.io.File.fixSlashes(File.java:205)
202. private String fixSlashes(String origPath) {
203. // Remove duplicate adjacent slashes.
204. boolean lastWasSlash = false;
205. char[] newPath = origPath.toCharArray();

On Thursday, February 19, 2015 at 9:59:30 AM UTC, Fran wrote:

 Except I am not doing it...

 On Wed, Feb 18, 2015, 15:26 Sérgio Faria sergi...@gmail.com javascript: 
 wrote:

 Given the stack above, it seems you're doing new File(null)

 https://android.googlesource.com/platform/libcore/+/
 android-2.3.4_r1/luni/src/main/java/java/io/File.java

 2015-02-18 11:45 GMT+00:00 Fran fmma...@gmail.com javascript::
  It seems this problem persists more than three years after. I am
  experiencing the same problem right now, all of them with Android 2.3.4
 
 
  On Sunday, June 5, 2011 at 4:21:31 PM UTC+2, Derek wrote:
 
  Hi all,
 
  We get crash reports with the following error:
  java.lang.NullPointerException
  at java.io.File.fixSlashes(File.java:234)
 
  It appears on File file = new File(path/subfolder);
  on some devices only.
 
  We cannot reproduce it. Where could this problem from from?
 
  Cheers.
 
 
  --
  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 
 javascript:
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com javascript:
  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 javascript:.
  For more options, visit https://groups.google.com/d/optout.

 --
 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 
 javascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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/b3XY_KvU7g4/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 android-developers+unsubscr...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.



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


Re: [android-developers] Re: NullPointerException in java.io.File.fixSlashes?

2015-02-19 Thread Fran Marzoa
My app has about 20,000 boots a day, and every single crash like this one
is reported to be occurring exclusively with such 2.3.4 Android version.
Every single one, in spite such version represent less than 5% of the
devices were my app is installed. No other Android version is affected at
all. Thus the causal variable is clearly isolated and identified and it is
not within my code.

I am not sure if those users are using specifically that 2.3.4_r1 code
neither, but it doesn't matter anyway and investigating it further is
pointless since I cannot change the user's underlying OS version.

I will have to live with it, I guess. I googled such problem, find this
thread, and just wanted to point out that this bug is still around.

Bests,

On Thu, Feb 19, 2015, 13:00 Sérgio Faria sergio9...@gmail.com wrote:

 Well, either the stack trace is wrong or the source is not the one I
 linked to (android-2.3.4_r1) or you're doing new File((String) null)

 Let's see:


 3 at java.io.File.init(File.java:139)

 138. public File(String path) {
 139. init(path);

 2 at java.io.File.init(File.java:189)

 186. private void init(String dirtyPath) {
 187. // Cache the path and the absolute path.
 188. // We can't call isAbsolute() here (http://b/2486943).
 189. String cleanPath = fixSlashes(dirtyPath);

 1 at java.io.File.fixSlashes(File.java:205)
 202. private String fixSlashes(String origPath) {
 203. // Remove duplicate adjacent slashes.
 204. boolean lastWasSlash = false;
 205. char[] newPath = origPath.toCharArray();

 On Thursday, February 19, 2015 at 9:59:30 AM UTC, Fran wrote:

 Except I am not doing it...

 On Wed, Feb 18, 2015, 15:26 Sérgio Faria sergi...@gmail.com wrote:

 Given the stack above, it seems you're doing new File(null)

 https://android.googlesource.com/platform/libcore/+/android-
 2.3.4_r1/luni/src/main/java/java/io/File.java

 2015-02-18 11:45 GMT+00:00 Fran fmma...@gmail.com:
  It seems this problem persists more than three years after. I am
  experiencing the same problem right now, all of them with Android 2.3.4
 
 
  On Sunday, June 5, 2011 at 4:21:31 PM UTC+2, Derek wrote:
 
  Hi all,
 
  We get crash reports with the following error:
  java.lang.NullPointerException
  at java.io.File.fixSlashes(File.java:234)
 
  It appears on File file = new File(path/subfolder);
  on some devices only.
 
  We cannot reproduce it. Where could this problem from from?
 
  Cheers.
 
 
  --
  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/d/optout.

 --
 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/to
 pic/android-developers/b3XY_KvU7g4/unsubscribe.
 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/d/optout.

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


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more 

Re: [android-developers] INSTALL_FAILED_DUPLICATE_PERMISSION

2015-02-19 Thread Marina Cuello
Hi!
I'm not sure how to help, because've only met this problem when there
are several users set on a device.

If I install my app directly from Eclipse with my debug certificates,
then uninstall the app and try to install a production copy, made with
the release certificate, I've got the same error message
INSTALL_FAILED_DUPLICATE_PERMISSION.

Until I uninstall the app in every user by hand, I can't install the
new one. At least in your case the error message makes sense :)

When I was trying to understand that error message, I've read that it
affected permissions with android:protectionLevel  declared as
signature. Are you using that? Can you change it to normal without
affecting your business model?


Marina

On Wed, Feb 18, 2015 at 11:58 AM, Marten Gajda mar...@dmfs.org wrote:
 Hi all,

 we've some problems with Android 5. There seems to be a new policy that
 requires two apps that define the same permissions to be signed by the same
 key. Otherwise you can't install the app getting the error
 INSTALL_FAILED_DUPLICATE_PERMISSION.
 This is very annoying and I'd like to know that the suggested
 solution/workaround to this is.

 We have an Open Source task app that provides access to the tasks via a
 ContentProvider. The concept pretty much equals the CalendarProvider. We
 also have a (not yet Open Source) sync app that can sync to this task app
 (or its ContentProvider).
 The problem is that (in contrast to the CalendarProvider) our users usually
 install the sync app first. That means the permissions of the task app are
 not known when the sync app is installed. So they are not granted
 automatically when the task app is installed afterwards.

 Until Android 5 the solution was to define the same permissions in the sync
 app. But that doesn't work any more in some cases. If the user compiles the
 task app himself he can not use our sync app at the same time, because they
 are not signed by the same key.

 How can we achieve that we protect access to the task ContentProvider by
 permissions still allowing them to use a self compiled version?

 Even if both apps are signed by the same key it doesn't seem to work in some
 cases (does Android 5 also require both apps to be from the same source?)

 A similar issue exists when another developer tries to build a sync app that
 can sync to our task app. He can not add the same permissions, because he
 can't use the same signing key. But if he can't add the same permission
 definition his app won't get the permission if it's installed before the
 task app is installed.

 What's the solution of this mess?

 thanks

 Marten

 --
 Marten Gajda
 Schandauer Straße 34
 01309 Dresden
 Germany

 tel: +49 177 4427167
 email: mar...@dmfs.org
 twitter: twitter.com/dmfs_org

 VAT Reg. No.: DE269072391

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

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


[android-developers] VoiceInteractionService - Is there Voice Interaction support in Lollipop (21) SDK?

2015-02-19 Thread smichak
Hi,

I have noticed that in Android Lollipop (API Level 21) there's a 
VoiceInteractionService class 
(http://developer.android.com/reference/android/service/voice/VoiceInteractionService.html)
 
which apparently allows an app to setup Hotword Detectors which fire a 
callback when a certain hotword is recognized by the VR module. Although 
the class is available in the SDK I don't see any guide or detailed 
documentation on how to use it. Digging in the AOSP code I found out that 
there's a system service for VR but this service is not available for 
arbitrary apps, just system or platform signed apps. I guess this service 
is used by Google Services for servicing Google Now's voice activation 
(a.k.a OK Google). If so, I can't understand why this service is 
available in the SDK.

Can someone from Google provide some information about this? Is there a way 
to add Voice Interaction the apps now or in the future? Also, if someone 
knows about an alternative Voice Interaction package that may be used I 
would be glad to hear about it.


Micha

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


Re: [android-developers] Which pattern is most common for apps that involve communication with servers?

2015-02-19 Thread Kristopher Micinski
I agree, that sounds like a useful pattern.  I *think* that's
relatively close to how Volley is implemented (though I haven't read
the implementation fully), too.

Do you have any pointers to open sourced code that would provide an
example of such a behavior?  If not, no big deal: I can certainly
write one myself, and am not asking you to open-source code from your
codebase.

Kris


On Thu, Feb 19, 2015 at 4:17 PM, Kostya Vasilyev kmans...@gmail.com wrote:
 A service turned inside out

 A mediator class that manages a pool of threads, submits / cancels /
 executes task objects, manages the wake lock (based on having tasks).

 And a service whose only responsibility is to do startForeground /
 stopForeground when it's told to.

 All in the same process.

 This way I don't have to bind to a service (which is asynchronous) and it's
 easier to manage state in the UI, to indicate to the user what the app is
 doing, and to queue up tasks when necessary.

 -- K


 2015-02-19 23:30 GMT+03:00 Kristopher Micinski krismicin...@gmail.com:

 Right, that's a good point I did not mention.

 I'm interested in knowing what percentage of apps use a framework like
 this rather than facilities purely within the vanilla Android
 framework.

 I can do some rough calculations in a while by grabbing a bunch of
 apps and running some analysis on them,

 Kris


 On Thu, Feb 19, 2015 at 3:13 PM, TreKing treking...@gmail.com wrote:
 
  On Thu, Feb 19, 2015 at 2:03 PM, Kristopher Micinski
  krismicin...@gmail.com wrote:
 
  I was
  wondering if there were any other patterns that app developers used
  that I hadn't thought about,
 
 
  Use a library like Volley or Retrofit.
 
 
  -
  TreKing - Chicago transit tracking app for Android-powered devices
 


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

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