I have created an Android application in which it is able to read files from the Google Drive Hidden AppData folder and react based on whether specific filenames are present.
I have created a separate external interface that creates a file in this folder and it seems to do it successfully.
The problem I have is that I can't seem to find a work around for having my android application constantly listening/receiving updates from the appdata folder.
The odd thing is, is that sometimes the application will pick up the file change straight away but other times it can take hours.
I'm convinced that Google's 'OnChangeSubscription' method they provide in the developer documentation doesn't actually work.
Any suggestions on methods I could try/where people have been successful at this would be great as I have been at it for weeks and it's the final thing I have left to do.
Related
I'm having a problem with my users (Android). They delete the app, and their data is gone. They expect it not to be.
Browsing my phone, I see a lot of apps put a folder right off of /internal shared storage. I.E. I click on internal shared storage and there's a bunch of folders for various apps with data in them that doesn't go away if I uninstall the app.
This is what my customers want. This is what will stop them from writing me and accusing me of destroying their data.
How do I get a path to that folder, and what permission do I need to write there?
First off, deleting when the app is gone is how Android works. Anything else is a bug that you should expect to see fixed.
Secondly, you can't put anything right in / anymore. There was a time you could, but that's long since gone.
Third, have you looked into Android Data Backup? https://developer.android.com/guide/topics/data/backup This will work even on a new device, so its a better path forward anyway
I have been searching a lot for the best practice for my problem and didn't find anything useful so far.
My problem is:
I have platform that create E-commerce apps for the user and than we publish it for the users on the play store.
NOTE: each app have different name and maybe different google account.
Every time there's bug fix or new feature, we need to copy paste the same code in every project and then upload them again to the store.
My question is:
Is there's smarter way to deal with this ? i mean what if we have 100 app of the same project, that will be pain to update the code in all of them and than upload all APK's again.
Maybe there's way to update the classes and content dynamic ? or even some tool that can organize the whole thing or manage uploading the APK's ?
Thanks in advance.
You don't need to copy paste the same code in every project and you don't even need different google account.There is a process called white labelling apps in which you can manage unlimited apk from a single project. Just add all the clients in product flavours in gradle file with different application id. Follow the link attached for detailed procedure of white labelling
https://proandroiddev.com/advanced-android-flavors-part-1-building-white-label-apps-on-android-ade16af23bcf
I have an app that has an activity which allow users to download PDF files by selecting a PDF and clicking the download button.
The issue is: I don't want to always ask users to update the app when there's a new material available.
Is there a way I can update the .java code without always asking users to update the app?
Wrong design point.
You have probably hardcoded the PDF / file names in your Java application.
When these values are supposed to change, then well: don't hardcode them.
Instead you create a server side service that lists the available PDFs. And then your app uses that service in order to acquire that information.
Anything that is "dynamic" must not be hardcoded in your app itself. Instead your app knows how to fetch that piece of information from somewhere.
When the source code of your application changes, your users have to upgrade the app. It is that simple. The other way round: if you know about "changes" to your app that need to work without upgrading the app, then well: you have to design the whole app around that requirement.
A first starting point / further reading: see here.
Google Play Developer Program Policies says:
An app downloaded from Google Play may not modify, replace or update
its own APK binary code using any method other than Google Play's
update mechanism.
I want to publish my application to Google Play. And I been planing to load my core SWF file dynamically, so game updates could be done without the need of going to Google Play market. An alternative Java implementation can achieve the same thing by downloading remote jar file.
In both cases I will have the next limitations:
I cannot modify my Manifest file.
I cannot extend the application permissions that I asked
My external code is bounded to application sand box(Just as the rest of my application)
Notice that my external code is not part of the APK files. It will be stored in application folder or in external storage(SD-Card). Its same place where external assets is stored.
Does this violatating Google policy? I am not sure what they meant by "APK binary code".
I am not a lawyer, and I don't play one on TV...
Your best course of action is to look at the reason they included that phrase in the first place. That text now exists in the Google Play policy because Facebook did the very same thing that you are describing in their application (providing an auto-update mechanism outside the Play Store) earlier this year, and Google threatened banning the application until this "feature" was removed (which it was, shortly thereafter).
The spirit of the law in this case is that Google does not want applications updating themselves without the user's consent outside of the Play Store...period. If your application does this, you can bet Google won't care how you are doing it and will likely remove the application when and if the feature is discovered. They won't care how closely executable code in an external SWF file resembles the internal classes of the APK.
Legal language like this is is intentionally vague so companies can apply it in any situation they see fit. Don't think you're being safe by splitting hairs with the terminology.
I am not a lawyer. I see this restriction as limiting only the apk binaries. There are many apps that have dynamic behavior changes, for example Google search where the search results algorithm is determined by dynamic code on the server, or facebook which loads new images texts, layouts and more.
I think that as long as you do not do anything bad for users using the swf changes, you should be ok.
The purpose of this clause, as I understand it, is to prevent apps from loading and using code that was not tested by Google using the normal process that tests apps when published. Google want to ensure that all code is scanned/tested by their bots.
From what I know, you can't get the exact number of users which downloaded your app, unless you're connected to your Google plus account. Is that true? (I haven't yet got a google play (android market) account, my app isn't yet up on the market, so i just wanna make sure i'm saying valid things here.)
Is there any way i could programmatically get the number of downloads, preferably in real time?
From what I've found, there isn't an API for the market which let's me do this. So how can this be accomplished?
I need to take that value and in real time update a graph on my website and blog.
Can anyone come up with a workaround for this? One thing i was thinking of was: to either make a Firefox extension which on my home machine, automatically connects to my Google plus account, takes the required value and updates the page via ftp or something, or instead of Firefox extension i could use PHP locally to do the parsing and whatnot. But i'd need to keep my home machine always on, which i don't really want to.
Any other ideas? I really need that exact value, and i need it to be automated :)
When the user downloads the app, you could have it do a callback to a script on your site that does a tally for you. The app should, obviously, only call this on the first run (but, depending on how you implemented it, would probably be called on each refresh of the app's cache/data). If you don't have a service that needs registration, you could have it done in the background.
Not possible by default. The only figures that do exist are only updated daily at most.
You would need to devise your own way to count downloads such as requiring your users to register on your own service.