SetShareIntent from the mainactivity is never used locally.. What does it mean? - java

I have developed simple image app that is suppose to swipe the images from left to right .After reading this link http://developer.android.com/training/sharing/shareaction.html#set-share-intent. I implemented the codes in my mainActivity.java. This code is suppose to show sharing option at the top along the actionbar. However, I am getting little yellow lamp near this code ..private void setShareIntent(Intent shareIntent) {...What does it mean.. Following is my mainActivity.java code..
import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ShareActionProvider;
public class MainActivity extends Activity {
MediaPlayer oursong;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
oursong = MediaPlayer.create(MainActivity.this, R.raw.a);
oursong.start ();
ViewPager viewPager = (ViewPager) findViewById(R.id.view_pager);
ImageAdapter adapter = new ImageAdapter(this);
viewPager.setAdapter(adapter);
}
private ShareActionProvider mShareActionProvider;
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate menu resource file.
getMenuInflater().inflate(R.menu.activity_main, menu);
// Locate MenuItem with ShareActionProvider
MenuItem item = menu.findItem(R.id.menu_item_share);
// Fetch and store ShareActionProvider
mShareActionProvider = (ShareActionProvider) item.getActionProvider();
// Return true to display menu
return true;
}
#Override
protected void onPause(){
super.onPause();
oursong.release();
}
}
Error problems
Description Resource Path Location Type
[Accessibility] Missing contentDescription attribute on image fullimage.xml /Grid View/res/layout line 6 Android Lint Problem
Description Resource Path Location Type
<uses-sdk> tag should specify a target API level (the highest verified version; when running on later versions, compatibility behaviors may be enabled) with android:targetSdkVersion="?" AndroidManifest.xml /Copy of galleryDemo line 7 Android Lint Problem
Description Resource Path Location Type
Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details. AndroidManifest.xml /DailySounds line 8 Android Lint Problem
Description Resource Path Location Type
Should explicitly set android:allowBackup to true or false (it's true by default, and that can have some security implications for the application's data) AndroidManifest.xml /Copy of galleryDemo line 10 Android Lint Problem
Description Resource Path Location Type
The value of the field MainActivity.mShareActionProvider is not used MainActivity.java /Copy of ViewpagerImageGallery/src/com/manishkpr/viewpagerimagegallery line 29 Java Problem
Description Resource Path Location Type
This method has a constructor name MainActivity.java /SecondActivityApp/src/com/secondactivityapp line 28 Java Problem
Description Resource Path Location Type
Use a layout_height of 0dp instead of wrap_content for better performance fullimage.xml /Grid View/res/layout line 9 Android Lint Problem
Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.manishkpr.viewpagerimagegallery"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.manishkpr.viewpagerimagegallery.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

If there is only a "yellow lamp" icon beside that line, then it's just a warning. Your program will run smoothly regardless, but it simply states that the intent is not used anywhere in your program (it's placed there unnecessarily) so you should try removing that line. If your program still runs smoothly, you are done.

Related

Android Studio Two Buttons to Two Pages

