[Q] app wont save to SD? - Android Software Development

heres the starting of my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hyperbyte.app3"
android:installLocation="preferExternal"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="3" />
// etc...
But it won't allow for installs to the SD card. Any ideas?

Related

[Q] MapView-No Map Display

I am new to SW development with Android.
Trying to have a MapView object in my display. Code is straightforward below. But for some reason when i launch the application i do not see any map but rather the grey grid.
I have looked at many posts on the internet and i understand that it is either an INTERNET permission (which is included in my coe) or a wrong apiKey. I have gone through the apiKey several time.
Am not sure what can be wrong. Any help would be great. Thanks, Lebnen.
-----------------------------------------------
Manifest.xml
-----------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.testmap"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
<uses-library android:name="com.google.android.maps" />
<uses-permission android:name="android.permission.INTERNET" />
<activity android:name=".TestMapActivity"
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>
-----------------------------------------------
main.xml
-----------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainlayout"
androidrientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
>
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:enabled="true"
android:apiKey="0SA_n7tIj-klgGxARuFJgEos8FBGtEshpgmfogA"
/>
</LinearLayout>
-----------------------------------------------
testMapActivity.java
-----------------------------------------------
package com.test.testmap;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.widget.LinearLayout;
import com.google.android.maps.MapView;
import com.google.android.maps.MapController;
import com.google.android.maps.MapActivity;
import com.google.android.maps.GeoPoint;
public class TestMapActivity extends MapActivity {
private MapView mapView;
LinearLayout linearLayout;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
mapView = (MapView) this.findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
mapView.setSatellite(true);
}
@Override
public boolean isRouteDisplayed() { return false; }
}
Dont see your manifest. Is it a dev map key ? Is the application debuggable in the manifest ?
Sent from my Nexus One using XDA App
1. What do you mean by dev map key? Am using the debug.keystory MD5 hash that I feed into the google page http://code.google.com/android/add-ons/google-apis/maps-api-signup.html to get the apiKey.
2. The application is debbugable in the manifest.
Ok i see your files on computer now (not on android application on my nexus one)
replace com.google.android.maps.MapView by com.test.testmap.testMapActivity
If I replace it in main.xml the application crashes; in the manifest it does not compile
Help!
the:
<uses-permission android:name="android.permission.INTERNET" />
you have to put on <manifest>, not on <application>
like
<manifest ...>
<application ...>
<uses-library android:name="com.google.android.maps" />
.
.
.
</application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
Other thing that I'm not totally right if it's correct:
I don't know if this is correct, but for me, only worked when I create a new Android Project with Target on Google API's. Didn't work with Android 2.2 + map.jar.
Did you create with Android X.X or Google API ?
I have tried to put the INTERNET permission inside and outside the application. It does not make a difference.
I am building a Google API application.
It worked.
Weird. I had to add
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
in <manifest> outside of <application> and did it through the "Permissions" tab in Eclipse.
Thanks.
Interesting, because I thought that the "ACCESS_FINE_LOCAT ION" is used only when you try to use something with location, such as get location, distance between locations, etc..., I thought that it's not necessary when you only want to show the map
Good to know, thank you

How to correct change APK background

hello everybody
I have a problem
I want change my apk background but have trouble
i edit style.xml
original
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="RE_Main" parent="@*android:style/Theme.DeviceDefault.Light">
<style name="RE_Dialog" parent="@*android:style/Theme.DeviceDefault.Light.Dialog" />
</resources>
Change
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="RE_Main" parent="@*android:style/Theme.DeviceDefault.Light">
<item name="android:background">@drawable/semc</item>
</style>
<style name="RE_Dialog" parent="@*android:style/Theme.DeviceDefault.Light.Dialog" />
</resources>
Can not be used after changing

Failed to parse file gradient_drawable1.xml

I created gradient_drawable1.xml file and the eclipse is showing error that "failed to prase file gradient_drawable1.xml.
source code of gradient_drawable1.xml is
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape>
<gradient
android:startColor="#4C4C43"
android:endColor="#B8B894"
android:angle="270" />
</shape>
</item>
</animation-list>
and exception stact trace are :
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
help !!
thanks..
sonidepanshu said:
I created gradient_drawable1.xml file and the eclipse is showing error that "failed to prase file gradient_drawable1.xml.
source code of gradient_drawable1.xml is
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape>
<gradient
android:startColor="#4C4C43"
android:endColor="#B8B894"
android:angle="270" />
</shape>
</item>
</animation-list>
help !!
thanks..
Click to expand...
Click to collapse
why <animation-list xmlns:android="http://schemas.android.com/apk/res/android" > </animation-list> this would require animation properties, your missing "duration"
so maybe change "animation-list" to "layer-list"
Code:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape>
<gradient
android:startColor="#4C4C43"
android:endColor="#B8B894"
android:angle="270" />
</shape>
</item>
</layer-list>
hope that helps, if it's not what you want let me know.

[Q] Padding for ExpandableListView-Group

Hello,
I have a ExpandableListView and I'm using a custom layout for the groups:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:textAppearance="?android:attr/textAppearanceListItem" >
<TextView
android:id="@+id/tvGroup"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingLeft="0dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:textAppearance="?android:attr/textAppearanceListItem"
android:textIsSelectable="false" />
</LinearLayout>
The problem: The padding displays only right in Android 4.4, in older versions the padding is ignored..why?
The image I attached shows four different virtual devices running different Android versions.

Where is the source code for "Background app refresh"

Some tablets have a "Background app refresh" setting under the apps settings menu. What does this setting actually do and where is the source code for it? I am wanting to programmatically modify this setting.
I found that the settings for this screen are stored in the following database on the TB-8504F
/data/data/com.archer.providers.autoboot/databases/autoboot.db
AndroidManifest.xml
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.archer.providers.autoboot" platformBuildVersionCode="25" platformBuildVersionName="7.1.1">
<application android:allowBackup="true" android:supportsRtl="true">
<provider android:authorities="com.archer.autobootprovider" android:exported="true" android:name=".AutoBootProvider"/>
</application>
</manifest>
apk and odex is here:
https://github.com/dazza5000/lenovo_auto_boot_provider

Categories

Resources