I'm using Titanium's facebook module to show a apprequests dialog. I could send application request and when I get into the facebook app and hit the notification, I could get into my app.
But, how do I process the incoming URL? I went through the link Deep link with requests
that shows how to do it with Objective C. Any help on how to implement it with Titanium Studio would be appreciated. Thanks.
You can get the arguments with this snippet :
var cmd = Ti.App.getArguments();
if ( (getTypeOf(cmd) == 'object') && cmd.hasOwnProperty('url') ) {
Ti.App.launchURL = cmd.url;
Ti.API.info( 'Launched with url = ' + Ti.App.launchURL );
}
this is called the URLScheme, if you are looking for online docs!
Source: http://developer.appcelerator.com/question/120393/custom-url-scheme---iphone--android
Related
I am integrating dynamic links from Firebase into my iOS app to reward new users with bonus points. In order to reward them I track the sender of the link and currently I am testing 2 scenarios:
First is when I open the Firebase dynamic link and I have the app locally installed on the iPhone. This case works perfectly fine, because the link is just redirecting me to the app and successfully prints the sender's UUID.
The second is when the app is not installed and the user has to download it from AppStore. In this case the link redirects the user to AppStore and when the app is successfully installed, I want to print the UUID of the sender. Unfortunately this is not possible due to the fact that WebFilter is blocking the Link which results to no information about the sender's UUID. In order to resolve the issue, the user has to click again on the link which trigers Scenario 1. But there is no point of using a dynamic links if we have to click twice.
Error message:
2021-02-15 23:56:56.453607+0100 Universal-Link-SwiftUI2.0[78267:19937175] 7.5.0 -
[GoogleUtilities/AppDelegateSwizzler][I-SWZ001014] App Delegate does not conform to
UIApplicationDelegate protocol.
2021-02-15 23:56:57.257019+0100 Universal-Link-SwiftUI2.0[78267:19936907] WF: === Starting
WebFilter logging for process Universal-Link-SwiftUI2.0
2021-02-15 23:56:57.257243+0100 Universal-Link-SwiftUI2.0[78267:19936907] WF:
_userSettingsForUser mobile: {
filterBlacklist = (
);
filterWhitelist = (
);
restrictWeb = 1;
useContentFilter = 0;
useContentFilterOverrides = 0;
whitelistEnabled = 0;
}
2021-02-15 23:56:57.257438+0100 Universal-Link-SwiftUI2.0[78267:19936907] WF:
_WebFilterIsActive returning: NO
My dynamic link object has no url
I found out this question: How to fix xcode bug "web filter is active"?
The problem is that I am sure that the link is HTTPS, so it must be something else whcih I can not find out.
I am also allowing the ATS to load everything:
and associated domains:
But it is still not loading. Any help will be very appreciated.
My full link is: https://makeitso.page.link/?link=https://www.example.com/data?hello%3Dworld%26foo%3Dbar&isi=1312965045&ibi=com.IVANDOSE.ToDoFirebase&st=It+is+apple+pie+time&sd=Get+25%C2%A3+now&si=https://upload.wikimedia.org/wikipedia/commons/1/17/Official_car_of_the_Chief_Minister_of_Gibraltar.jpeg
So I've been trying to find an API to integrate PayPal Payment into my Codename One App, except that I didn't find enough documentation to use the Purchase builtin feature. So I tried to use a WebView of a page hosted on my server and implemented using the paypal "checkout.js" Api.
When I load the page into Chrome, it works perfectly and the transaction is complete. But when I load it using the codename one BrowserComponent it gets stuck (See screenshot). What is the root of this problem ? Is it the fact that the browser does not support popus ? and Is there a way to fix it ?
Button payButton = new Button("Checkout");
payButton.addActionListener((ActionEvent evt) -> {
Form payForm = new Form("Payment", new BorderLayout());
WebBrowser webBrowser = new WebBrowser("http://localhost/paymentserver/web/app_dev.php/payerParticipation/5");
payForm.add(BorderLayout.CENTER, webBrowser);
payForm.show();
});
Screenshot
Try embedding firebug into the of your page to see if it reports any errors:
<script>
if (!document.getElementById('FirebugLite')){E = document['createElement' + 'NS'] && document.documentElement.namespaceURI;E = E ? document'createElement' + 'NS' : document'createElement';E'setAttribute';E'setAttribute';E'setAttribute';(document'getElementsByTagName'[0] || document'getElementsByTagName'[0]).appendChild(E);E = new Image;E'setAttribute';}
</script>
Thanks for the help everybody,
I finally found a turnaround and implemented this feature on a PHP server using PayPal PHP SDK. I used the browser Navigation Callback in order to check when the payment was successful/failed.
browser.setNavigationCallback((url)->{
if (url.indexOf("success=true")!=-1){
System.out.println("Payment complete");
}
else if (url.indexOf("success=false")!=-1){
System.out.println("Payment failed");
}
return true;
});
I don't have an answer for that but I did implement Braintree support for Codename One which is the official PayPal mobile API. I have a cn1lib for it implemented but I didn't get around to publishing it because of the bootcamp. Keep an eye on the blog I'll probably publish it in the next couple of weeks.
I need a web and mobile application which will work on android, iphone and windows as well.
I want to use facebook login for my apps and customer can like my page after login thats why i am using cordova to convert my web app into android app but i need to integrate facebook-like option which i didn't get in plugin.
So i implemented this using oglike
$scope.facebookLike = function() {
if($localStorage.hasOwnProperty("accessToken") === true) {
$http.post("https://graph.facebook.com/me/og.likes?access_token="+$localStorage.accessToken+"&object=https://www.facebook.com/Nxtlife-Technologies-Ltd-UK-180614345644169/?ref=br_rs");
alert("like sucessfully done");
} else {
alert("Not signed in");
$scope.facebookLogin();
}
}
Problem:
The code will not throwing any error but after success message it didin't make any changes to my page. like count is remains same.
og.likes is for Open Graph objects – external URLs, outside of Faceook.
You can not like Facebook pages by any other means than the official Like button.
I'm trying to add a link from email
that click on it will open the application in the relevant page.
I haven't found a solution for that yet.
If you do have any recommendation how to do that, i'll be glad to know.
Thanks.
This is the scenario :
user click forgot passowrd.
email is sent via server.
the email contains link for reset the password (this is what i need)
user click on the link an enter the reset password page on mobile application.
It's relevant to say that it should support All ionic platform (most important ios/ android)
I agree with #LiadLivnat in the past I used Custom-URL-scheme.
Here is a snippets of code:
Consider you have some run with reportAppLaunched method:
app.run(function($rootScope){
/* ... */
$rootScope.reportAppLaunched = function(url) {
$log.debug("App Launched Via Custom URL: " + url);
$rootScope.$apply(function() {
if (url.substring(0, 'mailto:'.length) === 'mailto:') {
$rootScope.navigateTo('forgot_password_view', {action: url});
}
});
};
}
Now this global function will be fired when, in my case, user opens contact list and clicks on some member. Android will ask with witch application you want to open this contact and you select . The method handleOpenURL is triggered and you can redirect to specific view in your application.
function handleOpenURL(url) {
var body = document.getElementsByTagName("body")[0];
var rootController = angular.element(body).scope();
rootController.reportAppLaunched(url);
}
Hope it will help,
I am working on a hybrid mobile app using ionic and cordova, In the app I am sharing pictures with comments in social media. I want to impliment "facebook feed" method to share pictures in facebook with custom comments.
I have tried ngCordova's Facebook plugin but I faced some Issues in that, where the issue ticket is still open in the plugin builder's github. So I removed this plugin.
I have seen ngOpenFB but there I have'nt found $openFB.ui() method for feed dialog.
I want to know that is there any plugin available by which I can impliment Facebook feed for image sharing in my app.
Thanks in advance.
Please have a look for your facebook integration in your hybrid app nicraboy
// Add to openfb.js and use it.
function ui(method,obj) {
var method = method || 'GET',
params = obj || {},
xhr = new XMLHttpRequest(),
url;
params['access_token'] = tokenStore.fbAccessToken;
params['redirect_uri'] = 'http://localhost:8100/#/tab/chats';
params['display'] = 'popup';
params['sdk'] = 'joey';
params['app_id'] = 'APP Id in Integer';
url = 'https://www.facebook.com/v2.6/dialog/' + method + '?' + toQueryString(params);
window.open(url, '_open', 'location=no,clearcache=no');
//window.open(url, '_self', 'location=no,clearcache=no');
}
Also have a look at this repo: https://github.com/srameshr/ionic-starter-oauth