cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@chromium.org>
Subject Re: Thoughts on CB-7827
Date Mon, 23 Feb 2015 18:08:16 GMT
Thanks for taking this on! Left a comment on each, but generally looks good
to me!

On Sun, Feb 22, 2015 at 4:12 PM, Connor Pearson <cjp822@gmail.com> wrote:

> I've opened two pull requests for this issue:
>
> https://github.com/apache/cordova-lib/pull/171
> https://github.com/apache/cordova-android/pull/160
>
> On Tue, Feb 17, 2015 at 10:32 AM, Andrew Grieve <agrieve@chromium.org>
> wrote:
>
> > There's also:
> >   android-minSdkVersion
> >   android-maxSdkVersion
> >   android-targetSdkVersion
> >
> > which *are* <preference>s, so we're not getting any gold stars for
> > consistency. So long as there is some way though, I doubt it matters
> much.
> > People will just copy & paste what they need so that it works.
> >
> >
> >
> > On Fri, Feb 13, 2015 at 8:15 PM, Chuck Lantz <clantz@microsoft.com>
> wrote:
> >
> > > Actually that is an interesting point.  Are we starting to add platform
> > > specific attributes / elements into config.xml?  Most of these were
> done
> > as
> > > preferences historically.
> > >
> > > (BTW - Makes sense to add it, more raising the question as a topic
> about
> > > format to help inform other PRs along these lines.)
> > > ________________________________________
> > > From: agrieve@google.com <agrieve@google.com> on behalf of Andrew
> > Grieve <
> > > agrieve@chromium.org>
> > > Sent: Friday, February 13, 2015 6:56 PM
> > > To: dev
> > > Subject: Re: Thoughts on CB-7827
> > >
> > > There's already <widget android-versionCode="" android-packageName=""
> />
> > >
> > > So... how about adding support for:
> > >   <widget android-activityClassName="MyClass">
> > > and:
> > >   <widget android-activityClassName="com.foo.MyClass">
> > >
> > >
> > > On Fri, Feb 13, 2015 at 4:12 PM, Tommy Williams <tommy@devgeeks.org>
> > > wrote:
> > >
> > > > I apologise for how anglo-chauvanist my response was. I guess I
> didn't
> > > > really understand CB-6511... This isn't a bug that just affects some
> > > > external group of developers, It caused quite a bit of trouble for me
> > > > personally in my day job. I have had to revert to a lesser version of
> > > > Cordova until something is worked out after spending a great deal of
> > time
> > > > trying to figure out what was going wrong.
> > > >
> > > > Are you saying that the inability to create apps with a display name
> in
> > > > these languages has been an issue for Cordova/PhoneGap's entire
> history
> > > > until a few months ago? Yikes.
> > > >
> > > > Either way, please don't put the onus on developers to have to
> remember
> > > to
> > > > name their app every time they run platform add. Particularly if we
> > were
> > > > working towards a day when platforms are a build artifact.
> > > >
> > > > I know we talk a lot about having too much config, but perhaps if the
> > > issue
> > > > was around for all apps prior to a few months ago, it should default
> to
> > > the
> > > > way it was previously... and have display name configurable in some
> > way?
> > > >
> > > > It feels backwards to favour new apps over existing. I hesitate to
> > bring
> > > up
> > > > the past since it has gotten soooo much better, but there was
> > certainly a
> > > > time when Cordova constantly changed in ways that caused a great deal
> > of
> > > > frustration when trying to maintain an existing app.
> > > >  On 14 Feb 2015 7:08 am, "Andrew Grieve" <agrieve@chromium.org>
> wrote:
> > > >
> > > > > Hmm, for cloud builders, it's also important that it show up in
> > > > config.xml.
> > > > > You've won me over. :)
> > > > >
> > > > > On Fri, Feb 13, 2015 at 2:48 PM, Connor Pearson <cjp822@gmail.com>
> > > > wrote:
> > > > >
> > > > > > I'd prefer the activity name to be saved somewhere rather than
> > > relying
> > > > on
> > > > > > adding the option each time. I'm also not sure how the flag
would
> > > work
> > > > > with
> > > > > > the auto save/restore of platforms.
> > > > > >
> > > > > > There really shouldn't be any reason change the activity name.
I
> > > think
> > > > > the
> > > > > > app name is more likely to change and that also requires renaming
> > > > files.
> > > > > >
> > > > > > On Fri, Feb 13, 2015 at 12:33 PM, Andrew Grieve <
> > > agrieve@chromium.org>
> > > > > > wrote:
> > > > > >
> > > > > > > Right. I'm suggesting adding the flag to "cordova platform
add"
> > > > > > >
> > > > > > > On Fri, Feb 13, 2015 at 11:46 AM, Connor Pearson <
> > cjp822@gmail.com
> > > >
> > > > > > wrote:
> > > > > > >
> > > > > > > > I think it would have to be more than a flag to the
create
> > > command.
> > > > > > > >
> > > > > > > > The use case I'm thinking of is an existing project
that
> > doesn't
> > > > have
> > > > > > the
> > > > > > > > platforms folder checked into source control. A developer
> > checks
> > > > out
> > > > > > the
> > > > > > > > project then runs cordova platform add for any of
the
> platforms
> > > > they
> > > > > > want
> > > > > > > > to build for. In that case would they have to add
the
> activity
> > > name
> > > > > > flag
> > > > > > > to
> > > > > > > > the platform add command? Or would the flag be set
somewhere
> > > else?
> > > > > > > >
> > > > > > > > I apologize if I'm misunderstanding something. I'm
not too
> > > familiar
> > > > > > with
> > > > > > > > cordova's internals.
> > > > > > > >
> > > > > > > > On Fri, Feb 13, 2015 at 10:45 AM, Chuck Lantz <
> > > > clantz@microsoft.com>
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Yeah - The PRs were closed and not merged based
on this
> > thread:
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://callback.markmail.org/message/vx5zklk57uic3iig?q=list:org%2Eapache%2Eincubator%2Ecallback-dev+New+project+%3CPATH%3E+vs%2E+%3CNAME%3E+order:date-backward
> > > > > > > > >
> > > > > > > > > Basically the feature was deferred at the time.
> > > > > > > > >
> > > > > > > > > -Chuck
> > > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: agrieve@google.com [mailto:agrieve@google.com]
On
> > Behalf
> > > > Of
> > > > > > > Andrew
> > > > > > > > > Grieve
> > > > > > > > > Sent: Friday, February 13, 2015 7:32 AM
> > > > > > > > > To: dev
> > > > > > > > > Subject: Re: Thoughts on CB-7827
> > > > > > > > >
> > > > > > > > > All of those PRs are closed...
> > > > > > > > >
> > > > > > > > > Thanks for pointing out that article. Makes it
quite clear
> > that
> > > > > this
> > > > > > > is a
> > > > > > > > > thing we need to support.
> > > > > > > > >
> > > > > > > > > The android:name is necessitates that a .java
file be
> renamed
> > > > when
> > > > > it
> > > > > > > > > changes, so I don't think it should be a part
of config.xml
> > > > > (annoying
> > > > > > > to
> > > > > > > > > have to move files. esp. when version control
is a thing).
> > So a
> > > > > flag
> > > > > > to
> > > > > > > > > create makes the most sense to me.
> > > > > > > > >
> > > > > > > > > AFICT though, it should be fine that all new
apps have a
> > > > hard-coded
> > > > > > > > > android:name. Only existing apps should need
to use the
> flag.
> > > > > > > > >
> > > > > > > > > On Fri, Feb 13, 2015 at 10:15 AM, Chuck Lantz
<
> > > > > clantz@microsoft.com>
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Forgot to mention - The fix we talked about
was the
> ability
> > > to
> > > > > set
> > > > > > > > > > "project name" independent of the display
name (really
> for
> > > any
> > > > > > > > platform).
> > > > > > > > > > iOS actually suffers from some of these
same issues but
> > > unlike
> > > > > Java
> > > > > > > > > > can handle Unicode characters in filenames.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > >
> > > >
> http://callback.markmail.org/thread/2iaojpftpggrmcj6#query:+page:1+mid
> > > > > > > > > > :rhpz6a4hvx5ltngp+state:results
> > > > > > > > > >
> > > > > > > > > > Vladimir actually did a series of PRs for
this to add a
> > > > parameter
> > > > > > to
> > > > > > > > > > create: https://issues.apache.org/jira/browse/CB-7231
> > > > > > > > > >
> > > > > > > > > > I don't beleave this is in cordova-android
main at the
> > > moment,
> > > > > > > however.
> > > > > > > > > > Perhaps this may be the time to merge it
in.
> > > > > > > > > >
> > > > > > > > > > -Chuck
> > > > > > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Chuck Lantz [mailto:clantz@microsoft.com]
> > > > > > > > > > Sent: Friday, February 13, 2015 6:57 AM
> > > > > > > > > > To: dev@cordova.apache.org
> > > > > > > > > > Subject: RE: Thoughts on CB-7827
> > > > > > > > > >
> > > > > > > > > > To be clear, CB-6511 fixes app names that
are non-English
> > > which
> > > > > is
> > > > > > > > > > clearly not an edge case. For example, previous
to this
> > > change
> > > > it
> > > > > > was
> > > > > > > > > > impossible to build an app for Android with
a Chinese
> > display
> > > > > name.
> > > > > > > > > > You'll note Cordova documentation is available
in
> Chinese.
> > > > > > > > > >
> > > > > > > > > > -Chuck
> > > > > > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Tommy Williams [mailto:tommy@devgeeks.org]
> > > > > > > > > > Sent: Friday, February 13, 2015 6:04 AM
> > > > > > > > > > To: dev@cordova.apache.org
> > > > > > > > > > Subject: Re: Thoughts on CB-7827
> > > > > > > > > >
> > > > > > > > > > Please someone fix this somehow :(
> > > > > > > > > >
> > > > > > > > > > Is CB-6511 really important enough to cause
this? It
> feels
> > > like
> > > > > an
> > > > > > > > > > edge case caused an issue for the majority.
> > > > > > > > > >
> > > > > > > > > > - tommy
> > > > > > > > > > On 14 Feb 2015 12:32 am, "Connor Pearson"
<
> > cjp822@gmail.com>
> > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > Hi all,
> > > > > > > > > > >
> > > > > > > > > > > I'm wondering what the status of CB-7827
is. It causes
> > the
> > > > APK
> > > > > > and
> > > > > > > > > > > activity name to be set to a hardcoded
value. It's been
> > > open
> > > > > > since
> > > > > > > > > > > October and has more votes and watchers
than any other
> > > > Cordova
> > > > > > bug.
> > > > > > > > > > >
> > > > > > > > > > > According to the Android documentation
(
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > >
> > > http://android-developers.blogspot.com/2011/06/things-that-cannot-ch
> > > > > > > > > > > an
> > > > > > > > > > > ge.html
> > > > > > > > > > > ),
> > > > > > > > > > > you should never change the android:name
attribute. So
> > > > > developers
> > > > > > > > > > > working on an already published app
must perform a
> manual
> > > fix
> > > > > of
> > > > > > > > > > > several files every time the android
platform is added.
> > > > > > > > > > >
> > > > > > > > > > > The root cause of the issue is Cordova
now hardcodes
> the
> > > main
> > > > > > > > > > > activity name as CordovaApp (or MainActivity).
This was
> > > done
> > > > to
> > > > > > fix
> > > > > > > > > > > CB-6511. I have a couple of ideas for
fixing this bug
> > > without
> > > > > > > > > regressing CB-6511:
> > > > > > > > > > >
> > > > > > > > > > > - Use the project name as the activity
name then fall
> > back
> > > to
> > > > > the
> > > > > > > > > > > hardcoded name if the project name
uses 16 bit
> > characters.
> > > > > > > > > > >
> > > > > > > > > > > - Allow the user to specify android-activityName
in
> > > > config.xml.
> > > > > > > > > > > Similar to android-versionCode.
> > > > > > > > > > >
> > > > > > > > > > > - Another option could be to combine
the two,
> attempting
> > to
> > > > use
> > > > > > > > > > > android-activityName first then falling
back to the
> > project
> > > > > name
> > > > > > > > > > > then finally falling back the hardcoded
name.
> > > > > > > > > > >
> > > > > > > > > > > Do you think any of these ideas are
worth pursuing? I'd
> > be
> > > > > > willing
> > > > > > > > > > > to work on a pull request, but I want
to make sure I'm
> > > going
> > > > in
> > > > > > the
> > > > > > > > > > > right direction.
> > > > > > > > > > >
> > > > > > > > > > > Thanks,
> > > > > > > > > > > Connor
> > > > > > > > > > >
> > > > > > > > > >  B
> > > > > > > >
> > > > >
> > KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB
> > > > > > > > > >   [  X  ܚX K  K[XZ[
> > > > > > > > > >    ] ][  X  ܚX P  ܙ ݘK \ X  K ܙ B  ܈
Y  ] [ۘ[    [X[
> > >  K[XZ[
> > > > > > > > > >    ] Z [    ܙ ݘK \ X  K ܙ B
> > > > > > > > > >
> > > > > > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> dev-unsubscribe@cordova.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > dev-help@cordova.apache.org
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> > > > > > > > > For additional commands, e-mail:
> dev-help@cordova.apache.org
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> > > For additional commands, e-mail: dev-help@cordova.apache.org
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message