Android: How to carry variable over different activities? - android-activity

First of all, I would like to say that I haven't found an article that answered my question.
I would like to do something(in no way is the following code) like, "if thisButtonIsPressed then thisVariable = 1" and carry that over to a different activity. Please tell me if I wasn't descriptive enough.
Edit: Please give me the code to do this.
Edit #2: I would appreciate it if someone told me another way to make a new page out of a lot(I'm making a page for each of the 118 elements!) without creating 118 activities.

You should use a Bundle.
Here you have some info on how to use it:
Passing Bundles Around Activities

Related

Setting up Dynamic Links in Firebase with Wordpress site

I am really struggling here... All I actually want to achieve is that I can get the Generate-Strong-Password function inside my app but that is actually harder than I thought.
I learned that I should go with Firebase Dynamic Links because I have a Wordpress-Website from All-Inkl.com.
I followed this Tutorial and there is actually an Apple-Site-Association-File at the moment. But I can't access my Website anymore as it looks like this:
Inside my Firebase Project I am getting this error which says that there not all the necessary "A-Files" are inside my Website:
My DNS-Settings:
I've been struggling for weeks now to get this done so if anyone has any idea how I can fix it I would be extremely grateful!! (btw, I am a total newbie when it comes to websites; I know my way around Swift though)
It seems that different domain providers accept different values for DNS entries ('A records' = 'A-Datensätze', in this case).
Try editing the entries for the Host field (which currently hold your website's URL) to one of the 'common inputs' listed here: https://firebase.google.com/docs/hosting/custom-domain?hl=de#domain-key
As the URL to your site doesn't seem to be what your provider accepts, I would suggest you try replacing it with the next option, i.e. replacing it with # .
Hope this helps solving your issue!

Concrete5 isEditMode()-like handler to get Information about active editing or publishing

So my question is if there is a Concrete 5 handler/listener instead of
isEditMode()
that tells if the user is in active Editing mode or if he just has published his Edit?
Something like
isPublished() or isEditModeActive()
Thx yall
thanks for your interest!
So i tried the Eventhandler in the way it is decumented in the second example:
1. i created site_events.php in the /config
2. i added
<?PHP Events::extendPageType('inhalt', 'on_page_version_approve');?>
i added to the site.php
define('ENABLE_APPLICATION_EVENTS', true);
on the reffered inhalt.php pagetype i added
function on_page_version_approve() {
echo "page published";
}
... nothing happens.
In the description it is written, that the refferring inhalt.php has to exist in /controllers. However, this is not the case. I actually dont quite understand the structure of the Eventhandling. It would be great if you could help me out there...
Thanks in advance anyways :)
It sounds like you want what concrete5 calls Events (http://www.concrete5.org/documentation/developers/system/events/).
As per the docs, you'll get the Page as arguments to the functions you register.
There is nothing quite as specific as what you're looking for, but:
For published, use on_page_version_approve.
For editing, try on_before_render. It's a bit generic (ie, it'll be getting called far more than you're interested), but you can do something like if ($page->getCollectionCheckedOutUserID()). You should experiment a bit with this, though. For example, if you check out the home page for editing, and then someone else loads the live version, the event will probably get called again, and the Page will probably show "checked out". But maybe you can check ->isEditMode(), which should check it against the logged in user...

Converting 'Current Location' Languages OR passing lon/lat

To whoever that can help,
My question comes from another topic # Open Maps app from Code - Where/How to find the "Current Location"?.
Did anyone successfully use the source code from martip # http://www.martip.net/blog/localized-current-location-string-for-iphone-apps with the ‘LocalizedCurrentLocation.zip’ file?
I've been trying but I'm not sure where I should place the example codes & how to 'call' the strings. I'm sorry for posting such newbie question but I have no where else to go~
I’ve been trying to work with it but I’m kinda lost. I’m not sure how to ‘call’ the localized string and use the ‘example usage’. I apologize for asking such a newbie question.
Please help me out here as I’m scratching my head over this matter. Anyone? Please~
Thanks in advance!^^
P/S: I'm actually trying to open iPhone maps from my app with directions from 'Current Location'. I know there are 2 ways of doing it; by CoreLocation (pass lon/lat) and replacing 'Current Location' with Strings BUT as I mention I'm a real beginner here and would appreciate it if anyone can advise & instruct me on which way is better & how to accomplish it. Btw, I'm using jquery and phonegap.
I have just completed the same task for current location. I came to know that, probably u also know that, we can't get current location in simulator. For just checking that is ur app working for location, u can add .gpx file and set ur current static location.
This is what I know...:)

Location or Alternatives for Zends getRequest()->isPost()

i was wondering about where Zends functionality comes from when inside of a controller i call
$this->getRequest()->isPost()
It works, but i do not find where this "isPost()" function comes from.
I just noticed it because i don't have intellisense for that.
Question is:
Is this merely some fallback function that "newbie users" use apart from a better alternative?
Or is it perfectly valid using it?
Thanks :)
It is the official way to go, you can use it. Check the source code of Zend_Controller_Request_Http::isPost() to see what it really is doing, if you'd like :)

JQT gotofunction problem

i am trying to use the goTo function to switch between different divs.
but in the function goTo(id,animation)
it is not going to that id.
Can anyone please help me with this problem.
Thanks,
Devan
This is difficult to diagnose without looking at your code. I have a few ideas, but it would be best if you were to share the problematic section of your code for others to investigate.
A few questions/ideas:
1) Check to ensure you have not used the same div ID more than once.
2) Have you been able to successfully use the goTo function at all?
3) Can you create a basic HTML page that uses this function successfully?
4) What version of jQTouch are you using? Does the goTo function work once, and then freeze every time afterwards? I reported a bug regarding this behavior a while ago. Not sure if it's been resolved yet, but you could see if an older version of jQTouch might help.
Again, without examples of your code... I'm taking wild guesses. Consider sharing the problematic section and someone might be able to pinpoint the issue.
Don't put animation, without animation worked for me...
eg..
jQT.goTo('#rest');