When there’s no limit to what Android gets, there’s no limit to what Android does
Posts tagged android
Situation puzzle
Apr 19th
What are situation puzzles?
Situation puzzles are often referred to as lateral thinking puzzles or “yes/no” puzzles.
Situation puzzles are usually played in a group, with one person hosting the puzzle and the others asking questions which can only be answered with a “yes” or “no” answer. Depending upon the settings and level of difficulty, other answers, hints or simple explanations of why the answer is yes or no, may be considered acceptable. The puzzle is solved when one of the players is able to recite the narrative the host had in mind, in particular explaining whatever aspect of the initial scenario was puzzling.
These puzzles are inexact and many puzzle statements have more than one possible fitting answer.
More >
Admob with padding
Aug 26th
I just added AdMob to my Android app DRoute and it doesn’t work. I receive many calls to onFailedToReceiveAd event function
-
@Override
-
public void onFailedToReceiveAd(AdView adView)
-
{
-
Log.d("DRoute", "onFailedToReceiveAd");
-
super.onFailedToReceiveAd(adView);
-
}
I dig into the problem, search on the internet and didn’t found a solution. This morning I’ve created step by step a fresh new app only to test AdMob publisher code and ID and it works fine on emulator with :
After step by step testing I found out that the problem was with a padding value that I have in my surrounding
More >
Services – connect and communicate using aidl
Jul 31st
With services there are 2 ways to work with :
- One is to use startService(Intent) to start the service and stopService(Intent) to stop the service from within your activity. With this solution you cannot communicate directly with the service, but you can use SQLITE as a layer between activities and services.
- The second is to use bindService() to bind the service with the activity. With this the service is alive all the time the activity that is bind to is alive. With this method you can communicate with the service directly.
I will write a simple tutorial about the second option.
I use Eclipse and ADT Plugin for Eclipse . This will do some background work.
Add settings to an application using Preferences
Jul 10th
You can use Preference classes from Android SDK to store, set and retrieve Settings at application level or at activity level.
There are 2 ways to manipulate preferences :
- Using your own screen to modify the settings
- Using the built in PreferenceActivity class
How to share / send data from your application
Jun 29th
If you want to share / send data from your application using others applications, you must use ACTION_SEND intent.
An example below :
-
Intent intent = new Intent(Intent.ACTION_SEND);
-
-
intent.putExtra(Intent.EXTRA_SUBJECT, this.getResources().getString(R.string.shareSubject));
-
intent.putExtra(Intent.EXTRA_TEXT, this.getResources().getString(R.string.shareExtra));
-
intent.setType("text/plain");
-
-
startActivity(Intent.createChooser(intent, this.getResources().getString(R.string.mailAppChoose)));
If you want to choose only from e-mail applications use :
-
intent.setType("application/e-mail");
If you want to attach a file to e-mail use :
-
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+Environment.getExternalStorageDirectory()+"/"+fileName));
