This week's book giveaway is in the Web Services forum.
We're giving away four copies of Microservices in Action and have Morgan Bruce & Paulo A. Pereira on-line!
See this thread for details.
Win a copy of Microservices in Action this week in the Web Services forum!

Andy Crowther

Ranch Hand
+ Follow
since May 17, 2017
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
5
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andy Crowther

Peter Rooke wrote:or to be a hooligan a KTM.



Hey!  😡

Yeah, to be fair, I can be a hooligan...  These days I just don't get the chance.  I'm barely out of second gear.
1 day ago
Everything looks to be okay when reading and writing the database internally.  How can I check this line is correct -

   
If I don't have root?  Can I use ADB to snoop round and check that is where the Huawei stores the app data?
3 weeks ago
If I use the Huawei, set a few things in the app, which then should save to a database, only so it can be exported (I'm, new to all this and this seemed an easy way to let me export and import) I then export and try and import that on my Android One device, it doesn't work.

In fact, I've uploaded the exported DB and it looks to be rather empty. This leads me to believe the issue is with Huawei using different internal storage and the problem is perhaps it never saves the database locally, so it can't export it.
3 weeks ago
I have a few different phones and I think this import works on them all, except my Huawei Mate 20 Pro.  Here is the code -







The logcat I get when I run this on my Huawei is -



I thought maybe Huawei have a weird file structure or something, but there are no errors about not finding the file, it just doesn't read the info from it like others do.

Any ideas?
3 weeks ago
Okay, so I needed to ask for permission at run time.  For anyone else with this problem, my code is now -



I will make a new thread for the reading database issue I think, as the thread title isn't really appropriate for that.
3 weeks ago
Correct.  In my code, I actually had the line you suggested already there, but commented out. I think I'd tried it before.
3 weeks ago
To confirm.  I get the same result.
3 weeks ago
Thanks, I'll try, but does that not try and make the directory twice?  From what I read, putting it right into the IF statement tried to make it and based the IF statement off the result?
3 weeks ago
Me again, I have an issue with backup manager, apparently on just one of my phones.  So I seem to have it set up correctly as I can get it to restore by manually triggering a restore, or it seems if I uninstall and install my app, it returns the data with it.  But, on my Huawei Mate 20 Pro, I get this error on the log cats -



Any ideas?
4 weeks ago
I'm having a problem with my backup and restore of a database in my Android App.

I have a few different problems.  The first is it won't create the directory, even though I have write permissions -



The logcat is -



Then, with a backed up database that works fine on other phones, the import wont work either -



The logcat looks like this -



So no errors.  It doesn't say it can't find or access the file, it just seems to ignore the contents of it?

Any ideas?
4 weeks ago
When you say with the wife, do you mean as a pillion? If so, I would lean towards comfort.
5 months ago
Awesome, thanks  I didn't know I wanted a cow until I got one
It turns out that Google wont allow authentication in a webview, which is what iOS used when you add to home screen.  This means it opens Safari, which can't pass the authentication info back into the webview, so I think I'm stuck with just using it as a website, not a webapp  (Well, until maybe iOS make some changes)
Hi, I've tried to set my 'site' up as a mobile web app.  I've got bits in the header like this -



And I've tried various solutions in JavaScript to stop it going out to a browser when a link is pressed. At the moment, it's this -



That generally works, except the login page, Google's login, which even as a standard link on my iPad, opens Safari. When I login with Google in Safari, the webapp still sits waiting to be logged in...

If I do everything through Safari, it all works fine.

Does that make sense?  Does anyone have any tips to keep everything in the webapp?  On Android it all works fine within the webapp.
The first message seems quite a nice one to me. Surprised it upset you so much?

The second is clearly an automated message based on the system they use.  A site of that size can't me manually moderated.

How do you know you were the only one to receive a warning message?  I know at work if we discipline someone, we certainly don't go telling everyone else...  but often people say 'why am I the only one!' when ofcouse everyone is being dealt with.

I do agree this is a great place to ask questions though.  SO is massive, so you would get a quicker answer, but many people doing the answering have some sort of superiority complex, hence the down voting if you've done something slightly wrong

Use SO for reference, use here for questions
10 months ago