Signing apps help needed! - Android Software Development

I got my app ready to go, 99% positive I did everything right so...
I used the jarsigner to sign my app as suggested by google and I get the jar verified message but when I try to upload it to the market it says its not properly signed?!
I googled n read n google n read and cannot find the problem or a solution, I've seen people saying its just a bug, restart, reinstall, try again. Or ppl saying its something wrong with the editing of the manifest and even a icon in the apk causing the error...
I've tried everything n I just can't seem to figure it out so I ask for someone familiar with this issue to please help cus my brain is fried!
I also wanna add that zipalign doesn't work for me either, I use a bat file that someone created on here that does it automatically cus when I try n use command prompt it keeps giving a cannot open .zip or can't find error?!
Again, I would really appreciate the help! I got my app, payed my fee n I'm ready to go, I just need help gettin past this. Thx!
Sent from my SPH-D700 using XDA App

Are you using eclipse to write the app? If so, just use Eclipse's "Export" (File->Export) function to do all the work for you.

I used the app inventor and used all the tutorials that are floatin around everywhere. I have eclipse but dont know how to use it cus its more code based and I havent reached that point yet. Even if there was a way to import the apk to Eclipse just do sign it would be great but I dont think it can be done. Its weird cus now I cant even get me apk to recompile after editing the xml file either! I've tried everything manually and fount programs that do it for you with one click and nothing... Its just one headache after another and I cannot figure it out nomatter how much googlin and searching on here I do! Im also starting to think it has something to do with the way the xml file is edited, I've read the tutorials and watched the videos and it seems to be right so if thats the case then I just done know... Im gonna post my xml file so anybody with this knowledge can take a look at it...
I also wanted to add that I am self taught in all this, besides getting help from others to learn so when editing a xml file I just copy, paste, backspace n enter which is what Im guessing Im suppose to do, I match up everything as others have it but Im not sure if iIm suppose to be using different commands or with xml editing things work different... So if thats the case please "school" me on that lol. Thanks!

This is what my .xml looks like...
This is how it comes up on Internet Explorer, when Im in notepad editing it doesnt show the - symbols though, maybe thats my mess up, I dont know cus it doesnt show them in notepad lol. HEADACHES! lol.
<?xml version="1.0" encoding="UTF-8" ?>
- <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="appinventor.ai_djykcor1.LOTF" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-sdk android:minSdkVersion="3" />
- <application android:label="LOTF" android:icon="@drawable/ya">
- <activity android:label="LOTF" android:name=".Screen1">
- <intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.devtools.simple.runtime.components.android.ListPickerActivity" android:configChanges="keyboardHidden|orientation" />
- <activity android:name="com.google.devtools.simple.runtime.components.android.WebViewActivity" android:configChanges="keyboardHidden|orientation">
- <intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
</application>
</manifest>

I've never used app-inventor so I can't help you with this. I always just export from eclipse.

Well when I try to import it to Eclipse it gives a error and the xml file cant be read properly or somethin, It has a icon on it that seems to make it look as a error...
com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Unable to read C:\android-sdk-windows\AndroidManifest.xml: java.io.FileNotFoundException: C:\android-sdk-windows\AndroidManifest.xml (The system cannot find the file specified)

As a long time programmer, I'll use anything that helps me develop code quickly and easily. And, IMO, Eclipse is the tool.
Creating, testing and deploying your app in Eclipse is great. Signing an app via Export (as mentioned above) takes about 30 seconds.
Google for Android Eclipse Hello World app and it will walk you through doing an app in Eclipse.
Then you can create a new project and copy your code and xml into the project.

I have been learning in eclipse now and I finally got things to go except I keep getting force closes now with my app and Im lost from here... I anybody can help id really appreciate it!

Learn how to log messages, put them in your code to trace its logic and then use logcat to see where the program is abending (old COBOL term for force stopped LOL).