Good morning,
Quick coding inquiry I'd like to put forth.
I've gotten an assignment to produce an application on Android Studio that has two buttons that should each load new pages when clicked.
The chapter from our books explains how to do this with one button, but I assume there might be a different set up with two buttons?
Anyway, this is only the second assignment in our class so I'm not very far in understanding how all of this works; that and the class is an Independent Study course so I'm teaching myself. Not always the easiest thing.
Anyway, here's what I do have:
MainActivity.java
package com.example.thelatestmusicscene;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button button = (Button) findViewById(R.id.buttonOne);
button.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
startActivity(new Intent(MainActivity.this, MusicNewsOne.class));
}
});
Button button2 = (Button) findViewById(R.id.buttonTwo);
button2.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
startActivity(new Intent(MainActivity.this, MusicNewsTwo.class));
}
});
}
}
I believe this is the only file that's relevant to my problem but I can post the others if you need to see them too.
The first button functions perfectly but when I try to use the second button the app stops working. I've seen a few explanations online, but the few I've found about loading other pages gives me a bunch of errors in my code.
Note: This is how we were shown to do it from the book, but I'm all for alternative methods.
Everything else for this application is done, it's just this linking to the second java page I'm faltering on. If you know a better way to lay out the code I'm all ears or if you could link me to a resource that could teach me, I'd be grateful.
OK, this is going to be the confusing part. When I downloaded Android Studio for the class I could never get any of the emulators to run. This was a problem I also posted, which as of today, has still not received an answer. If you have a solution to that or want to see those details of what I’ve tried, go here:
https://superuser.com/questions/1394568/android-studio-and-haxm-installation
Ultimately, I could write code, but I couldn’t test it. However, I found a way to run the apps on my own smartphone to test if they’re functioning. Letting Android Studio build the APK file and then letting my phone run the app.
Now…as for errors. There are none. Android Studio isn’t coming back with any. As far as it's concerned, everything is fine. When I load the application on my phone and I click the second button, the application closes, and I get “Unfortunately, nameOfApp has stopped.”
And that’s where I find myself.
Here’s the XML (I assume you mean the AndroidManifest.xml)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.thelatestmusicscene">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MusicNewsTwo">
</activity>
<activity android:name=".MusicNewsOne" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
I've got to get some sleep now but I'll try retrieving a crash report from my phone today if I can.
Brother your MainActivity.java file have correct code.
Kindly check button name in xml and java file, and check your manifest file either MusicNewsTwo added as activity.
And be sure you have both java and xml file in correct place.
Few notes
You may need to provide the crash's log/stacktrace/message (for us to know what's the solution for it)
You may also need to provide us the layout or the .xml file
What could possibly went wrong
One of the common problems encountered:
Assuming you have only copied it from your class, you might have encountered the error saying that your MusicNewsTwo.class is not declared in the AndroidManifest.xml, do this:
What could be the possible solution
<application
android:label="Example APp"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name="package.path.to.MusicNewsOne">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Add this activity if missing -->
<activity
android:name="package.path.to.MusicNewsTwo"/>
</application>
I will update my answer so as long as you take into consideration the Few notes section of my answer, otherwise if I got your answer write already with this one, comment out.
Found the problem within my phone itself. Turns out it was a permission error for downloading 3rd party apps; my code was actually perfect. Thanks for all the suggestions though.
I think the IDs of the views in the layout : "activity_main" are different than the ones you are using in the MainActivity.java file
Bro there are two ways to do this, start a new Activity like you are doing, and other is By Using one activity you can post the fragments on the same activity as much as you want i.e 1 ,2 3 and so on.here is the link for fragments, but you are very much biggner ill suggest you to start with the actitvity and learn about the Activity life cycle. you can find here . moreover tell me what the error you are getting, To find the error see a the bottom of android studio the option (Logcat) click on it . and see the error and past it in the comment.

React Native Android Splash Screen

I'm trying to build a splash screen for an Android RN app.
I've followed the steps described here : https://www.bignerdranch.com/blog/splash-screens-the-right-way/
Unfortunately, when trying to launch my app, the build is successful but the app crashes saying:
Error type 3
Error: Activity class {com.needlios/com.needlios.MainActivity} does not exist.
Does any one know where this could come from ?
I have the following code :
SplashScreen.java
package com.needlios;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
public class SplashActivity extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
finish();
}
}
MainActivity.java
package com.needlios;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import java.util.Arrays;
import java.util.List;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
#Override
protected String getMainComponentName() {
return "NeedlIOS";
}
/**
* Returns whether dev mode should be enabled.
* This enables e.g. the dev menu.
*/
#Override
protected boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
/**
* A list of packages used by the app. If the app uses additional views
* or modules besides the default ones, add more packages here.
*/
#Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
);
}
}
AndroidManifest.xml
<activity
android:name=".SplashActivity"
android:label="#string/app_name"
android:theme="#style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
OK, well it works now. I just changed the android:name to android:name=".MainActivity" in AndroidManifest.xml
It works but I don't understand why it shows the splash screen though...
Just to share as I got this working too.
The change of the
android:name
to
android:name=".MainActivity" in AndroidManifest.xml
is working because the whole background has been modified to Splashscreen theme. It might not be a good solution, as if the backgroundColor is removed from any screens; this splash screen background will appear. Eventually it'll lead to some unwanted displays when you need to integrate with some camera features. :(
Most of the codes are based on this link with just splash activity removed. If anyone is searching do add values/colors.xml and drawable/backgroundsplash.xml.
You cant create splash screen inside ract-native script, you need go down to the native implementation.
To make simple splash screen, you need to set "android:windowBackground" on theme that used by you main activity. In such way them will be showed to user until your react-native view fully loaded.
Here is the article on how to do it.

Stuck on WebView Tutorial - R.id issue?

Good morning - I hope everyone has had an enjoyable weekend.
I am having some issues following the tutorial at https://developer.chrome.com/multidevice/webview/gettingstarted
Everything is going well until I reach the step regarding an edit of the MainActivity class. This is Step 3 in the section Add the WebView: https://developer.chrome.com/multidevice/webview/gettingstarted#add_the_webview
Here is the content of my AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.nathan.myapplication" >
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MyActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
And here is my MyActivity.java:
package com.example.nathan.myapplication;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebView;
public class MyActivity extends Activity {
private WebView mWebView; // Added by ND Guthrie 8.15.2014:2229
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my);
mWebView = (WebView)findViewById(R.id.activity_my_webview); // Added by ND Guthrie 8.15.2014:2231
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.my, menu);
return true;
}
#Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
I have tried suggestions based on these links here on stackoverflow:
Error with R class import in android
Android Studio don't generate R.java for my import project
R.id cannot be resolved
For the error with R class import, I have attempted adding the line
import com.TestApp.HelloWebView.R;
But with no success, as TestApp is not recognized. This stands to reason, since I have not named anything 'TestApp' in my app here, but I do not understand how to fix it.
I also tried deleting the generated folder and cleaning and rebuilding the project. However, I obtain the same results.
I know this is probably a silly little thing, but I have been searching google and stackoverflow for days now, and it seems like there is just something I am not seeing.
Any ideas? Please advise.
Thank you very much for your time!
Best,
Nathan
The way it works is that your XML files get compiled into resources in the background by Eclipse, and an R.java gets generated that allows your project to refer to these resources. If you put "R.id.blah" or "R.layout.blah" or whatever into Eclipse and it isn't recognised, it means one of the following:
Your XML files don't have corresponding elements. R.java is being created, but doesn't contain "R.id.blah" or whatever you're using, because your XML files don't contain elements that would compile with those IDs.
R.java couldn't be compiled at all. That'll be the case if there are errors in your project. You're best off making sure that there are no errors (no red crosses anywhere), and then seeing whether R.java appears. Once you've done that, you'll be able to find out what IDs are being generated, and that should point you in the direction of what's missing or inconsistent in your XML files.

java.lang.NoClassDefFoundError: android

