This week's book giveaway is in the Spring forum.
We're giving away four copies of Java Persistence with Spring Data and Hibernate and have Cătălin Tudose on-line!
See this thread for details.
Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

App upgrade process now broken

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I made an Activity that first checks the installed version of the app, checks what the newest version of the app is by doing an HTTP request to a webserver, and offers an upgrade if a newer version is available. When the "upgrade" button is clicked, it used to download the file, then initiate the installation process, but it's not initiating the installation of the apk anymore.

Another thing is that I used to have an older Android phone, and recently got a new phone. The new phone has Android 7.0 on it. That could be the reason, but I don't know.

If anyone can help I'd appreciate it.

 
Oscar Blank
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, I may have found the solution, and it has to to with Android N changing what's allowed to be done with files:

In AndroidManifest.xml



Create file in res/xml/provider_paths.xml



And the contents of the BroadcastReceiver changes



Thing is, I don't really know what I'm doing here, and being that I have a lot of non-Android experience, I'm wondering there are some problems with this.
 
Oscar Blank
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And more changes to the broadcast receiver once I realized that there needed to be two different ways of completing the task based on the version of Android:

 
Being a smart alec beats the alternative. This tiny ad knows what I'm talking about:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic