[Q] Emulator to Phone wth! - Android Software Development

So my game and all of it's several revisions have worked great in the Emulator, but for whatever reason, my games will not work on ANY Android Phone !!! I've tried 4 types.
All it does is show me my background and nothing in the foreground. No events, sounds, nothing.
So why does most of Googles stuff FAIL SO BAD!!! when people try to use it?
What do you guys use?
I am a graphics artist and I have 3 games ready that look killer, but cannot get them to a market or even a phone.
So do I leave android, or are there solutions for getting things from Eclipse/SDK-ADV to a running state on a freaking phone?

mmm what are you using for the games: canvas, opengl es 1.0 JSR 239 or opengl es 2.0? which devices are you trying to run them into? are the device screen size in the same resolution that the emulator?
Though i really don't see this problem in opengl since the emulator does not have graphics acceleration... So you are using canvas, right? have you check that all your imports are compatible with the version of android of the phones you are testing them? remember that canvas is not accelerated on phones, whereas in the emulator it is, so maybe, if it is too graphic intensive, that might be part of your problem
I've never run into this problem, but I use mostly opengl frameworks, that btw are a pain in the ass to debug with the emulator but work great on the phones (5 vs 40-60 fps)...
For 2d I use andengine, its an opensource gl es 1.0 framework, compatible with devices from 1.6
For physics I use Box2d, that it is an opensource physics jni framework compatible from 2.* if i recall right.
For 3d i have not done anything yet. But you could try using opengl or there is a port of an opensource java 3d framework, can't recall its name, but it was something like jp**-ae i think, probably someone would say its name or you may find it using the search of the forum, cause i read that one in a post from here a few months ago...
I personally don't use canvas, since i find andengine much more usefull and faster for 2d...

I am loading all the graphics/buttons via the xml layout using LinearLayout.
I recently read that "fill_parent" is a bad idea in the layout.xml so I replaced those with "wrap_content"...still have yet to test on the phone.
I am basically just trying to the SkellyApp to even run on my phone, not even snake will go onto it.
I do not use canvas, gps, bluetooth or anything, just touch stuff and text.
I'm still left confused

Here are the Imports I am using;
import android.app.Activity;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.view.MotionEvent;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.view.View.OnTouchListener;
import java.util.Random;

you still missing something for us to see what the error is
the fill_parent / wrap_content are just properties, is not that its going to produce that error... it is recommended to use RelativeLayout, just for making it easier to port it to different screen sizes
if you don't want to mess much with the layout settings you could use droiddraw (droiddraw.org)
other than that I don't know what you are doing wrong, have you try logcat to see if you spot an error somewhere? you will probably find your answer there...

I appreciate you sticking with me on this...here is my layout file...is there a problem with me using 2 Linears?
<?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"
androidrientation="horizontal"
android:background="@drawable/bg2"
>
<LinearLayout
android:layout_width="wrap_content" android:layout_height="wrap_content"
androidrientation="horizontal"
>
<!-- android:background="@drawable/blank"-->
<Button android:id="@+id/back" style="@style/ActionButton"
android:text="@string/back"
android:layout_width="45dip"
android:layout_height="45dip"
android:layout_alignParentLeft="true"
android:layout_marginLeft="44dip"
android:layout_marginTop="2dip"
android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:layout_gravity = "center"
android:background="@drawable/green"
/>
<Button android:id="@+id/clear" style="@style/ActionButton"
android:text="@string/clear"
android:layout_width="45dip"
android:layout_height="45dip"
android:layout_alignParentLeft="true"
android:layout_marginLeft="-12dip"
android:layout_marginTop="35dip"
android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:layout_gravity = "top"
android:background="@drawable/green"
/>
</LinearLayout>
<Button android:id="@+id/butone"
android:text="@string/butone"
android:layout_width="65dip"
android:layout_height="65dip"
android:layout_marginLeft="-349dip"
android:layout_marginTop="158dip"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_gravity = "bottom"
android:background="@drawable/glow1"
/>
<Button
android:id="@+id/b3i"
android:text="@string/b3i"
android:layout_width="120dip"
android:layout_height="120dip"
android:layout_marginLeft="-120dip"
android:layout_marginTop="95dip"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_gravity = "top"
android:background="@drawable/b3"
/>
<TextView android:id="@+id/text1"
android:layout_marginLeft="-89dip"
android:layout_marginTop="27dip"
android:layout_width="50dip"
android:layout_height="30dip"
android:textStyle="bold"
android:textColor="#B9B888"
android:freezesText="true"
/>
<TextView android:id="@+id/text2"
android:layout_marginLeft="12dip"
android:layout_marginTop="201dip"
android:layout_width="50dip"
android:layout_height="30dip"
android:textStyle="bold"
android:textColor="#B9B888"
android:freezesText="true"
/>
<TextView android:id="@+id/text3"
android:layout_marginLeft="-160dip"
android:layout_marginTop="201dip"
android:layout_width="50dip"
android:layout_height="30dip"
android:textStyle="bold"
android:textColor="#B9B888"
android:freezesText="true"
/>
<Button
android:id="@+id/exitbutton"
android:layout_width="35dip"
android:layout_height="35dip"
android:layout_marginLeft="222dip"
android:layout_marginTop="-37dip"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_gravity = "top"
android:background="@drawable/exit"
/>
</LinearLayout>

