Facebook Android SSO weird Error - android

I made a previous post and I fixed the issue in that problem but I get something weirder now. So I'm following http://developers.facebook.com/docs/mobile/Android/build/#register and everything goes fine until I actually start my app. Instead of getting an app log in page, I get this:
http://imgur.com/DHpde
I have no clue why it won't go to the app log-in page like it does for everyone else. The only thing that perhaps might be different is that I had to remove the "#Override" notations for the Facebook.authorize method call.
#Override
public void onComplete(Bundle values) {
// TODO Auto-generated method stub
}
#Override
public void onFacebookError(FacebookError e) {
// TODO Auto-generated method stub
}
#Override
public void onError(DialogError e) {
// TODO Auto-generated method stub
}
#Override
public void onCancel() {
// TODO Auto-generated method stub

See this surely you will solve your error
you need to install an extension, similar to the core Android SDK, but no, here is what you need to do:
1.) go to github.com/facebook/facebook-android-sdk
2.) download the facebook directory ONLY! The other directories are only examples.
3.) Put the files from the src (you can copy the drawables too, if you want to) in the package, you are currently working with
4.) You are good to go, you can use the facebook "SDK"
see also this example https://github.com/facebook/facebook-android-sdk/tree/master/examples/Hackbook download it , it is working example provided by facebook

Related

The IMqttClient class does not provide any mean to specify the client ID?

This class IMqttClient() allows you to create a client object with a callback to all possible events to happen, for an example
#Override
public void subscribe(String arg0) throws MqttException, MqttSecurityException {
// TODO Auto-generated method stub
}
#Override
public void setCallback(MqttCallback arg0) {
// TODO Auto-generated method stub
}
#Override
public void publish(String arg0, byte[] arg1, int arg2, boolean arg3) throws MqttException, MqttPersistenceException {
// TODO Auto-generated method stub
}
But this class does not allow you to specify an ID for each client. How that is possible? especially if you want to connect with clean session = false?
Also, i have checked the class MqttConnectOptions when you instantiate an object you can set the server URI as an option and later you can do something like that client.connect(opts), but there is no way to specify the ID.
Paho Library provides an option to give the client Id in constructor itself while creating the object of Mqttclient:
Here is the syntax:
mClient = new MqttClient(Constant.serverLink, Constant.client_id, null);
You can provide the client over there.
Hope this helps you out!
If you're using the libraries from com.ibm.mqtt.IMqttClient, you specify the clientId when you connect:
mqttClient.connect(clientId, cleanStart, keepAliveSeconds);
For more information, please refer to this documentation: http://public.dhe.ibm.com/software/dw/webservices/ws-mqtt/mqtt-v3r1.html
If you're using another library, read the documentation. They will definitely allow you to specify a clientId. It would be quite useless not to have one since you wouldn't be able to do anything other than broadcasting without it.

linphonecore.setPlayLevel() does nothing?

I'm using the linphone sip library to build an android voip app. I see a function called LinphoneCore.setPlayLevel() but i'm not sure what it does. I tried using it but it seems to have no effect.
Does anyone know what it does?
OK, so both setPlayLevel() and getPlayLevel() do absolutely nothing.
I took a look at the core code file submodules/linphone/java/impl/org/linphone/core/LinphoneCoreImpl.java only to find these placeholder function that do nothing and return nothing useful.
public int getPlayLevel() {
// TODO Auto-generated method stub
return 0;
}
public void setPlayLevel(int level) {
// TODO Auto-generated method stub
}
linphone team should update their api documentation and say these functions are deprecated

How to use Flury?

I wish to get a bit more detailed statistic about my app instead of standart google statistic. I was advised to use flury. However I dont see tutorial how to integrate it to my app or use it. Can any one explain or give a link to tutorials?
Flurry works with an ID to open a session an retrieve infos. I'm using it and it's quite simple to use.
1 - Head to flurry.com and register your app, which will generate a unique tracking code.
2 - Download and add the FlurryAgent jar to your project libraries. If you're using Eclipse, right-click your project folder, select properties, select Java Build Path, and choose Add External JARs...
3 - Add android.permission.INTERNET to your AndroidManifest.xml.
4 - Add a call to the Flurry agent from the onStart() and onStop() methods of your activities.
Note: replace the ID below with your unique tracking code.
public void onStart()
{
super.onStart();
FlurryAgent.onStartSession(this, "9GKQD4EBX123FEP6874H");
// your code
}
public void onStop()
{
super.onStop();
FlurryAgent.onEndSession(this);
// your code
}
See the answer here
1st you need to download Flurry agent.jar
and add this to your lib folder after that
do the following in following methods
private void getFlurryEvents()
{
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("Title of page", "Your page Title" );
FlurryAgent.logEvent("View Page",parameters);
}
#Override
protected void onStart() {
// TODO Auto-generated method stub
super.onStart();
FlurryAgent.onStartSession(this, Constants.FLURRY_API_KEY);
}
#Override
protected void onStop() {
// TODO Auto-generated method stub
super.onStop();
//FlurryAgent.onEndSession(this);
}
in onstart method strt the Session and in on stop stop the session and in oncreate add the method getFlurry agent
and get your API key from flurry