ykman1 said:
I got my app ready to go, 99% positive I did everything right so...
I used the jarsigner to sign my app as suggested by google and I get the jar verified message but when I try to upload it to the market it says its not properly signed?!
I googled n read n google n read and cannot find the problem or a solution, I've seen people saying its just a bug, restart, reinstall, try again. Or ppl saying its something wrong with the editing of the manifest and even a icon in the apk causing the error...
I've tried everything n I just can't seem to figure it out so I ask for someone familiar with this issue to please help cus my brain is fried!
I also wanna add that zipalign doesn't work for me either, I use a bat file that someone created on here that does it automatically cus when I try n use command prompt it keeps giving a cannot open .zip or can't find error?!
Again, I would really appreciate the help! I got my app, payed my fee n I'm ready to go, I just need help gettin past this. Thx!
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
There's Two Apps Available On The Market That Sign Apk's, Zip's, & Jar's
"Zipsigner", & "Signapktic"! I Personally Like "Signapktic", But Both Work!!!
Sent from my HERO200 using XDA App

Well now I got everything good to go but now Im getting force closes so it seems to be a debugging issue that Im tryin to figure out... If any of you can help I'd greatly appreciate it. Shoot me a PM with your # or email, I'm completely lost from here and its SSOOO frustrating cus Im right at the end of the process...

ykman1 said:
Well now I got everything good to go but now Im getting force closes so it seems to be a debugging issue that Im tryin to figure out... If any of you can help I'd greatly appreciate it. Shoot me a PM with your # or email, I'm completely lost from here and its SSOOO frustrating cus Im right at the end of the process...
Click to expand...
Click to collapse
What's the app exactly? I might be able to help.

Debugging can be one of the most frustrating or satisfying jobs as a programmer.
As I said earlier, put Log.v or Toast messages before and after every line of code if you have to. Check the logcat. Comment-out chunks of code until it runs. Un-comment one line at a time till it blows up and you should find your problem and be able to fix it.

Rootstonian said:
Debugging can be one of the most frustrating or satisfying jobs as a programmer.
As I said earlier, put Log.v or Toast messages before and after every line of code if you have to. Check the logcat. Comment-out chunks of code until it runs. Un-comment one line at a time till it blows up and you should find your problem and be able to fix it.
Click to expand...
Click to collapse
Programmers life in a nutshell lol.

Yeah buddy, been there, done that. In college, while taking COBOL, learning to debug an ABEND was a nightmare; no help whatsoever to where it was bombing unless you let it print the 500 green bar pages of the dump . Off topic but...
We had this one room for the advanced class...crappy old IBM terminals, but we had our OWN line printer...which meant we didn't have to go and wait at computer center for our output. This printer was on a table in front of the room and when it fired up, it was soooo loud and actually shook all the tables in the room.
We were all intent on our coding, but sometimes, in the back of our heads, we noticed the printer NOT stopping. Once one of us realized it wasn't a lot of back to back job prints, we knew someone had sent a dump to the printer! The pour soul was summoned to go up and cancel the job, head hung in shame ROFL!!

I appreciate the replies everyone, not sure if I said this before but I'm self taught in all this, learning one step at a time so now that it seems to be a debugging thing ima find the logcat n post it when I get to the lab. Thanks!
Sent from my SPH-D700 using XDA App

Newklearx3 said:
What's the app exactly? I might be able to help.
Click to expand...
Click to collapse
The process is I am making the app in app inventor then importing it to eclipse to edit and make any changes, I am not as advanced to work stricly with code so I use the AI as a base to start the project and I'm learning one step at a time when editing or generating code. Ima be taking a class on this soon once I figure out the best thing to go for... thanks
Sent from my SPH-D700 using XDA App

Related

[Q] HELP with stupid errors in main.xml!