you could debug your apps on the device using eclipse and see from the logcat where things go wrong
these may help
Code:
http://forum.xda-developers.com/showthread.php?t=821022&highlight=debugging
http://dotnet.dzone.com/articles/android-and-windows-phone-7-%E2%80%93

thank you I will look at those.
Is my layout XML file (look above) correctly structured, etc. ?

your xml is ok. i ran it on my phone and its loading just fine (it displays the same thing as the emulator)

nemoc 23 said:
your xml is ok. i ran it on my phone and its loading just fine (it displays the same thing as the emulator)
Click to expand...
Click to collapse
Thanks again for your help, I'm glad it's working...guess I am learning something

Oh boy...so I created more AVD's using the other size options like 400,432,800,854, and my XML Layout above puts my buttons in different screen locations depending on the AVD used, only the default and the 432 show it the way I need.
How does a person go about making sure their buttons are in the same spot every time for all resolutions using the XML Layout, or another version of mine in the post above?
Sorry to ask for another favor, but this seems too nebulas for me to grasp atm, so a push in the right direction would be great

What were the four devices you tried. Even simple applications can change depending on the devices oem. I have a HTC Droid Incredible and simple things like radio buttons look different than the emulator, so I would see if it is an HTC/Samsung/whatever problem rather than an android problem. I could be wrong, but I have noticed that simple things change, so why not more complex things?

LuvinAndroid said:
Oh boy...so I created more AVD's using the other size options like 400,432,800,854, and my XML Layout above puts my buttons in different screen locations depending on the AVD used, only the default and the 432 show it the way I need.
How does a person go about making sure their buttons are in the same spot every time for all resolutions using the XML Layout, or another version of mine in the post above?
Sorry to ask for another favor, but this seems too nebulas for me to grasp atm, so a push in the right direction would be great
Click to expand...
Click to collapse
It seems that using linear layouts as a base caused the different resolutions to not be created the same. I use a single relative layout as the parent layout, and several views (text, image) and buttons and center everything. I would try surrounding the current xml in a single RelativeLayout, and if that doesn't work, then try breaking each LinearLayout up and converting them to RelativeLayouts (which may seem like a pain because you have to make every item's position relative to the items around it, so it can be tricky to position them exactly right). You could also use a combination of Relative and Linear Layouts to achieve the look and feel you desire for the overall layout. Hope this helps

Related

Multiscreen Support - Only autoscale for large screens

Hi,
i am developing a game that uses canvas.
My game handles the graphic and all others for small screens and for normal screens.
I want to use the Android internal "Auto-Upscaling Feature" only for large Screens.
I put the following in the manifest file:
PHP:
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="false"
android:anyDensity="false"/>
That should work? But Android does also downscale the graphics for smallScreens.
Has anyone an idea?
Thank you! And sorry for my bad English
[funcoder]
Hmmm, maybe try setting anyDensity to true? I don't know if it will work. Do you have separate graphic resources for small screens? I also am trying to work out the most effective and elegant way to support multiple screens for something I am working on.

Flash Websites on Galaxy3!!