+1 click is not working in Android integration with Google+

I followed this link to use the +1 button in my Android application to +1 a link or a website, but unfortunately it didn't work as expected and it didn't respond when I click on it. I tried to use the following:
mPlusOneButton.setOnPlusOneClickListener(new OnPlusOneClickListener() {
#Override
public void onPlusOneClick(Intent arg0) {
// TODO Auto-generated method stub
startActivityForResult(arg0, 0);
}
});
But also no response. As an example I tried to use the following line of code:
mPlusOneButton.initialize(plusClient, "http://www.googleplustoday.net", PLUS_ONE_REQUEST_CODE);
And there is no effect on my Google plus profile at the +1 tab.
Who can help? Thanks in advance.
Make sure to be connected to Google Plus:
mPlusOneButton.setOnPlusOneClickListener(new OnPlusOneClickListener() {
#Override
public void onPlusOneClick(Intent intent) {
if(!plusClient.isConnected()) {
plusClient.connect();
} else {
startActivityForResult(intent, 0);
}
}
}
Be sure that you initialize your mPlusOneButton prior to handling clicks such as in the onResume method. When I tested by not initializing before the click then I could get it to fail.
In the androidsdk/extras/google/google_play_services/samples/plus/src/com/google/android/gms/samples/plus/PlusOneActivity.java contains a skeleton activity for getting the PlusOne button working.
If you can post your full activity code and any applicable errors from logcat that would help further identify the issue.

Does Adwhirl supports Smaato on Android Platform?

I had recently implemented ads for my android game app. Through AdWhirl, I have integrated Admob and Millennial Media. Now, I am looking for the possibility to integrate ads Smaato through Adwhirl as I have integrated Admob & Millennial Media.
The AdWhirl SDK which I have downloaded does not have any adapter class for Smaato so far. I also want to know whether it is possible to write adapter class for Smaato & integrate with Adwhirl SDK?
Thanks in advance.
Regards,
Atul Prakash Singh
We have build such an adapter for iOS but not for Android yet. It should be possible to write it for Android as well.
Regards
Michael
Smaato Inc.
You have to write function for Custom event on top hierarchy.
This is a sample code :satrt_SUMO
May it helps you.
public class XXXX extends Activity implements AdWhirlInterface {
SOMABanner mBanner;<br>
AdWhirlLayout MAdWhirlLayout;
......
#Override
public void adWhirlGeneric() {
// TODO Auto-generated method stub
}
com.smaato.SOMA.AdListener adls=new com.smaato.SOMA.AdListener(){
#Override
public void onFailedToReceiveAd(AdDownloader arg0, ErrorCode arg1) {
// TODO Auto-generated method stub
//AdWhirl will now load from another ad network you have added
mBanner.setAutoRefresh(false);
mBanner.removeAdListener(adls);
MAdWhirlLayout.rollover();
}
#Override
public void onReceiveAd(AdDownloader arg0, SOMAReceivedBanner arg1) {
// TODO Auto-generated method stub
Log.v("SUMO Listener", "Ad Received.");
//AdWhirl will wait for 30 seconds or so before it will start requesting ad
mBanner.setAutoRefresh(false);
mBanner.removeAdListener(adls);
MAdWhirlLayout.adWhirlManager.resetRollover();
MAdWhirlLayout.rotateThreadedDelayed();
}
};
public void start_SUMO() {
mBanner= new SOMABanner(this);
mBanner.setPublisherId(**your publisher ID**);
mBanner.setAdSpaceId(**your space ID**);
mBanner.asyncLoadNewBanner();
mBanner.setAutoRefresh(true);
mBanner.addAdListener(adls);
MAdWhirlLayout.pushSubView(mBanner);
}
.....

Categories

Resources