[android-developers] Re: New Google Play Services Library causes ANR

2014-12-22 Thread Kostya Vasilyev
Looks like a "classic" two-thread deadlock.

Thread "main" holding one monitor, and waiting for thread 
"client_id_fetcher" while trying to lock another:

"main" prio=5 tid=1 MONITOR
| group="main" sCount=1 dsCount=0 obj=0x40e70a78 self=0x57017010
| sysTid=24172 nice=0 sched=0/0 cgrp=apps handle=1074714076
| state=S schedstat=( 42758 1139226000 1925 ) utm=17 stm=25 core=0
at com.google.android.gms.analytics.ae.void U(java.lang.String)((null):~-1)
  
 com.google.android.gms.analytics.Logger getLogger()
- waiting to lock <0x413413a0> held by tid=11 (client_id_fetcher)

And thread "client_id_fetcher" waiting for thread "main":

"client_id_fetcher" prio=5 tid=11 MONITOR
| group="main" sCount=1 dsCount=0 obj=0x4133ed30 self=0x58adfbc8
| sysTid=24186 nice=0 sched=0/0 cgrp=apps handle=1487037720
| state=S schedstat=( 284614000 1254896000 1744 ) utm=1 stm=27 core=0
at 
com.google.android.gms.analytics.GoogleAnalytics.com.google.android.gms.analytics.GoogleAnalytics
 
getInstance(android.content.Context)((null):~-1)

com.google.android.gms.analytics.GoogleAnalytics eY()
void 
a(com.google.android.gms.analytics.aa)
int ai(java.lang.String)
void setDryRun(boolean)
void 
enableAutoActivityReports(android.app.Application)
void 
reportActivityStart(android.app.Activity)

com.google.android.gms.analytics.Tracker newTracker(int)

com.google.android.gms.analytics.Tracker 
a(com.google.android.gms.analytics.Tracker)
void 
a(com.google.android.gms.analytics.GoogleAnalytics$a)
void u(java.util.Map)
- waiting to lock <0x4133ba20> held by tid=1 (main)

Like this:

void something_in_main() {

   synchronized (lockObject1) {
synchronized (lockObject2) {

}
}
}

and

void something_in_client_id_fetcher() {

   synchronized (lockObject2) {
synchronized (lockObject1) {

}
}
}


( I don't work for Google or know anything about GA, but a deadlock is a 
deadlock )

-- K

On Monday, December 22, 2014 7:07:11 AM UTC+3, yccheok wrote:
>
> I get huge number of ANR 
>
> ANR keyDispatchingTimedOut
>
> after using latest Google Play Services Library.
>
> The problematic code is
>
> com.google.android.gms.analytics.GoogleAnalytics 
> getInstance(android.content.Context)
>
> This can be seen in the proguard retrace log
>
> - pid 24172 at 2014-12-22 10:17:52 -
> Cmd line: org.yccheok.jstock.gui
>
> DALVIK THREADS:
> (mutexes: tll=0 tsl=0 tscl=0 ghl=0)
>
> "main" prio=5 tid=1 MONITOR
> | group="main" sCount=1 dsCount=0 obj=0x40e70a78 self=0x57017010
> | sysTid=24172 nice=0 sched=0/0 cgrp=apps handle=1074714076
> | state=S schedstat=( 42758 1139226000 1925 ) utm=17 stm=25 core=0
> at com.google.android.gms.analytics.ae.void U(java.lang.String)((null):~-1)
>   
>  com.google.android.gms.analytics.Logger getLogger()
> - waiting to lock <0x413413a0> held by tid=11 (client_id_fetcher)
> at com.google.android.gms.analytics.ae.void V(java.lang.String)((null):-1)
> at 
> com.google.android.gms.analytics.GoogleAnalytics.com.google.android.gms.analytics.GoogleAnalytics
>  
> getInstance(android.content.Context)((null):-1)
> 
> com.google.android.gms.analytics.GoogleAnalytics eY()
> void 
> a(com.google.android.gms.analytics.aa)
> int 
> ai(java.lang.String)
> void setDryRun(boolean)
> void 
> enableAutoActivityReports(android.app.Application)
> void 
> reportActivityStart(android.app.Activity)
> 
> com.google.android.gms.analytics.Tracker newTracker(int)
> 
> com.google.android.gms.analytics.Tracker 
> a(com.google.android.gms.analytics.Tracker)
> void 
> a(com.google.android.gms.analytics.GoogleAnalytics$a)
> void u(java.util.Map)
> at com.google.android.gms.analytics.GoogleAnalytics.void eZ()((null):-1)
> at com.google.android.gms.analytics.GoogleAnalytics.((null):-1)
> at com.google.android.gms.analytics.GoogleAnalytics.((null):-1)
> at 
> com.google.android.gms.analyt

Re: [android-developers] ViewPager pages not drawn

2014-12-22 Thread Kostya Vasilyev


On Sunday, December 21, 2014 6:15:44 AM UTC+3, Doug Gordon wrote:
>
> SOLVED! After tracing the execution through ViewPager and 
> FragmentPagerAdapter and trying to explain the very strange behavior I was 
> seeing, I eventually discovered that when I wrote my fragments extending 
> Fragment and ListFragment a long time ago, I had added a getView() method 
> that was (inadvertently) overriding the method by that name in the 
> superclass and was returning the wrong view for what the ViewPager was 
> expecting. I removed these methods and everything started working.
>
> The only explanation I have for why this code was working OK with the 
> native fragments is that I noticed that the support.v4 fragments enclose 
> the fragment's actual root view as returned by onCreateView with some sort 
> of FrameLayout that they create, and that is what getView returns. The 
> native fragments apparently do not do this, so the view returned by my 
> getView method worked correctly.
>
> The only odd thing, and I am not a Java expert, is that I did not precede 
> my getView with @Override and did not notice any error or warning about 
> that. Isn't this required? I know that when I wrote that code that I was 
> not intending to override the superclass.
>