Hi all,
Flash is working on my phone for some websites..how is it possible when our processor does not support flash?
I tried https://www.capitaliq.com
and where's flash on this site?
try this for example and tell us results
wechoosethemoon.org
Thats not flash, its Javascript
ohhh...so you mean to say that capitaliq one is moving image and not flash....i thought flash and moving image are the same thing...aren't they?
no ^^ you can also move images with javascript
thanks....now, i am very confused about what flash is: can anyone please give me one sentence definition for this?
Let me introduce you to a cool page that has no flash: http://www.google.com
Wikipedia said:
Adobe Flash is a multimedia platform used to add animation, video, and interactivity to web pages.
Click to expand...
Click to collapse
P.S. Its not that our processors dont support flash, its that flash doesn't support our processors.
thanks...one last time...how do you come to know that capitaliq one is javascript...can you please let me know that?
usually you can tell just by looking, if not taking a look at the page source solves that. It's not the same in each browser, but usually its right click->view page source (or something similar)
Thanks....I already took a look at it but could not figure out by that also..that is why I asked...
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>
Capital IQ - Our Products: Company and Market Research, Financial Analytics, Screening, and Relationship Management Tools for Financial Professionals
</title><meta name="google-site-verification" content="-i30sEypcCfc45w16BqhrLZOAIZ2qvwBczyDuRx5swI" /><meta name="keywords" content="Capital IQ, Financials, Business, Investment" /><meta name="description" content="Capital IQ is a leading provider of data and analytics for global financial professionals. We founded our business in 1999, and now work with over 4,200 client firms, including many of the world's most successful investment banks, asset management firms, private equity firms, universities, and corporations." /><link rel="SHORTCUT ICON" href="http://www.capitaliq.com/favicon.ico" /><link type="text/css" rel="stylesheet" href="/css/styles.css" /><link type="text/css" rel="stylesheet" href="/css/960.css" /><link type="text/css" rel="stylesheet" href="/css/jkmegamenu.css" /><link type="text/css" rel="stylesheet" href="/css/%5BCOG%5DNavigation.css" /><link type="text/css" rel="stylesheet" href="/css/jQueryUITabs.css" /><link type="text/css" rel="stylesheet" href="/css/jQueryUITheme.css" />
<!-- CIQ Urchin JavaScript -->
<script type="text/javascript" src="/urchin.js"></script>
<script type="text/javascript">
_userv = 0;
urchinTracker();
</script>
This is the beginning of the source code for that site? Do you see javascript anywhere?
Yes..I saw Javascipt in there but did not got if that is for that element of the page with moving images...
use ctrl u to view source
or add
view-source:
before the address without
to view source code
cdesai said:
use ctrl u to view source
or add
view-source:
before the address without
to view source code
Click to expand...
Click to collapse
Is that browser independent?
stubborn_d0nkey said:
Is that browser independent?
Click to expand...
Click to collapse
works for chrome and firefox. I'm not sure if it works for IE my guess - it is not

[Q] any fullscreen stock web browser?

