cordova/phonegap has quick loading screen on android - android

When ever I load my app on android I get a grey screen with the words "player needed"(the apps name) across the top for about a second before my app actually starts. It does not appear on the development testing app only when I do an actual build, and then only when I start the app. If I change windows back and forth it does not appear again. How can I remove this?example of grey screen
Thank you!

You could try this, worked for me, it's something about the MainActivity theme on Android.
In the "platforms\android" folder under your project, open the AndroidManifest.xml and search for android:theme inside the <activity> tag that contains android:name="MainActivity" and change the default value (that is android:theme="#android:style/Theme.DeviceDefault.NoActionBar") to android:theme="#android:style/Theme.Translucent". Save the file and build your project again, the grey screen should desapear.

Related

How to Get Apps to Show Full Screen on Chromebook?

I've been making Android apps for a long time and can get them to open in full screen mode on every device except Chromebook. No matter what I do, they only open about half screen and a user has to click the "maximize" button to get them to open further.
Here is the code I use to try to get the apps full screen:
<item name="android:windowFullscreen">true</item>
in the relevant style in themes.xml
as well as
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
in MainActivity's onCreate() method.
I've also tried putting
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
in the application block of AndroidManifest.xml.
Is there something else I can do to get the apps to open full screen on Chromebook?
(I'm using HP Chromebook x360, if that helps)
So there is a section of the Android documentation for using Android on ChromeOS which makes reference to Window Management - Launch Size which seems appropriate.
Quoting from the documentation:
Use a launch size only in desktop environments. This helps the window manager to give you the proper bounds and orientation. To indicate a preferences when used in desktop mode, add the following meta tags inside the <activity>:
<meta-data android:name="WindowManagerPreference:FreeformWindowSize"
android:value="[phone|tablet|maximize]" />
<meta-data android:name="WindowManagerPreference:FreeformWindowOrientation"
android:value="[portrait|landscape]" />
Use static launch bounds. Use inside the manifest entry of your activity to specify a "fixed" starting size. See this example:
<layout android:defaultHeight="500dp"
android:defaultWidth="600dp"
android:gravity="top|end"
android:minHeight="450dp"
android:minWidth="300dp" />
Use dynamic launch bounds. An activity can create and use ActivityOptions.setLaunchBounds(Rect) when creating a new activity. By specifying an empty rectangle, your app can be maximized.
Note: These options work only if the activity started is a root activity. You can also do this using a springboard activity to clear the activity stack in the task with a new start.

How to add app icon properly in android react-native

Hi I added icons to android/app/src/main/res/..., the app icon showing perfectly in home screen like first image, but when minimize the app it showing default app icon like second image. how can change that icon also.
I cleaned build folder, gradlew and reinstalled the app but no changes.
Please help me on this
put this on AndroidManifest.xml and try
<application
...
android:icon="#drawable/ic_launcher"
...
</application>
also hope you update the icons properly. please refer this
https://code.tutsplus.com/tutorials/how-to-update-the-launcher-icon-for-your-android-app--cms-30624
I'm not sure if this comes after you setup androidManifest.xml but you will need icons in these two folders:
android/app/src/main/res/mipmap.
ios//Images.xcassets/AppIcon.appiconset
I've used the resize-reactnative-launcher-icon shell scrip to generate my icons. It takes a png image and creates the 25 variations you need by size and resolution.
bash resize.sh my-cool-new-app-logo.png

Strange App Icon behaviour

I have replaced the standard android studio app icon (ic_launcher) with my own(one for each dimension in the mipmap folders) and deleted the ic_launcher round icons since i won't be using round icons on my app. The problem is that although the icons show up correctly in the res->mipmap->ic_launcher folder, when i install the app on my phone the app's icon is the default one and not the one i chose. Also, if you go into tje phone's app info, the app's icon shows up correctly. I have no clue on why this is happening. Any idea?
Go to manifest and look for roundicon and dont forget to change there.
Go to manifest and replace default icon name with yours here:
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"

Theme in android

I´m noob in the android programming area, and I have a big problem with changing the theme in eclipse!! The app runs nice with the predetermined theme, when I change it i did this:
1) go to the manifest > Application > select "Browse" > this theme: #android:style/Theme.Black.NoTitleBar.Fullscreen (did apear at the code)
2) activity_Main > I selected the same theme but didn´t apear at the code.
thats it! and when i run it the AVD says: "The application Bola de cristal (Process com.RMapps.boladecristal) has stopped unexpectedly. Please try again"
I dont know what to do! please someone has an idea? thanks in advanced!!
Excuse my english, its not my first language.
Take a look at the actual XML of the manifest. You should see your theme under application:
<application
android:theme="android:style/Theme.Black.NoTitleBar.Fullscreen
This will apply the themem to all activities that don't explicitly override it.
In Eclipse, when viewing the activity designer, you can select themes from a dropdown and you will see the change take place in front of you but this will not actually save and compile for you. So when you run your app, you will be a bit confused. You need to explicitly declare the theme for an activity under that activity def in the manifest, just like you did for the application as a whole.
<activity
android:theme="android:style/Theme.Black.NoTitleBar.Fullscreen
But again, you don't need to do this if you want to use the theme that you set at the application level.
If your app is still crashing then you have another problem going on. Perhaps the theme you are selecting isn't actually present or maybe you have another bug you didn't realize you introduced during the time of adjusting the theme

How to get a truly blank vanilla app with eclipse

I have made several apps before using eclipse. I (think) always started out with file>new>project>application project and eclipse set up a project in which the main activity was comprised of a black screen with nothing in it - until I used the "graphical layout" editor to start adding some buttons/text etc.
But in more recent versions of eclipse it appears that however hard I try, I always seem to ens up with some components already on my activities screen. It appears that some "style" or "theme" (whatever they are) has been selected in the process and my activity starts with a fat bar across the top with my application's icon on the left of it. I have attempted to make edits to various xml files to remove the unwanted icon/bar, but so far to no avail.
What do I need to do to get a properly blank application so that I can be fully in charge of every pixel on the screen?
In your graphical layout preview select AppTheme select theme select Theme.NoTitleBar.FullScreen
You should see a preview with no title bar
Add this in manifest for your activity
android:theme="#android:style/Theme.NoTitleBar.Fullscreen">

Categories

Resources