I'm developing an app, that should support multiple android sdk versions. It uses the ActionBarSherlock library and sliding menu. On android 4.0+ the app runs just well. But when I try to run it on all of the devices with lower sdk version, the app crashes with strange error. Here is the stack trace:
08-08 11:54:11.626: ERROR/dalvikvm(4782): Could not find class 'ru.arsenalmedia.AvatatorActivity', referenced from method ru.arsenalmedia.Auth.complete
08-08 11:54:11.646: ERROR/dalvikvm(4782): Could not find class 'ru.arsenalmedia.AvatatorActivity', referenced from method ru.arsenalmedia.Auth.onActivityResult
08-08 11:54:11.696: ERROR/ResourceType(4782): Style contains key with bad entry: 0x010102ce
08-08 11:54:12.346: ERROR/dalvikvm(4782): Could not find class 'android.os.StrictMode$ThreadPolicy$Builder', referenced from method ru.arsenalmedia.proto.Utils.enableStrictMode
08-08 11:54:18.346: ERROR/AndroidRuntime(4782): FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: ru.arsenalmedia.AvatatorActivity
at ru.arsenalmedia.Auth.complete(Auth.java:119)
at ru.arsenalmedia.proto.ServiceWorker$ClientRequest$2.handleMessage(ServiceWorker.java:951)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4914)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Manifest:
<uses-sdk
android:minSdkVersion="8"
android:maxSdkVersion="17"
/>
<application android:icon="#drawable/icon"
android:label="#string/app_name"
android:name="ru.arsenalmedia.Avatator"
android:theme="#style/actionBarStyle"
>
<activity
android:screenOrientation="portrait"
android:name="ru.arsenalmedia.Auth"
android:label="#string/app_name"
android:clearTaskOnLaunch="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:label="#string/app_name"
android:name="ru.arsenalmedia.AvatatorActivity"
android:screenOrientation="portrait"
>
</activity>
<activity android:name="ru.arsenalmedia.SlidingPanelActivity" />
<activity android:name="ru.arsenalmedia.TestAct"/>
</application>
I thought, that it was because of the sliding menu. I've tried to use native SlidingPaneLayout, but the issue is the same. I read a lot about this and nothing really helps. Please, help !!!
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.SearchView;
import android.widget.TextView;
import android.widget.Toast;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu;
import com.jeremyfeinstein.slidingmenu.lib.app.SlidingFragmentActivity;
import ru.arsenalmedia.avatator.R;
import ru.arsenalmedia.proto.ContactInfo;
import ru.arsenalmedia.proto.GroupInfo;
import ru.arsenalmedia.proto.ServiceWorker;
public class AvatatorActivity extends SlidingFragmentActivity implements SearchView.OnQueryTextListener, MenuItem.OnActionExpandListener {
private static final String TAG = "AvatatorActivity";
protected Fragment mFragment;
private SearchView searchView;
private Menu menu;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.app_name);
actionBarInit();
// set the Above View
if (savedInstanceState != null)
mFragment = getSupportFragmentManager().getFragment(savedInstanceState, "mFragment");
if (mFragment == null)
mFragment = new GroupsList();
//searchView = (EditText) findViewById(R.layout.contact_search_edittext);
setContentView(R.layout.content_frame);
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.content_frame, mFragment)
.commit();
// set the Behind View
setBehindContentView(R.layout.menu_frame);
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.menu_frame, new AppMenuFragment())
.commit();
customizeSlidingMenu();
//updateMenuTitles();
invalidateOptionsMenu();
}
private void actionBarInit() {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
setSlidingActionBarEnabled(false);
}
private void customizeSlidingMenu() {
SlidingMenu sm = getSlidingMenu();
sm.setShadowWidthRes(R.dimen.shadow_width);
sm.setShadowDrawable(R.drawable.shadow);
sm.setBehindOffsetRes(R.dimen.slidingmenu_offset);
sm.setFadeDegree(0.35f);
sm.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
sm.setBackgroundResource(R.drawable.sliding_menu_selector);
}
#Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
getSupportFragmentManager().putFragment(outState, "mFragment", mFragment);
}
public void switchContent(Fragment fragment) {
Log.d(TAG, "SWITCH CONTENT");
mFragment = fragment;
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.content_frame, fragment)
.commit();
//updateMenuTitles();
invalidateOptionsMenu();
getSlidingMenu().showContent();
}
Are you using eclipse adt plugin? if so, just right click the project->properties->Java Build apth ->Order and export, then make the Android Dependencies is checked.
EDIT:
as you are using Intellij, have you checked if you have imported the SlidingMenu library as a module?
ps. , I am using Android studio & Maven, I think you can just import the project as library if you are not using maven.
StrictMode was introduced in API level 9 (version 2.3) so the older versions you're testing on must not be able to call it...
08-08 11:54:12.346: ERROR/dalvikvm(4782): Could not find class 'android.os.StrictMode$ThreadPolicy$Builder', referenced from method ru.arsenalmedia.proto.Utils.enableStrictMode
When you call your Utils.enableStrictMode() method you should first check if the users device is running a version that has access to StrictMode.
EDIT:
Something like this may also be causing a problem; using xml attributes that didn't exist in older platforms in your styles.xml, per this line:
08-08 11:54:11.696: ERROR/ResourceType(4782): Style contains key with bad entry: 0x010102ce
It still doesn't explain your NoClassDefFoundError
This is a pretty elusive problem. You mentioned that it works on Android 4.0+, and that sets off an alarm that you might be using something that's not supported in older versions of Android.
But before all that, if you're using Eclipse, you should refresh your project and do a clean build. Sometimes Eclipse has trouble picking up AndroidManifest changes and you might be loading an older version on your emulator/device.
If it still fails, it might be that you're importing something not supported in older APIs, or perhaps the AvatatorActivity class extends something only available in newer APIs. Can you post some code for your AvatatorActivity (namely, the imports and what AvatatorActivity extends)?
It would also help to know what you set for android:minSdkVersion and android:targetSdkVersion.
======== EDIT ========
Thanks for posting the code. The SlidingFragmentActivity is very suspicious, and chances are this library is missing. The easiest way to debug this would be to save a copy of the current AvatatorActivity.java and replace it with the following to see if you can launch the activity.
public class AvatatorActivity extends Activity {
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.app_name);
}
}
If this bare-bone Activity launches, then there's a problem with your SlidingMenu setup.
Thanks everyone, I've found the solution. It was the problem with SearchView. You should use one from ActionBarSherlock or SupportLibrary

ActionBar Compatibility issue with API 15

I have an issue with actionBar compatibility on API level 15 for Android. The up button doesn't work well with this API level
I use the sample project called "actionbarcompat" provided in the android-sdk folder, so I have imported all class's and I extends all my activities with ActionBarActivity. I also add this piece of code in the Manifest for all my activities :
<activity
android:name="fr.appsolute.rescue.MyActivity"
android:label="#string/title_activity_info"
android:parentActivityName=".MainActivity"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
and in my ActionBarActivity :
#Override
public boolean onOptionsItemSelected(MenuItem item) {
// TODO Auto-generated method stub
switch(item.getItemId()){
case android.R.id.home:
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
This permit the user to touch the up button (with the app icon) to return to the MainActivity
This code works well with Android 2.3.3 and 4.2, but doesn't work with 4.0.1 and I don't understand why. When the user touch the up button, nothing happens.
Thanks for your help.
PS : I can't use an external library, I have to use native code
Not sure why it isn't working. I agree it is strange that it only fails on API 15.
An alternative to calling NavUtils.navigateUpFromSameTask(this) could be calling finish(). This would close your current activity and go to the previous activity in the stack. It may give you the same desired result.
Solved it using ActionBarSherlock

Categories