Is it available, other than recompile one. I found dolphin browser has more CPU usage than stock FROYO one. But the stock browser has no fullscreen function.
alright,find the way to compile.
and just add line in Browser.apk\res\values\styles.xml
<item name="android:windowFullscreen">true</item>
Try opera mobile
Sent from my GT-I9000 using Tapatalk
redbloodhk said:
alright,find the way to compile.
and just add line in Browser.apk\res\values\styles.xml
<item name="android:windowFullscreen">true</item>
Click to expand...
Click to collapse
Wow man! This is cool, now I only use stock browser
Thanks.
Is there a way to mod browser so it could download any file?
One thing to notice this line must be inside (STYLE): example :
<style name="BrowserTheme" parent="@touchwiz:style/TwTheme">
<item name="android:windowFullscreen">true</item>
<item name="android:colorBackground">@android:color/transparent</item>
<item name="android:windowBackground">@drawable/initial_titlebar</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
yes under style name="BrowserTheme"
Opera works good.
redbloodhk said:
alright,find the way to compile.
and just add line in Browser.apk\res\values\styles.xml
<item name="android:windowFullscreen">true</item>
Click to expand...
Click to collapse
I am interested in this hack, just not sure to understand what you mean.
I have unpacked Browser.apk and I do not see "values" directory in "Browser.apk\res\", and of course no styles.xml also.
Using JVP build from Ficeto.
Could you explain a bit or point us to relevant threads?
Thanks.
Ok, I did it,
As explained to me by Daneshm90, the procedure is rather simple
Decompile -> Modify AdroidManifest's android:theme value to :
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
(replacing "@style/BrowserTheme")
Recompile.
To be noted that decompile and recompile of Browser.apk (found in /system/app on the phone) may be achieved using apk_manager (http://forum.xda-developers.com/showthread.php?t=695701) which uses apktool just don't forget to use the option:
"10 Decompile apk (with dependencies) (For propietary rom apks)"
using twframework-res.apk (found in System/framework on the phone) as input.
then
" 11 Compile apk"
then
"12 Sign apk" as system app
then
"12 install apk"
Stock browser is a lot better in full screen.
Phone screens will always feel too small for web browsing and we need each pixel...
I guess it should also work on SGS2, I will check as soon as I get mine...
I would say Opera Mini is good choice.
Opera Mobile is faster and full screen(need setting in option)
All the way with opera mobile, Faster than stock, cache usage is maybe a bit more than stock, but i can live with that.
Has someone tried this with JVQ-Stock-Browser (much faster than opera mobile/mini imho)?
i used the search function.
how do i set the user agent in opera mini as a desktop? can somebody help me. thanks

[INFO] Interop Unlock for Dummies

I'll try to put this as simple as possible.
PLEASE tell me if I have missed anything or need to add any more information
First, you have Developer Unlock, which put simply, when you submit an app to the store, it gets "signed" with a digital signature. Windows Phone devices will only run applications with that signature. Since if you are developing an app, it is not "signed" so with a Developer Unlock, you are able to run applications without a "signature" on any Windows Phone device but there are limits.
That's where Interop-Unlock comes in. A developer-unlocked device can sideload an app but the app is not able to access the Windows Phone system and Registry. Every app, whether sideloaded or installed from the Windows Phone Store, MUST declare what functions the apps needs to use to function properly. To access certain parts of the system and registry, it needs to declare "ID_CAP_INTEROPSERVICES" in the WMAppManifest.xml. A normal app, for example "Doodle Jump" declares these functions:
Code:
<Capability Name="ID_CAP_NETWORKING" />
<Capability Name="ID_CAP_SENSORS" />
<Capability Name="ID_CAP_MEDIALIB" />
<Capability Name="ID_CAP_GAMERSERVICES" />
<Capability Name="ID_CAP_IDENTITY_DEVICE" />
Which is basically the app telling the phone "Hey man, I need to be able to access the internet (ID_CAP_NETWORKING), access your motion sensor (ID_CAP_SENSORS), media library, Xbox Live and your device's identity.
Those declared functions are allowed by the Store and to be sideloaded. However to edit the registry, the app needs the ID_CAP_INTEROPSERVICES declaration in the WMAppManifest.xml. The Store does not allow apps with this declaration to be uploaded by 3rd-party developers. Nor does the device allow the app to deploy with that declaration.
Here's where the problem is. In order to allow the app with the INTEROPSERVICES cap to be deployed, you need to override an entry in the Registry (setting the maximum allowed apps to be deployed to over 300 overrides the INTEROPSERVICES cap.). But in order to override the entry, you need the INTEROPSERVICES cap to edit the registry (chicken-and-egg, anyone?).
This restriction was introduced in the Windows Phone 7.5 update but thankfully, 1st-party and 2nd-party developers are able to upload apps with the INTEROPSERVICES cap declared (1st-party, namely Microsoft and 2nd-party being OEMs). So what we do is find a weakness, or exploit in the app to be able to edit the Registry.
How this was done for Samsung Windows Phone 8 devices was that the Samsung Diagnosis app that was hidden, had a registry editor hidden somewhere within the app. @GoodDayToDie and -W_O_L_F- found the editor and managed to Interop-Unlock the Samsung ATIV S, which was found to work on other Samsung Windows Phone 8 devices. This does NOT work on other devices as Samsung uses a method to edit the registry that is not found on other devices.
What we are doing now in the Development & Hacking Sub-forum is trying to find exploits in those 1st-party and 2nd-party applications on Windows Phone. We hope to find a way to Interop-Unlock other devices as soon as possible, but only time will tell...
redacted
So from what i understand, apps which Microsoft/Nokia release have the special ability to change the registry and changing the registry can interop unlock your phone. So you find how the app does that and use it to change the registry. Am i right?
hashmiakbar said:
So from what i understand, apps which Microsoft/Nokia release have the special ability to change the registry and changing the registry can interop unlock your phone. So you find how the app does that and use it to change the registry. Am i right?
Click to expand...
Click to collapse
They have permissions to change the registry settings for their own apps, but that is all.
Use snickler's registry app to see it in action.
Sent from my Lumia 928 (RM-860) using Tapatalk

How To Make A Live Tile That Regularly Updates From A Website

Hello,
I created a Windows Vista/7 Gadget to gather weather information from the following site: http://orsl.montana.edu/weather/ORSLweather.php. This is basically an image that updates every five minutes with the latest data from a weather station at a University. Pinning the site doesn't create a tile that actively shows the latest image, so I am trying to create a live tile for use with Windows 8/10. While I have some coding experience, I am not a programmer and am getting stymied making this seemingly simple task occur. I will copy the XML and HTML files I used for the Gadget I created in the hopes that it will help out. Thanks in advance for any help!
**** GADGET-XML ****
<?xml version="1.0" encoding="utf-8" ?>
<gadget>
<name>MSU Weather</name>
<namespace>
<!--_locComment_text="{Locked}"-->microsoft.windows
</namespace>
<version>1.2</version>
<logo src="logo.png"/>
</author>
<copyright>July 29, 2008</copyright>
<description>Gadget based on the MSU COE Weather Page</description>
<icons>
<icon height="180" width="120" src="icon.png"/>
</icons>
<hosts>
<host name="sidebar">
<base type="HTML" apiVersion="1.2.0" src="MSU_Weather.html" />
<permissions>full</permissions>
<platform minPlatformVersion="0.3" />
<defaultImage src="drag.png"/>
</host>
</hosts>
</gadget>
**** GADGET-HTML****
<html>
<head>
<style>
body {
width:120;
height:180;
background-image:url('http://orsl.montana.edu/weather/ORSLweather.php');
}
</style>
<script>
function loaded()
{
window.setInterval(refreshImage, 60 * 1000);
}
function refreshImage()
{
window.location.reload(true);
}
</script>
</head>
<body onload="loaded()">
</body>
</html>
May try to create an application http://appstudio.windows.com/en-us
maxaon09 said:
May try to create an application http://appstudio.windows.com/en-us
Click to expand...
Click to collapse
Thanks for the info - I never knew this existed. Unfortunately it doesn't seem to create a 'live' tile - meaning one that updates regularly. The weather info updates every five minutes, so I am looking to make a tile that will look for the updated image similar to how the gadget I made did.
Actually, only applications can create live tiles on start menu. So I think it needs a little coding experience. I don't know if those links help:
msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868253.aspx
irisclasson.com/2014/07/30/how-to-create-a-live-tile-for-your-website-in-a-few-minutes/
cleonti said:
Thanks for the info - I never knew this existed. Unfortunately it doesn't seem to create a 'live' tile - meaning one that updates regularly. The weather info updates every five minutes, so I am looking to make a tile that will look for the updated image similar to how the gadget I made did.
Click to expand...
Click to collapse
kerimka said:
Actually, only applications can create live tiles on start menu. So I think it needs a little coding experience. I don't know if those links help:
msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868253.aspx
irisclasson.com/2014/07/30/how-to-create-a-live-tile-for-your-website-in-a-few-minutes/
Click to expand...
Click to collapse
Thanks for the help. I had seen the info in the second link, but the first one was new to me. Unfortunately the info in the first link gets me close, but not quite there though that could be due to my ignorance. I have seen websites that work as a Live tile when pinned and was hoping I could make something similar, but as a HTML/XML/JS on the local computer as opposed to hosted on a server or having to create a full app using C#, C++, or VB. While it took me a bit of coding to make the original gadget, it wasn't that hard to get it going whereas the Live Tile continues to elude me.

Categories

Resources