I am at my wits end with this and cannot figure out what is wrong.
Its a plain screen with imagebuttons and a BG - any idea why this is giving me error at the top?
what exactly is the error message saying?
Can you highlight the error and screenshot it again so we can see what it says?
Sometimes Eclipse can mess up give you an error for no reason. Go to the 'error' dialog at the bottom, right click the error and delete it. If it reappears then there's problem with your code.
That "error" can still be there even if your XML is ok. Make sure you save the file and then do a "Clean Project". Should fix it.
Hyperbyte,Meltus - sorry i dun goofed - attached is new screen cap - for some reason nothings coming from the error log though
Rootstonian - Thanks for your advice, but after saving and cleaning nothing has changed.
For record I am on latest release as of yesterday of eclipse and Android SDK
Yeah... the error tracking in xml files is less than helpful in eclipse. I think you probably have a typo somewhere. Just cut out tablerows until the error goes away, then youll find it
Lakers16 said:
Yeah... the error tracking in xml files is less than helpful in eclipse. I think you probably have a typo somewhere. Just cut out tablerows until the error goes away, then youll find it
Click to expand...
Click to collapse
I shall let you know how i do - my boss wouldnt let me take my workstation tower home for the weekend seeing i did 30 hours straight on it doin android plus 3DS Max ****. they found me asleep on one of our AVID edit suites this morning....considering i develop personal safety initiatives for Ozzie mining industry you woulda thought i would hav not done over double the national regulated work hours....(im quitting - someone give me a job lol)
I cant see anything wrong with that XML either, these sorts of problems are very annoying. Have you tried copying & pasting the XML into another tool & see it it highlights where it isnt well formed ???
gungh0 said:
I cant see anything wrong with that XML either, these sorts of problems are very annoying. Have you tried copying & pasting the XML into another tool & see it it highlights where it isnt well formed ???
Click to expand...
Click to collapse
Ill have to try it on monday (dont have that computer on me). I haven't pasted into another tool yet, but pasting it into a different xml layout page it doesnt error until i delete the main.xml and rename second xml to main
Yeah, that one's a real PITA. I still say no error is there LOL
Usually the red "X" is AT or NEAR the point of the error from my experience.
I would just copy the whole lot to a text file, then shift-command-down delete what's there and save the empty main.xml. Then copy lines back one by one and see what happens.
I remember a time working on a mainframe COBOL program...wasn't compiling. Worked on it for days! I gave up and just recreated the whole program...it was like some hidden character was in the original code.
ive had some errors like this pop up in eclipse when i copy and paste xml in to eclipse.
i would delete the whole thing and retype each line manually (i know it sucks)
this is the only way i have found to get rid of this error.
Have you tried physically deleting the error message from the error log at the bottom?
It sounds stupid but it can sometimes work.
Eclipse is buggy as hell!
Sent from my Nexus One using XDA App
Two things to try (after I had a quick look at a main.xml which I know works)
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/root"
1- add the xmlns:android="http://schemas.android.com/apk/res/android" to your first <TableLayout ........./> block. See if that fixes anything.
If not, then go to a .java file so the main.xml re-examines itself in Eclipse, maybe delete the error, maybe fix the project and then see if it all works then.
2- Try deleting the space between the <?xml ...?> and the <Layout> block; sounds stupid, but might actually work
Also, always be in a .java file tab (don't have eclipse show the .xml; go to the .java tab) when you compile. For some strange reason my Eclipse always screws around, pops out errors and does other wierd stuff when I compile if I'm in a .xml tab.

Stock Reader page turn refresh rate

Some people might want to change how often a page turn in the stock Reader app does a full refresh.
This is neither documented or given a user setting, but it can be changed.
Edit the file /data/data/com.bn.nook.reader.activities/shared_prefs/ReaderPreferences.xml
Code:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<float name="font_size" value="8.5" />
<string name="font_style">Caecilia</string>
<int name="periodical_margin_size" value="1" />
<int name="margin_size" value="1" />
<int name="bgcolor" value="1" />
<int name="line_spacing" value="150" />
<int name="page_forward_mapping" value="1" />
[b]<int name="fullscreen_refresh_count" value="6" />[/b]
</map>
The default without a setting is 6.
I'd love to make that one because of the odd ghosting issue with mine. Can I edit that while it's running?
Yes, you can edit that at any time.
It may not notice it immediately, certainly rebooting will work though.
This no longer works with Glowlight. There is no "fullscreen_refresh_count" tag anymore and if you add one, it just gets wiped out.
The file on NST with 1.1.2 firmware don't contains this strucutre of xml.
Edit refresh count is not possible from this file.
dxcore35 said:
The file on NST with 1.1.2 firmware don't contains this structure of xml.
Edit refresh count is not possible from this file.
Click to expand...
Click to collapse
No, the entry is not in the XML file by default.
Yes, you can put it in there and it gets read.
@GlowWorm owners, the exact same code is in 1.1.5
Hmm, this parameter works when it's in there, but the Nook wipes it any time you change any user reader preference.
Renate NST said:
No, the entry is not in the XML file by default.
Yes, you can put it in there and it gets read.
@GlowWorm owners, the exact same code is in 1.1.5
Hmm, this parameter works when it's in there, but the Nook wipes it any time you change any user reader preference.
Click to expand...
Click to collapse
I was not able to get it to register at all on my GlowLight. I still had a 6 page refresh. I did not update any settings. I also made sure the app was killed before I edited the XML file.
What can I say?
The Reader app has so much broken stuff in it.
I'm getting sick of patching things.
Renate NST said:
What can I say?
The Reader app has so much broken stuff in it.
I'm getting sick of patching things.
Click to expand...
Click to collapse
You can report a bug on B&N forums.
Admin might forward it to dev. team.
They don't even have any web pages for users to enter suggestions/bugs and track progress...
Looking at how they deal with other bugs, like lost bookmarks, I doubt anything will be fixed.
IMO, is B&N makes source available, community will help them.
But again, looks like they are not interested in bug fixing at all...
Could someone please give a quick explanation of how to get to the ReaderPreferences file and how to edit it?
The inability to do a page refresh, and the ghosting on the screen because of that, is what caused me to return my Simple Touch. If I could just get it to refresh every page turn I'd be happy. I do't want to root the device and turn it into a Android tablet, I just want a more frequent page refresh.
Renate NST said:
What can I say?
The Reader app has so much broken stuff in it.
I'm getting sick of patching things.
Click to expand...
Click to collapse
Renate. Somebody on the B&N forums is looking for this fix. I'd think a startup script could re-insert that line into the file on each boot. Is there an equivalent to an init script on a stock NST that could be tweaked?
Just realized you're in Boston. I'm flying out of Logan today!
bobstro said:
Is there an equivalent to an init script on a stock NST that could be tweaked?
Click to expand...
Click to collapse
There are init.rc & init.goldfish.rc in uRamdisk. The instructions on how to [un]pack are in "Nook Touch Android Development" forums.
bobstro said:
Renate. Somebody on the B&N forums is looking for this fix. I'd think a startup script could re-insert that line into the file on each boot. Is there an equivalent to an init script on a stock NST that could be tweaked?
Just realized you're in Boston. I'm flying out of Logan today!
Click to expand...
Click to collapse
You can always make the file read-only. (i.e. take away write permissions.) That kept the line from being eliminated.
Unfortunately, it does not help me and my 1.1.5 woes. The read-only file would not parse, and I was not able to get a refresh rate faster than 6 pages.
IBNobody said:
You can always make the file read-only. (i.e. take away write permissions.) That kept the line from being eliminated.
Unfortunately, it does not help me and my 1.1.5 woes. The read-only file would not parse, and I was not able to get a refresh rate faster than 6 pages.
Click to expand...
Click to collapse
I'm sure they program to open file in read-write more and it throws. :good:
Take a look on ddms messages.
I'm mostly almost finished with my smali patcher and I'll be getting around to stuff like this.
Using the patcher will allow people to get a subset of whichever patches they want.
For instance, I don't need the Last Read Page to be uplinked to the (B&N) cloud.
Some people might want that. Tastes differ.
Renate NST said:
I'm mostly almost finished with my smali patcher and I'll be getting around to stuff like this.
Using the patcher will allow people to get a subset of whichever patches they want.
For instance, I don't need the Last Read Page to be uplinked to the (B&N) cloud.
Some people might want that. Tastes differ.
Click to expand...
Click to collapse
Renate,
Could you open new “Patching Reader”, “Patching stuff” or something thread, so it won’t get buried into another one.
Will be interesting to see whole approach.
How to patch, un-patch (to apply new B&N update)
And how to deal with installation errors (certificate errors, etc.)
You know this stuff better than anyone else, anyway.
I know it's been a month since anyone said anything in this thread, but is there an easy way to do this? I just got a refurb NST and the leftover image when it doesn't do a full page refresh is annoying, it messes up text and in bright light I can still read the characters in the empty space that wasn't empty in the page before. It doesn't make reading hard or impossible, just annoying.
I really need something easy or at least well explained. It took me hours and searching to get adb to work with my NST last night and even rooting wasn't all that easy as the first program for flashing the boot img to the sd card didn't work for me, and then I completely failed at getting gapps to work with it because of poor instructions. I've rooted and rommed plenty of phones, so I'm comfortable with android. There just doesn't seem to be enough popularity for this device to get easy hacks, and I don't know how to do technical stuff like editing an xml.
Thinking about it, if there isn't an easy fix, can I just sideload a root browser app and manually navigate to and edit that xml file?
EDIT: Tried manually editing the xml file, the reader app just rewrites it every time I try to read something, and deletes root browser's .bak backup file. Quite annoying.
I looked into this stuff a bit.
It's spread all over the place.
B&N has a section that deletes a bunch of preferences before writing.
Personally, I've never noticed shadowing.
The contrast seems to get to be a little bit less each time though.
The dictionary stuff was a higher priority last month.
Realize that on any Nook mod only a handful of people will ever use it.
Renate NST said:
I looked into this stuff a bit.
It's spread all over the place.
B&N has a section that deletes a bunch of preferences before writing.
Personally, I've never noticed shadowing.
The contrast seems to get to be a little bit less each time though.
The dictionary stuff was a higher priority last month.
Realize that on any Nook mod only a handful of people will ever use it.
Click to expand...
Click to collapse
True, I'm sure that most people are just using a different app. After realizing from this thread that just editing the xml won't work and making it read only just makes things worse, I decided to try cool reader 3. It isn't as elegant as the nook software by any means, but at least it does a page refresh every page. It does make me wonder if it would be hard to make a universal ereader app that works well on all android based e-ink devices though.
Either way if someone is working on any sort of patch, I still think that would be great. Today was my first full day with the nook and reading definitely got annoying from time to time when I was a couple pages from the full refresh and the letters looked dull in spots and stuff. Since mine is a refurb it is possible it is a bit worse than others on refreshing the screen, and maybe was returned for that. It's not unusable, just annoying to a perfectionist like me.
I went back to look at this again.
I modified /data/data/com.bn.nook.reader.activities/shared_prefs/ReaderPreferences.xml
I added in:
Code:
<int name="fullscreen_refresh_count" value="1" />
I did everything that I could think of and it never disappeared.
I switched books, changed fonts, changed page buttons, it's still there.
(And it was refreshing every page.)
Could somebody tell me under what circumstance it disappears?

Creating Service in 4.0.3

Hi.
A while ago (2 years ago) I created a service-only app and targeting 2.2
But now when I use the same method to create a similar service targeting up to 4.0.3 it does not start.
I searched and I have read very blurry answers that after 3.1 the service must have an activity to even launch.
Previously it always started with an BOOT_COMPLETE intent. And my dummy code is succesfully starting this way on 2.1 and 2.2 in AVD.
But in 4.0.3 the intent is never fired.
Doeas somebody have any concrete answer to this?
OR even better (if it exists) a small explaination on howto make an service that not have an icon and starts at boot, that works on 4+.
Much appriciated. :fingers-crossed:
Nobody?
KaktusHater said:
Nobody?
Click to expand...
Click to collapse
Give it time sir I faced this problem a while back. If I recall the service has to be run first, in essence pre-approved before It will handle boot_complete broadcast. From what I gather this is a security feature introduced in ICS to stop "silent" rogue apps running at boot time. Also it need to be installed in internal storage because boot_completed is fired before external storage is mounted as explained in this document on the android developer site
This Stackoverflow post might shed some light on your query , I think It also gives sound reasoning towards why you should have an Icon.
If you're really intent ( no pun intended :laugh: ) on not having an Icon, there's a couple of things to try,
You may be able to get around including an activity by signing your apk with the platform keys, obviously this is only an option if you have the platform key which is normally only the case if you've built a custom rom from source
If that is not an option removing <category android:name="android.intent.category.LAUNCHER" /> will remove you app from the launcher but that would mean you would have to find a way of firing the activity on installation.
I've not tested either of them, but they both sound quite plausable ( to me at least ) . I'll leave this voyage of discovery to you
Good Luck!

Help with finishing my App (ROM Control)

Hey, so I have made an app for customizing some stuff on my Droid 3, but it works on my nexus 7, and cannot get it to load right on my D3 at the momment but that's not the issue. So what it does right now is I have a settings pannel and the only one I have actually coded is Notification background color. It sends the RGB to AccellerometerRotation in Settings.System. I will make it send to custom places once it is done. But I can then retrieve that in app, and use it to set color filter on a preview I have in my app, so bottom line, my code works.
Now, I need to add this code into the SystemUI.apk so that it will automatically run at some point (any point really) like a change in wallpaper or a reboot. I cannot figure out how to acomplish this. I have tried copypasting from JD GUI, adding my code, building apk for smali, and replacing the smali, but it doesn't work, either force crash or no systembar. I have tried to do this method on both ImageWallpaper class and the SystemUIService class, neither worked. At this point I'm totally stumped as to what to do. I assume adding my own class that would run but TBH, I am totally beat with trying anymore alone. Sometimes, its best to just let someone else take the wheel for a bit haha.
If anyone can help me finish my app, I am rewarding $40 Via PayPal for completion, which Is hopefully insentive enough for all you greedy people to assist haha.
So if any of you know how to do this, i can post the code (will be annoying till I get internet back) if needed, but ide prefer not until I get power and internet. Thanks in advance for all the responses!
I see you all viewing lol, can I get some responses <3 still stuck. I might try to just convert my java to smali and insert it into the existing smali but idk

[Q] launcher navigation

Ok so i wanted to program a launcher. But the code to do this is soooo far beyond me its not funny. I understand programming well. and i made a fair bit back in the days of actionscript. However i need help understanding code for a basic launcher where you can display apps on a screen.
I want to eventually be able to make a launcher that has no pages. But is one big giant open world Like environment. Surprisingly ive tried to pay people to do this for me and still couldnt find anyone. Really getting the base code should be the hard part. Once i can understand the code well enough i dont think i will be able to manage that but it would cool if i understood it and was capable of it.
All help is appriecated.
No replies....
scorpafied said:
No replies....
Click to expand...
Click to collapse
To make an app respond to the home screen button press, you'll need to add an intent filter with your Activity tag in the manifest like so:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Launchers are like any other apps. Usually they query the system for activities that can be launched, like this:
final Intent allAppsIntent = new Intent(Intent.ACTION_MAIN, null);
allAppsIntent.addCategory(Intent.CATEGORY_LAUNCHER);
final List<ResolveInfo> packageList = getPackageManager().queryIntentActivities(allAppsIntent, 0);
You'll probably save your icons however they're laid out in a SQLite database, and then host widgets in various views (a good tutorial is here). You might also want to look at the Launcher2 source code, although it's pretty confusing. Good luck.
I tried the link u provided and it went to a page that said "there is no such post. ". im still learning java so i will definitely check out the source code but it may take a fair bit of time before i understand it.
also i know launchers are like any other app. But its the code behind how you will navigate around for the launcher im gonna have problems with.
Thanks for the advise though.

Categories

Resources