@Override is not required. 

It's for flagging a method that you intend to be an override -- and if it 
really isn't (no matching method in a base class / interface), then the 
compiler will flag it with an error.

Useful to detect a situation when someone makes a change to a base class or 
interface (potentially a few hierarchy levels up), maybe adding a 
parameter, that sort of thing -- and your class' method suddenly doesn't 
override what it's supposed to, breaking at runtime.

Personally, I find it very useful to use Eclipse's "auto-format when 
saving", with the setting that automatically adds any missing @Override 
annotations.

-- K

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

2014-12-22 Thread yogendra G
Dear All,

I am interested in developing android ticketing app. So ,i have few
queries before i start as below:
1.   Do we have any opensource platform/framework with all built-up tools
which allows us only with few costumes.
2.   What are the best and cheaper payment gateways available for movie/bus
ticket booking.
3.   How to design seating screen layouts in android for movie/bus
ticketing.
4.   How much time it would take to build similar bookmyshow app prototype
in android.

Please give me sum solution for the queries above and sorry if questions
are not framed in proper way.

Thanks & Br,
Yogendra G.
+91-9916168647

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

2014-12-22 Thread sweety fx
If anyone know the answer please let me know for the stack overflow 
question I asked

http://stackoverflow.com/q/27573011/3722531

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

2014-12-22 Thread Tim
 

The latest release of the MobiForms Developer mobile app development tool 
version 8.0 now supports the creation of Native or HTML5 offline apps with 
chart report objects including Bar Charts, Line Charts, Pie Charts and 
Dials.  This release is underpinned by the JFreeChart/AFreeChart Java and 
RGraph Javascript libraries. 

With MobiForms you can create a range of business apps for just about any 
mobile device including Android, iPhone, iPad, iPod, Windows Mobile and 
Tablet.

The new graphical report objects are driven by lists of data or by dynamic 
SQL queries linked to a local offline mobile database or a remote back 
office database in real-time or near real-time via the MobiForms Sync 
Server. Supported back office databases include Oracle, SQL Server, Access, 
Sybase, IBM DB2, SQLite, HSQLDB, Firebird and MySQL.

The reporting features include:

   - Build professional dashboards and reports with a mixture of objects on 
   one screen including bar charts, line charts, pie charts and dials. 
   - Comma separated strings or dynamic SQL queries for labels and data. 
   - Variable X axis text angle. 
   - Variable X axis position - bottom, centre or top depending on whether 
   values are all positive, mixed or negative. 
   - Optional shading of a dial area with green for "safe" using a starting 
   percentage. 
   - Optional shading of a dial area with red for "danger" using a starting 
   percentage. 
   - Connect to a range of industry standard databases in real-time or 
   almost real-time. 
   - Connect to a range of ERP and financial systems such as Oracle Apps, 
   SAP, Navision, Dynamics etc. 
   - Supported on a large range of mobile devices running in Native or 
   HTML5 mode.

Unlike most competing products, MobiForms offers a total solution for a 
once off licence fee without any of the traditional constraints.

For more information about the MobiForms Developer please go to: 
*http://www.mobiforms.com* .

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

2014-12-22 Thread jtoolsdev
I ran into a similar problem but it turned out that just using "Organize 
Imports" on each of those files did the trick.  And doing so just 
eliminated the .R reference altogether in each file.  Then it built.  Isn't 
changing development environments fun!

On Thursday, December 18, 2014 9:59:58 PM UTC-8, Nathan wrote:
>
> Okay, well maybe the rest of you have been able to just push a button and 
> your projects build in Android Studio instead of Eclipse. Hasn't happened 
> for me. 
>
> I think I'm having an extra amount of trouble because I've used an Android 
> Library project, with two other projects that depend on it. 
> Android Studio doesn't seem to handle this well, at least not the same. 
>
> The latest problem is that the library can't have the same package name as 
> a project that includes it. That seems fair. 
>
> So I went into the manifest of the library files and changed
>
> *com.company.product*to
> com.company.product.library 
>
> Fine so far. 
>
> Of course I got a gazillion errors
>
> I couldn't find any way to do this in refactoring tool, so I went through 
> every single affected source file and 
> changed 
> *import com.company.product*.R;
> to 
> *import com.company.product*.library.R;
>
> I figured that would do the trick. 
> Nope. 
>
> I still have 103 errors stating. 
>
>
> * error: package R does not exist*Now I am not sure why R does not exist. 
> Won't they generate it in library projects?
>
> Nathan
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] the time between wifiManager.startscan() and the SCAN_RESULTS_AVAILABLE_ACTION intent received takes several hours

2014-12-22 Thread shiqun.shi


Hello, 

while developing an app, i found that on some devices, after invoking the 
wifiManager.startscan(), the SCAN_RESULTS_AVAILABLE_ACTION intent is received 
after several hours. And the continuously wifi scan lead the power consumption 
of my app goes up to the top 3. 

Any one knows why the wifi scan can't be done in seconds, does it have a 
timeout for app to set?


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/d/optout.